Sunday, December 2, 2012

Vray Global Illumination No Flicker

So Siggraph Asia 2012 just went by. Recording everything learnt from the Vray booth. Highly insightful.

For starters, lets go with rendering Global Illumination with animated camera and fixed objects followed by adding animated objects and brute forcing that with everything in the same render instead of separated. Uber handy.

Vray GI - Generating the irradiance map.

When camera animation is complete.
Add all animated objects other then camera into another display layer and hide them. As we need to generate the irradiance map for stationary objects with camera animation.

1. Make sure animation is off
2. Don't need to render final image.
3. Use camera path has to be on and Vray will calculate GI for the entire movement ignoring the fact that animation mode is turned off.

4. After the map is generated. Save the irradiance map. Hit save under mode and change the mode to from file and point it to the .vrmap.
5. A good way to check or roughly preview the map is to use the irradiance map viewer. According to Constantin, even if the camera flies into different rooms, it will still work.
6. The result in the render view should look something like this.

tip* you can double the resolution during this stage to generate a more accurate irradiance map and then size it down before rendering. Also, to increase quality, up the subdiv amount under the basic parameters.

Another interesting question posed was say you don't know which direction the final render will be and you need to generate GI for the entire room. Change your camera type to Spherical and FOV to 360, this will generate a sphere render which saves GI from every direction and loaded the GI map. He then went around with a camera and "add to current map" mode after and would render specific angles like behind tables etc that lacked GI samples. 

7. After your done with this stage. Load up the objects that have animation on it. Select the materials that those objects use (He said, eventually this shouldn't be a shader option alone but object properties as well so during production be sure to assign the animated objects with their own materials even if it is the same. eg. Chrome_animated, Chrome_notanimated) For all objects that have animation, make sure the material has the option turned off.

8. Interesting, now that the irradiance map is done and from file setting is used. It is ignored and whatever we set for 9. is the primary bounce now.

9. The quality setting for 9. is now fed from the subdiv value and so we might change that to 8 or 16 or 32 and the brute force category further down is actually ignored...weird huh?

10. Not sure but I suppose we can turn off camera path at this point in any case. Don't forget to turn "Don't render final image" off again.

*tip time dependent should be ticket on for animation so we avoid that fixed sand texture that doesn't move.
The downside of this method is that the moving objects do not contribute to GI but he usually does a sphere fade AO pass to comp over.


  1. Wow! Thank you so much fo this post, VERY insightful, but quite complicated. Will have to check this out some time. Strange there is no documentation on this anywhere...

  2. I know. I was really lost that is why I wrote this down. This website was more like a personal notepad.

    Hope it helps though.

  3. Don't know if you can help me out. But I've tried this technique several times now, and the animated objects does not get calculated by the brute force engine.

    Even though I've turned off "Use Irradiance Map" on the materials for the animated objects. I've also made sure to generate the irradience map from only static geometry.

    The result is that the animated objects flicker and looks just bad...
    Do you have any tips?

  4. Hello Tarje,

    Sorry this was my own personal note taking website so I hardly check comments.

    Basically I believe what your doing wrong here is that the animated objects are supposed to be rendered in a pure brute force method, which means both are oh brute force and then you assign a deduction matte for the objects that aren't moving and you comp it together.

    The idea behind the brute force after baking the IR was to finish up the animation of the non-animated bits.

    Did I make enough sense?