Rendermap and Final Gathering: A few techniques...

By Dave Lajoie

Hello Guys!
I have been investigating this for a few customers and I thought I would share this with you.

The question:
When you render a scene with FG and then bake the result using rendermap, the FG doesn't look the same

As you may know already, FG will only cache fg samples for visible surfaces ( visible from the camera ) since what rendermap uses is a virtual camera to render the surface to an image file, The FG requires some handling to make it work.

Here are few workarounds to solve this problem:

1) Use the render region to build a FGmap, which will then be re-used in the render pass options during the rendermap process
a) in the render region, enable FG, give your FGmap a brand new name ( to ensure there is no old file around ) make sure to mark rebuilt off. This will allow MR to increase the FGmap each time the camera is being moved.
b) define a region and orbit the camera around the object or inside the scenery such that camera sees at least once each of the surfaces. This needs to be done manually
c) Once the FGmap accumulation process is done, you turn off render region
d) Go to the render options of the active pass, and set the FGmap to point to the file you just created. Make sure you turn off rebuild since you don't want rendermap to erase it ;) The FG settings in the pass should be identical to the ones set in the region options. if it is not the same, it is possible MR cast few extra Fg samples during the lightmap and rendermap process which would then be added to the fgmap. I also suggest to lock the fgmap file, if you plan to rendermap again later.
e) start rendermap process and enjoy the show.

2) The method above is rather hard to script and automate since you need to use the camera to paint the FGmap file and accumulate the fg samples. The other approach is to increase the FG accuracy really really really high, like 6000 and force it to rebuilt each time. The radius should be around 1 to 100, depending on the objects and its surroundings.

If you plan to use OGL to display the rendermap result, be sure to set the OGL image resolution to the rendermap resolution used. otherwise some interpolation problems will occurs and this will cause black borders to show up.

I hope this helps you to cook down really neat FG scenery and speed up rendering :)