Jump to content

Global Illumination and Final Gather in MR explained

Recommended Posts

Hi everyone,

I saw that in many posts, there are comparisons and questions about Global illumination and final gather in other applications.

so here is an explanation I gave on another forum that I thought might be helpfull to you (it was based on GI and FG in mental ray).


Hi everyone

as far as everything in CG goes, there is many methods to tackle every task,same goes for indirect lighting.

here you can find GI, FG, PT, radiosity ... etc

for this time i'll try to explain FG and GI as simple as possible (trying not to be app specific)

so let us begin with GI :

GI short for global illumination is an indirect lighting technique that is based on photons (the way it's implemented in MR inside Maya, XSI, and 3dsmax), what does that mean.

A photon in physics is the elementary particle responsible for 'light energy'(wikipedia),

you can think of each photon as a very small particle holding a certain amount of energy and when put together with maaaany other photons they form light.

now what does that have to do with GI, well GI isn't more than a bunch of those photons shot into your scene, by a photon emitting light, transfering their

energy to the objects in your scene, depending on the depth settings of your photons, a photon may do multiple bounces and with each bounce it looses energy until it dies off or it reaches the max depth. after that photon shooting process something called a photon map is usually created, this map holds all the necessary infos concerning the photons just shot, and will help in further calculations. so now comes the raytracing, rays are shot from the camera towards your scene (i'll not elaborate the raytracing but i'll talk only about its relation to the GI) so whenever an object on which there are photons (from your shooting process) a pass that will average the energies takes place, to understand that, imagine your photons as small spheres distributed on a plane for example, those spheres can be big enough and near enough to touch each other, as well as they can be small and far apart and not be able to touch each other in both cases and depending especailly on your radius settings the energies and colors of neghbouring photons are averaged to give the GI energy and color corresponding to that hit point (N.B. of course this is a part of the final result which contains also the direct lighting, the FG ...).

so as you can see to obtain a very good result with GI the averaging pass should have enough data for each point, which implies a veeeery big number of photons with smaller radiuses, then a small averaging radius, and eventually higher depth.

now to the FG :

FG short for final gather is an indirect lighting technique that is based on raytracing algorithm, the general idea is that eye rays are sent into the scene,

the number of course depends on the sampling and the FG density, so when a ray of those eye rays hits an object in your scene, gathering rays are then sent out from that point (the number is dertermined by the final gather rays parameter) into a hemisphere, now in their turn those gathering rays will intersect with geometry and will gather information from their hitting points such as color and brightness; All these information about the lighting of the scene is finally stored in a 3D Gathering map.

for the determination of the local radiation intensity neighbouring points are consulted (interpolation process), The MAX radius value determines the maximum distance apart that FG samples can be from each other. The MIN radius value determines the closest they'll be taken from each other.

here also depending on the depth settings of your FG, an FG ray may do multiple bounces. and it dies whenever it reaches a certain energy threashold depending on your falloff settigns or when it reaches the max trace depth.

then your FG results contribute to the overall render.

to obtain good results with FG of course density has to be high enough, interpolation should be the lowest possible, max and min radius should be small, multiple bounces have to be used ... etc which leads to very high render times.

so now comes the best part how to use those 2 techniques to complement each other, in a way to profit from the advantages of each, while keeping low on render times. the best way to do so is to use the GI to get a global light distribution in the scene without fine details (means lesser photons with bigger radiuses), and to use the FG to get the details in fine parts of your scene this way reducing the number of bounces for example.

also it's to note that FG has problems in tight indirect light sources, such for example a room in which the light comes indirectly from a window, if you use FG and only FG inside that room you will get a very dark scene unless you increase the number of bounces really high. so to solve that prob you shoot photons into the window, which gives an overall lighting for the scene without much details ( of coures with low big radius photons number) then you use the FG to catch the details. (in newer versions of mental ray you may use also what's called portal light)

that was long .. :)

hope that was clear enough for you to understand the difference between those 2 techniques, and to be able to use them as efficiently as possible in your projects.



Edited by geo
Link to comment
Share on other sites

Hi Edward and thanks for your comment.

Of course Global illumination isn't restricted to Photons :) , there are a whole lot of techniques for global illumination

but i said that just for sake of not complicating things and since i was talking about how MR is implementing or naming things

(see ? in Maya for example when you turn on Global Illumination for MR in the render attributes, you are referring to this technique with photons)

but in general of course you're right, so i specified in the post above.


Edited by geo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...