MohamedSakr wrote:3- in the above paper, the BDPT algorithm shows that in the camera Paths loop, he is connecting to random Light Vertex Cache (LVC) while it is commented in SmallVCM
// For VC, each light sub-path is assigned to a particular eye
// sub-path, as in traditional BPT. It is also possible to
// connect to vertices from any light path, but MIS should
// be revisited.
how MIS should be revisited "or what should I add to the code in other words"
Ordinary BPT connects the vertices of each eye subpath to the vertices of a single light subpath. Therefore, the number of samples each (s,t) technique takes is 1. The numerator in the balance heuristic weight is this equal to the pdf of the constructed path.
Now, say you have sampled N light subpaths and stored their vertices whose number is V. You then trace an eye subpath through every pixel, connecting each eye vertex to C randomly chosen light vertices.
In order to derive the MIS weight for a connection, we can reinterpret the above process as follows. Conceptually, you're connecting each eye vertex to the vertices of
all N light subpaths. Thus, the number of samples that each (s,t) technique takes is not 1 anymore, but is N. However, the probability for each connection is now C/V. Therefore, the numerator in the balance heuristic weight needs to be multiplied by N * C/V.
Finally, let's consider the special case where C is set to the average light subpath length, which will make roughly as many connections as ordinary BPT. The average light subpath length is V/N. In this special case everything cancels out in the above multiplier, so the MIS weight remains unchanged. In practice though, C will almost always will be a fractional number, which you can round to the closest integer. So the "proper" weight will be different, although very slightly.
In summary, if you pick the number of connections to be equal to the (integer-rounded) average light subpath length, then you can use the traditional MIS weight.