vRay primary bounce and Secondary Bounce, clarification?


#1

Good morning all visulisation artist : )

i am starting in a new studio using vray in about a week. i have been primarily MentalRay user for last 8 years, using vray occasionally.

first i was quite suprised to find lots of similarities, however there are just one thing that seems bit confusing regarding GI primary bounce and secondary bounce.

just to give brief explanation on mentalRay approach to GI (for better or worse, Mray do not offer such extensive list of GI engines to choose from).

assuming using both Photons (equivalant to… photon in vray) + finalGather (apparently equivalant to irridiance map, however, i found lightCache to be very similar also).

  1. render starts -

  2. photons are emitted, bounced around the scene. photons are great for getting lights deep into a space (though not as accurate).

  3. final gather starts after photon emission and calculations are done. final gather generates GI according to the ā€œsurfaceā€ thus having photon GI previously calculated is contributed to FG. in Mray community FG is explained as to be used to smooth the photons map (or fill in accuracy, enhance detail of GI).

anyway, summary is, photon + FG combination works quite well, and makes logical sense to me. neither of the GI calculation is wasted, rather used for their strenghts in symbiotic manner. and you get a single GI (even though photon map is saved, really FG is the Gi solution being used, which is built based/or collaborated with photonMap). As ultimately, GI is information how much ā€œbouncedā€ light should be added when calculating appearance of a shader when a ray hits at render time.

Vray offers mixture of two different engines for primary bounce and secondary bounce. what i am finding interesting is that, user can choose two independent engines for those two bounces, such as IM + LC, IM + PM, QMC + IM etc etc.

and lot of the times, they don’t seem to be working in conjunction (as example given with photon+FG in mentalRay) to each other, but rather as two independent GI scheme, used in different circumstances(primary or secondary). as in if one was to use IM + LC, you generate LC GI solution, then you generate IM GI solution.

i guess what is confusing me is how does ā€œprimary bounceā€ and ā€œsecondary bounceā€ actually differentiate?

definition i found thats helpful…

Indirect illumination that is directly visible by a cameraĀ’s view or visible in the reflection and refractions from other objects is referred to as a Primary Bounce. Indirect illumination that simply used in the overall calculation of GI in a scene is referred to as a Secondary Bounce.

I can’t stress enough that this is not a question about Vrays excellence. as that has been proven in field by huge user base. and i am sure its my mis-understanding thats causing all this. so would love to get some input from other advanced vRay users to help me understand.

so the question is…

A. why does vray use two different engines to generate GI solution. As in two independent solution which seems that it needs to be calculated seperately anyway. wouldn’t it be better to use single GI solution generated by single GI engine at higher quality, or colloboration of two engines such as photon + FG in mentalRay.

B. what exactly does differenciate primary bounce and secondary bounce? like it would be very helpful if someone can illustrate like i did above explaning mentalRay, what happens to a ray in vRay as it is being rendered.

i will try putting my current understanding and see if someone can help me correct it or refine it.

example using IM + LC

  1. render starts.

  2. lightCache solution is calculated to its settings, finished.

  3. irridiance solution is calculated to its settings, independent to lightCache solution i am understanding. finished.

  4. assuming using fixed rate of 1 for AA (meaning on overSampling)

  5. a ray is shot from camera where pixel 1 should be, it hits a surface which is visible to camera (or reflection) so vRay will use IM GI solution to add GI to the surface. question here is, does LC GI solution being used here as well?

it would be so helpful if someone can help me fill in the rest.

again, in no way i am trying to undermine vRay, i am sure i am not fully understanding the mechanics behind it all, and would really appreciate if someone can give me some assistance in understanding it better : )

i know its a long question, with handful of questions, but i really would appreciate any help : )

looking forward to your replies!


#2

I guess this link from the help files can answer your questions. :wink:

http://www.spot3d.com/vray/help/150SP1/gimethods.htm

And indeed is very similar to mental ray, you just don’t get the diferences really exposed but final gather does the primary bounces and photons the secondary. It’s better to use different engines for each bounce because the primary is where you have more light and more detail, so you use something that don’t lose much of the details like final gather and irradiance map. The secondary bounces just need to bounce as much light as possible, and for the nature of this bounces you don’t have much fine details, so you better use an engine that can bounce as much light as possible, like photon map or light cache, it’s a matter of using the best tools for the best tasks.


#3

Thank you for your reply 3dMadness.

to clarify with examples of IM(primary) + LC(secondary), what i am understanding is LC is calculated first to generate ā€œpreliminaryā€ bounces, then IM will build on the LC GI solution to produce refined GI solution?

I think i got bit confused with the terminology, and some explanation, as stated on my initial post, help files and some people make it sound like that two engines are used differently (as in calculated totally independently) depending on the type of ray or situation. and the terminology of calling the IM primary bounce, makes it sound like its calculated first, where if my understanding is correct, secondary bounce engine will be calculated first.

if i may ask you few more questions to clarify…

  1. if using IM(primary) + LC(secondary), LC is calculated first, and IM is calculated building up on LC?

  2. if i was to use LC + LC, it dosn’t mean that i am calculated two different IM solutions twice, just means that i am using a single LC engine to calculated GI solution right? (for example, if i were to just use FG only in mRay), and if so, when using LC + LC, i should use higher subDIv then if i were to use IM + LC, as now LC is handling all my GIs?

  3. why would one use combination such as IM(Primary)+bruteForce(secondary), as bruteForce is the slowest(most accurate) engine in vRay. unless one was to use bruteForce with low subDiv for preliminary calculation? and IM to refine the preliminary solution?

  4. similar to above question, would anyone use combination such as Photon + lightCache? or even bizarre photon+bruteForce? i am getting a feeling that just because one can use those combination, that it should be done. it feels more like lightCache and photonMap is available as primary engine so one can use photon+photon or LC + LC.

thank you in advance for any help : )

happy Easter everyone!


#4

AFAIK, they work independently to get the best of each engine.

  1. I’m not sure about that, but I think the IM is calculated independently from LC, they are just blended together.

  2. Right, to reach the secondary bounce you need a primary, so if you use LC for both it will be calculated just once. I would say it’s more like if you use just photons in mr. :wink: And yes, you’d need a much higher subdivs and smaller samples to get all the detail.

  3. This solution is great as you said, using low subdivis in brute force. It would be too noisy for primary bounces, but in the secondary bounces it works great, renders fast, don’t need to tweak subdivis and sample size like in LC and don’t flick in animation. The irradiance map doesn’t even know it exists, because the brute force is calculated at the final render time, not at the GI calculation. So again, they are independent from each other.

  4. Yes, you can use some bizarre combination, but I agree with you: LC and photon are available as primary to be used also in the secondary as a single solution.

I think the flexibility is one of the great things in vray, you can pick whatever works best for each situation. :wink:

Cheers and happy easter for you too.

Flavio.


#5

thank you flavio, think your answers really helped me clear things up : )

you are absolutely right saying vRay got more options. coming from mRay, its interesting to see how mRay does very similar things, but vRay seems to offer more choices or few mroe advanced options.

i guess rest i will figure out as i go along : )

cheers! again! enjoy your easter!


#6

The primary and secondary bounces are not independent. The secondary bounces are used as part of the input calculations for the secondary bounces.

For example, when you use irradiance map and light cache, V-Ray first calculates the light cache; it is then used as part of the calculations for the irradiance map. Once the irradiance map is computed, you don’t need the light cache anymore (except in some special cases).

Best regards,
Vlado


#7

Thanks a lot for the clarification Vlado, I searched for this question in vray forum but couldn’t find the exact information, that’s why I said I wasn’t sure… :smiley:

I wish I could ask about it in the vray forum, but I don’t work anymore for a company that had vray and I don’t have it at home, so I can only read chaos group forum, but I hope to get my hands on vray again ASAP. :wink:


#8

thank you Vlado on the clarifications. it makes lot more sense now. seems it was really close to the photon+FG combination in mRay as well. as 3DMadness stated, there are tons of information on the specific engines them selves, however oddly information on actual mechanics of how those two work together is very limited.

if i may ask you few more questions just to clarify things…

i have asked previously, if i were to use combination of IM(primary) + bruteForce(secondary) what is the sequence of events? in theory, bruteForce is calculated while rendering. though bruteForce is set as secondary, irridiance Map seems to be calculated first (thought seems to take longer while doing so).

i think i have never used bruteForce engine (mRay do not have equivalent) and getting bit confused how it works.

from different mixtures and combination. the assumptions i have came up with…

  1. that primary bounces and secondary bounces differentiation does not dictate in which order GI engine is calculated. for example, when i use Photon(primary)+LC(secondary), and i am aware this would be somewhat of a unbeneficial if not conflicting combination, it seems photon is calculated first, then LC (though in theory, since LC is secondary, thus should be calculated first).

so my assumption is that no matter what engine is used in primary / secondary, order of engine calculation goes…

photon - LC - IM - BruteForce.

is my assumption on the ball park?

  1. ultimately, what i am not exactly understanding the differentiation between the primary bounce and secondary bounce.

for example, what is the difference between having

A. bruteforce (Primary)+ bruteForce (secondary)
B. bruteForce (primary)+ none (secondary)

though it seems similar, render time shows that method A is longer to render.

as in the whole post started in my attempt to understand the theory of primary bounce and secondary bounce. like is primary bounce really dictated by the type of ray shot from camera? or is it dictated by the surface hit by direct light or not. there really are lot of definitions, none descriptive and definite enough for me to really get the grasp of things.

I know the thread is getting long, but would appreciate any input : )

thank you all in advance!

PS sorry vlado, your name seem really familiar, not sure where i have seen them from, might be your work? blog? anyway, thank you for taking interest in this thread, really appreciate it.


#9

Just to let you know, Vlado is the guy (or one of the guys) that created Vray (Vlado-Ray maybe?)… :smiley:

So he is the best guy to answer these questions, hope he get time to come back and answer your questions, but I guess your assumptions are right.

To clarify, the bounces are the times the light leaves an object and go back to illuminate the scene. So you have the direct light, coming from a light source and hitting a surface. Then you get the indirect light, the primary bounce is the first time a light ray is reflected after hitting a surface, considering this surface can reflect some light back to the scene. After this, in real life the light still bounces around as it looses energy. So when you choose brute force and no secondary, you got just the first bounce. Brute force processes one bounce after another, that’s why it gets slower when you choose it again for secondary bounces, because you’re computing it again.

This is what I understand from reading the manual, chaos group forum and pratice. Let’s wait and see if Vlado can show up a shed some light on this matter…

Oh, BTW, if you wan’t you can try brute force in mental ray too, just put 0 in the interpolate over fg. num. in final gather, it will be processed with the final image just like in vray. Sometimes I use brute force as primary just to know how much detail I’m losing using a blured solution.

Cheers!

Flavio


#10

PS sorry vlado, your name seem really familiar, not sure where i have seen them from, might be your work? blog? anyway, thank you for taking interest in this thread, really appreciate it.

Vlado is the V in Vray. The developer of Vray.

Regards,
Mike


#11

oh! no wonder why name vlado sounded so familiar! he would definitely be the kind of guy who i would love to pick the brain of (not like Hannibal, metaphorically speaking), again vlado, thank you for showing interest in the thread.

as 3dMadness said, would be great if vlado can find some time and clarify primary bounce, secondary bounce concept for us : )

i have finally started on the new office using vRay, and had few minute to test things out.

few things i have found is that…

its not really strictly about primary / secondary bounce, but rather specific combination set. as in, though vRay do offer possibilities of any combination of engines, some combination just do not work, and some enables interesting characteristics.

It might be quite obvious to vRay users, but for mRay users (or any other advanced rendering engines using fixed engines) these engine selection could be rather confusing, well at least i found them to be. its no way a complaint, rather because vRay offers more choice.

example of do not work combination are (please note these are just my findings after very short experimentation, if i am wrong, please let me know)

photon + LC : it does render, however, i am assuming photon GI calculation is just discard and LC GI solution is used. which makes sense as from my understanding, both are very similar engine.

also i am not sure if LC + bruteForce actually works, though it renders, the render time is exactly same as just LC + none. render looks same, would appreciate any confirmation on this.

another interesting subtle characteristics are…

LC + LC seems same as LC + none. which would make sense as only LC is being used.

however…

bruteForce + none is not same as bruteForce + bruteForce. BF + BF enables ā€œsecondary bouncesā€, which i assume it traces more bounces (as 3dMadness explained)

anyway, long story short, i think rather then trying to strictly define primary / secondary bounces, approach should be to understand the working combination, as for me it seems primary / secondary bounce seems more of a convenient way of organizing UI to organize selective working combination of engines and their settings

again, i would appreciate any corrections to assumptions i have made so far. Thank you in advance for any help : )

PS thanks 3dMadness about mRay FG bruteForce tip, i think i read similar thing on jeff Patton’s blog, but never had the chance to try them out and it skipped my mind. just had few test on it, and works pretty good! interesting i am learning new things about mRay thanks to vRay ; )


#12

Hey, since you started in your new office with vray, you can ask them to allow you access chaos group forum, you’ll find great people with lots of information there. I’m in the opposite situation, I left my old job so I can’t post there anymore, just read… :stuck_out_tongue:

Again, I hope Vlado can show up again to explain these things more in depth, but from my experience I would suggest you never use photon map as a GI solution, because the others work so much better as shown here:

http://www.spot3d.com/vray/help/150SP1/examples_GI.htm

Both photons and light cache traces ā€œinfiniteā€ bounces, while irradiance just the primary and brute force you choose how many bounces it will trace one after another. That’s why you found that photons don’t work good with light cache and there’s no reason to put a brute force as secondary to LC, since the LC will always calculate the secondary bounces. That’s the same reason you get the same speed with LC in the primary and the same or none in secondary, that’s the nature of the LC.

So I like the default combination of IM + BF as its fast and very easy to set up and work for almost every situation. I change to IM + LC when I need more bounces in interior scenes with lots of indirect light, BF would be too slow if I need more bounces. And finally, in situations where you need all the details from the primary bounce, I would use BF + LC. As you see, LC is by far the best for the secondary bounces IMHO, and that’s why I never use photon mapping.

I also learned a lot about mental ray with vray, but this brute force I also learned from Jeff Patton in his blog. And just to remember, you got similar situation in MR: FG does the primary bounces and photons the secondary. But since you need to trace a primary bounce to find the secondary, FG is calculated after the photons and use it for its solution, but with much more detail than photons are able to do. I guess the name ā€œfinal gatherā€ creates some confusion, but it just calculates the primary bounces.

Hope you get it, I also love the many options vray have instead of being limited to photons and FG only. Lets see what Vlado will come up when vray 2.0 is release late this year as he stated in chaos group forum. :smiley:

Cheers!

Flavio


#13

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.