Rendering a Fly-Through Animation with V-Ray and Backburner using GI

V-Ray is an incredibly powerful rendering engine, but with it comes long render times - especially when rendering animations. This guide is written to help you minimise the waiting time by using network rendering in 3ds Max. This guide can also be applied to non-network rendering by simply unticking the "net render" box in the common tab of render settings.

This tutorial is very useful and shows you how to set up the light cache and irradiance map properly, but it's missing a few vital steps that I will go through in detail.

The first thing to note about using Global Illumination is that you can't use the 'incremental add to map' methods when rendering on multiple machines. (Stick with me if you don't understand that, there are pictures to show what I mean.) This is because only one pc can save the file at one time, so multiple machines simply overwrite each others data.

The solution to this is relatively simple to set up:

Firstly the Light Cache needs to be rendered and saved to disk.
Secondly the Irradiance Map needs to be rendered and saved to disk.
Thirdly, the final animation can be rendered pointing to these two files.

Luckily, this can all be automated using Backburner.



Setting up the Light Cache

Setting up the Light Cache

Even though it's an animation you are rendering, set the time output to a single frame. The Light Cache will produce a file from your timeline, not your time output. Make sure your timeline is set to the frames you want to render.

Untick "Save File" as this is not necessary yet.

Setting up the Light Cache

Tick "Don't render final image" as we are only rendering the light cache at the moment.

Setting up the Light Cache

Both Primary and Secondary GI Engines must be set to Light Cache.

Set the mode to "Fly Through", tick the boxes highlighted and choose a location to save the light cache file.

Setting up the Light Cache

Once all settings are correct, click render. (If you are network rendering remember to tick "Net Render")

Click "Advanced" on the network render window that appears, and then select "Enable Limit". This will make sure only one render server is processing the light cache.



Setting up the Irradiance Map

Setting up the Irr Map

Select "Active Time Segment" (or range if you only want to animate a small part) and make sure "Save File" is unticked as this is unneeded for the time being.

Choose to render every 10th frame for the IR map, any more is usually not needed unless the camera is moving very quickly. The first frame will render relatively slowly, but the frames after that will render much quicker due to "multiframe incremental" mode being selected.

Setting up the Irr Map

Make sure this tick box is still selected.

Setting up the Irr Map

Set the primary engine to Irradiance map, and the secondary to Light Cache.

Set the mode to "multiframe incremental" and choose a location to save the file. (This must be a shared network location if you are network rendering)

Setting up the Irr Map

The IR Map will build on the already computed light cache. Choose "From File" and select the location where you saved the light cache file.

It doesn't matter if the light cache file hasn't finished yet as this job will not start until the previous one has completed.

Setting up the Irr Map

Click "Render" (Remembering to click net render if using backburner)

Ensure the server limit is still ticked and set to 1.

IMPORTANT: In order for this file to not start rendering until the previous light cache file has completed, click "Dependencies" on the network render window and add the previous light cache job to the list. If you ever forget to do this, you can simply add a dependency using Backburner's Queue Monitor by right clicking on the job and clicking "Select Dependencies".



Setting up the Final Render

Setting up the Final Render

Select the range of frames you want to render. In this case I am rending all frames from 0 to 125.

Make sure you render every single frame by choosing "1" in the "Nth Frame" box.

Finally, save your image sequence to your desired location (Again, this needs to be in a networked location if using backburner).

Setting up the Final Render

Untick "Don't Render Final Image"

Setting up the Final Render

Set the IR Map and Light Cache to load from the files made in the previous renders. This job will later be set so that it does not start until those files have been completed.

Setting up the Final Render

Untick "Enable Limit" so that all the servers can render off the final animation.

IMPORTANT: In order for this file to not start rendering until the previous light cache and IR Map has completed, click "Dependencies" on the network render window and add the previous two jobs to the list. If you ever forget to do this, you can simply add a dependency using Backburner's Queue Monitor by right clicking on the job and clicking "Select Dependencies".


Your animation should now be set up to render on Backburner using V-Ray GI. This sounds quite complicated at first, but it's easy to set up, reduces render time substantially and stops that horrible GI flicker if you were to calculate GI on each frame.

Thank you for reading this, and I hope you will find it useful. Tim.

Comments - please feel free to leave a comment :-)
vijay says:
11th November, 2009 at 6:51pm
its very good tutorial rendering for workthrough
Truc An Lam says:
11th November, 2009 at 6:52pm
thanks Tim, I'll will try your method..
Charles says:
11th November, 2009 at 6:59pm
Thank U very much, it's a very nice and clean tutorial. Question: What about HDRI file?
Tim - timsportfolio.co.uk says:
11th November, 2009 at 6:59pm
Hi Charles.

If you would like to save an HDR file you can either use the normal 3ds max frame buffer and save to .exr, or you can use the v-ray frame buffer and save to .exr. Please see my compositing tutorial for information on how to do this using the vray frame buffer.

Cheers
Tim
Florin says:
11th November, 2009 at 7:00pm
Hi Tim!

First off, great tut! thanks!

I do have a couple of questions, though:

1. Why not scale the light cache to world as indicated in the first tutorial?
2. Why not use Precalculated overlapping method for the IrrM ?

Thanks again,
F.
Tim - timsportfolio.co.uk says:
11th November, 2009 at 7:00pm
Hi Florin, thanks for the kind comments.

1. You are right, it is always best to set the light cache to world rather than screen when rendering an animation. There is however one drawback to setting the mode to world, and that is the increased memory usage. The scene I was rendering when writing this tutorial had a very large polygon count, and due to this crashed whenever the light cache was set to world. Even with quite a high sample size the light cache could not be calculated, so in this case it was necessary to render using the screen option. Although this could produce some noise the amount is limited because the light cache is blurred and the noise will not move in the scene due to the same cache being used for each frame. My advice would be to try world first, and if this does not work use screen.

2. Although precalculated overlapping is a very fast method to calculate the irradiance map, it does come with some drawbacks. Compared to density-based, precalculated overlapping is quite blurry. Because the irradiance map is being used as the primary GI engine, it's important that there is as little blurring as possible. Each scene is however very different and there is never an option that is always the correct one to choose. My advice would be to choose density based for quality, but if speed is required choose precalculated.

I hope this is helpful to you.
Tim
Cabaq says:
11th November, 2009 at 7:01pm
Hello and thanks for this tutorial.
Would you say that this tutorial could be improved with the additional functions that came with sp3?
Tim - timsportfolio.co.uk says:
11th November, 2009 at 7:01pm
Hi Cabaq,

Thanks for the kind comments.

V-Ray 1.5 SP3 is indeed a very big upgrade when compared to SP2, and there are some very useful features that have been implemented.

This tutorial was written to show how to completely remove flicker in animations and speed up rendering. This is done by using the same IR Map Cache and LC Cache for each frame.

One of SP3's new features is 'Further reduction of flicker in animations'. This means that V-Ray will now render animations with lower quality settings with a lot less flicker than previous settings.

This is fantastic news for animations with moving objects, but for animations such as flythroughs with no moving objects, this tutorial is still relevant as it can save a large amount of time rendering.

Hope this is of help.

Cheers,
Tim
Anonymous says:
11th November, 2009 at 7:01pm
hi Tim,
i've experienced Light cache hanging at the bulding phase while rendering my animation. Or sometimes, the whole frame renders except for 1 bucket which will render forever.

i'm rendering a scene with:

1)camera movement
2)objects moving into camera view to form up the entire environment
3)some of which fades in(eg. visibility 0.0 to visibility 1.0)
4)some of which are glass objects(eg. refraction = grey)
5)some of which are frosted(eg. refraction index 0.8)

i understand that the above might have caused slow rendering time, but could u kindly enlighten me as to reasons why vray might hang like wat i've mentioned. for that matter, i've read thru tutorials abt setting up irradiance map and light cache for optimization, but it seems my problem is something else. btw, my mtls in scene r all vray and vray light mtl and subdivs r of an acceptable level where there is glossy refractions and reflections. I understand that my qns might be vague...if u have time and wuld be kind enough to enlighten me, pls let me know of anymore info i shuld provide in order for u to understand my problem. if it takes too much of ur time to explain...kindly direct me to a link or thread that can be of assistance...thanks very much.
Tim - timsportfolio.co.uk says:
11th November, 2009 at 7:02pm
Hi,

I have a few suggestions, hopefully one of them will stop the light cache from crashing in your scene.
The most common culprit for a crashing render is the amount of memory used, or the amount of memory available to the renderer.

1. Under the light cache rollout check the following settings:

Subdivs - Try reducing this number if it is quite high. Try a really low number (400) to see if this stops the crashing.
Sample size - Leave this at the default value, if crashing persists try increasing the number slighly to around 0.05.
Scale - World uses far more memory than Screen. Although World is the correct setting to use for flythroughs try setting it to screen to see if the crashing stops. (Screen will give perfectly acceptable results)
Store direct light - This setting speeds up overall rendering, but does use more memory when building the light cache. If the light cache keeps crashing try unticking this option. It's not usually recommended though as render times are far higher.

2. Under the Settings Tab click on the 'Vray:: System' rollout.

Dynamic memory limit - This is usually set to 400MB, which gives a maximum of 400MB of ram per V-Ray bucket. Depending on the amount of ram and cores you have try increasing this number. My system has 8GB of ram so I sometimes set the dynamic memory limit to 800MB which has in the past prevented crashes.

Hopefully this will be of some use to you and prevent the crashing!

Cheers,
Tim
Atilde yvind says:
15th December, 2009 at 7:41pm
Great tutorial! Excellent explaination of an excellent method.
Mostafa Saber says:
30th March, 2010 at 7:32am
Hi, Thanks Tim for the simple explanation. I wonder if I could use this method for moving objects animation, or if you could make another tutorial for moving objects. I'm an architect, but I use some cars & people to make it alive. I've not made any animations for a long time now, due to the render time issue.

Thanks for your help & I wish you the best in your career.
eswaran says:
1st April, 2010 at 7:13am
thanks wish you a great career
Tim - timsportfolio.co.uk says:
5th April, 2010 at 10:01am
Hi Mostafa,

This method can be used for an animation with moving objects in later versions of V-Ray (SP3 and later), due to a new feature for time interpolation GI renders. There is a really good tutorial showing what you can do to combat this with only slightly higher render times here:

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

All the best,
Tim