View Full Version : final gather vs global illumination
iamcool 10-27-2006, 10:38 PM I'm using Maya 7 and rendering with Mental Ray. I have a scene with 2 animated characters and a set. I am lighting with an hdri map and a few spotlights to light the set and the characters. I have rendered several tests using FG, GI and both at the same time. The renders all look about the same, although the GI takes 3 times as long to render as FG. Yes, I have photons emiting from my lights.
My biggest questions are:
1. What is the difference between Final Gather and Global Illumination?
2. Are there certain settings that are more important than others?
3. Does the scale of my characters and set effect FG and GI?
thanks for your help
|
|
CaptainObvious
10-28-2006, 09:31 PM
The "final gather" mode in mental ray is essentially irradiance caching. I wrote a rather long post about it here (http://forums.cgsociety.org/showpost.php?p=3948749&postcount=3).
jeremybirn
10-29-2006, 03:24 AM
I'm using Maya 7 and rendering with Mental Ray. I have a scene with 2 animated characters and a set. I am lighting with an hdri map and a few spotlights to light the set and the characters. I have rendered several tests using FG, GI and both at the same time. The renders all look about the same, although the GI takes 3 times as long to render as FG. Yes, I have photons emiting from my lights.
My biggest questions are:
1. What is the difference between Final Gather and Global Illumination?
2. Are there certain settings that are more important than others?
3. Does the scale of my characters and set effect FG and GI?
thanks for your help
1.
For that task, if FG is working fast enough and looks the way you want, by all means use FG by itself.
FG used by itself is more limited that full photon-based GI in that it provides only a single bounce, one step of indirect light. That might be all you need in your case, although for more natural results in architectural lighting, you want light to be able to inter-reflect between surfaces with several bounce steps, as full GI allows.
If you do use photon mapped GI, then turning on FG in combination with it will help smooth out blotchiness by sampling rays through nearby photons.
2.
WIth FG by itself, the most important single setting is the scale (brightness) in render settings, and then the number of rays.
With GI, the most important controls are on the lights, it's the intensity (brightness) and number of photons (controlling speed, quality) you worry about most, you can leave the radius at 0 for auto sizing.
3.
Scene size affects the intensity you'll need on photons emitted from point or spot lights. You sometimes need very high intensity settings, many thousands, to compensate for the energy lost over distance (the default exponent of 2 is like quadratic decay for your photons - it's good to leave that at 2 but you need high intensity because of it.)
-jeremy
iamcool
10-30-2006, 06:24 PM
Thanks for the clarification. A big help. Another question though.
How do photon maps work? When you say you need a photon map with enough photons in it are you talking about the first stage of the render when the photons are calculated? Or referring to an actual file that contains your photon info that is then referenced during rendering?
I know in Render Settings if you uncheck Rebuild Photon Map and type a name in the Photon Map File a file is created. I have seen some tutorials that say you should use this setting and some say to stay away from it. Which is it?
When jeremybirn said you need a photon map with enough photons, he is talking about the actual calculation of the photons. Of course the more photons the light casts in a scene, the more intense the calculations required.
About saving the photon map, that is used if you want to reuse the same map for your entire animation instead of recalculating a new one for each frame. Mind that you can use this in an animation only if nothing but your camera is moving in the scene (usually used for architectural camera flybys or still frames). If your objects move or your lights change, you need to calculate a photon map for every frame.
And that is where FG comes in. What it does is basically take the photon information and "smooth out" the final look by calculating the scene's irradiance.
In most of the cases, unless you need a real-world accurate lighting simulation, FG alone should do the trick. Just keep in mind that every Hollywood VFX you see is rendered with a combination of baked FG and Ambiance Occlusion. Almost never actual GI.
Cheers.
iamcool
11-06-2006, 04:10 PM
Thanks ExP. That makes sense.
How do you bake FG?
There are two ways you can use:
One is by saving a FG map, exactly like you would a Photon Map.
The other is by baking the calculated FG solution into your textures. Just search the manual of your specific app for Texture Baking.
Now, when you do this you need to be a little careful. That means, if you bake everything then you run into the problem of not being able to move your objects or lights. And here is where Ambient Occlusion comes in.
The process goes like this: You bake your FG solution for the objects you know are not going to move (usually your background objects), and then you use Occlusion Shaders for your main objects, like for example your characters.
All this can get tedious and is considered a more advanced workflow.
If you are at the beginning, I would suggest not to bother with baking yet.... Just recalculate your FG for every frame.
Cheers.
iamcool
11-06-2006, 10:11 PM
For what I'm doing I don't think I need to worry about baking FG. Thanks for the explanation though. It may come in handy in the future.
I'm a little fuzzy on the relationship between FG and occlusion. So far I have been rendering everything on one layer. No render passes. Is ambient occlusion part of the render when render passes are NOT used? Does FG take care of that? Or is the only way to get occlusion by doing a seperate render pass?
playmesumch00ns
11-07-2006, 09:49 AM
francescaluce's ctrlbuffers shader will let you output multiple passes from a single render.
In theory you can generate ambient occlusion information at the same time as calculating final gathering, but I don't think mental ray lets you do this.
Ambient occlusion is like final gathering, but without the colour bleeding. Final gathering shoots out a cone of rays and essentially averages the colour of the surfaces it hits at the end of each ray. Ambient occlusion simply assigns each ray a black or white value depending on whether it hit anything or not, then averages those black and white colours.
From my experience FG is very good and faster than GI so you don't need to use GI.
NOTE FG when used with GI :
The light bounces are LIMITED to just ONE bounce (as the irridiance info is used from the stored GI map)
in order to avoid extra incorrect illumination in the scene.
BUT there are some scenes like when you have a labirynth and juct one light source at the end of it where you would obvioucly need MANY FG bounces to get the light to reach the end of the labyrinth so a combination of gi+FG is better in this case.
In theory you can generate ambient occlusion information at the same time as calculating final gathering, but I don't think mental ray lets you do this.
Yes you can. There are even different ways you can do this. One is to just use a dummy light like an omni and set it to ambient only. Then simply assign to its light shader input a MR Occlusion Shader. It will overlay its occlusion calculations over your render.
Also you can assign the Occlusion Shader to the "environment" parameter on the material of your object. Or even to your global environment color. You can use the shader pretty much everywhere actually... The only downside over rendering a separate pass is that you have limited control later in compositing.
Ambient occlusion simply assigns each ray a black or white value depending on whether it hit anything or not, then averages those black and white colours.
That is not entirely correct. You can assign any color to your Hit and Miss variables. This way, if you use an Occlusion Map on a per object basis (meaning every object has its own shader occluding the environment parameter), you can assign different colors to simulate the bleeding effect.
NOTE FG when used with GI :
The light bounces are LIMITED to just ONE bounce (as the irridiance info is used from the stored GI map)
in order to avoid extra incorrect illumination in the scene.
Mer, that is a bit confusing... Both FG and Photon Mapping (not to use the confusing term GI, as FG is also a type of GI), can simulate different light bounces. The only difference is real-life accuracy. In fact, Photon Mapping takes into account the physical "luminosity" of each surface it bounces off creating a more realistic effect. FG doesn't (or at least just "guesses" it).
Cheers.
playmesumch00ns
11-08-2006, 03:08 PM
Yes you can. There are even different ways you can do this. One is to just use a dummy light like an omni and set it to ambient only. Then simply assign to its light shader input a MR Occlusion Shader. It will overlay its occlusion calculations over your render.
Also you can assign the Occlusion Shader to the "environment" parameter on the material of your object. Or even to your global environment color. You can use the shader pretty much everywhere actually... The only downside over rendering a separate pass is that you have limited control later in compositing.
What I meant was you automatically get occlusion information for free when you do hemispherical irradiance sampling like FG. I don't think mental ray exposes this.
That is not entirely correct. You can assign any color to your Hit and Miss variables. This way, if you use an Occlusion Map on a per object basis (meaning every object has its own shader occluding the environment parameter), you can assign different colors to simulate the bleeding effect.
Well yes, but I was trying to explain the concept of ambient occlusion rather than a particular extension or implementation
Mer, that is a bit confusing... Both FG and Photon Mapping (not to use the confusing term GI, as FG is also a type of GI), can simulate different light bounces. The only difference is real-life accuracy. In fact, Photon Mapping takes into account the physical "luminosity" of each surface it bounces off creating a more realistic effect. FG doesn't (or at least just "guesses" it).
What do you mean by the physical luminosity?
What I meant was you automatically get occlusion information for free when you do hemispherical irradiance sampling like FG. I don't think mental ray exposes this.
Sure it does. It's called an alpha channel. Any trace call, including the finalgather calls, returns rgb + alpha where alpha IS your occlusion. Kind of the benefit of using a renderer that always takes into account alpha.
For an implementation, see mrClasses, shader gg_ambientocclusion.cpp. Another similar implementation in maya7+ is mental images' mi_fg_amboccl shader.
In the case of mental ray since maya7, finalgather can also be multi-bounce, so you can also get semi-transparent ambient occlusion, unlike most finalgather implementations.
CaptainObvious
11-08-2006, 03:54 PM
What do you mean by the physical luminosity?
I think he means the luminosity of the surface. If that is indeed what he means, he's incorrect. You don't need photon mapping to take luminosity into account.
I am afraid that you didnt understand..So I ll say it again..In mental ray :
GI/Photon Mapping WHEN USED TOGETHER WITH FinalGathering,
AUTOMATICALY LIMITS the FG bounces to ZERO.
This means you can NOT have MULTIBOUNCED FG and GI/Photon mapping at THE SAME TIME.
You CAN have multibounced Final Gathering when using FG ONLY to render a scene..
... BUT you CANNOT use multibounced FG - AND- GI/Photon mapping at the same time.
Hope this is clear now......
This is done automatically in mental ray to avoid excess extra illumination and ensure physical correctness in a scene , as when using FG AND GI/Photonmapping the irradiance for the FG is used from the GI/Photonmap.
If you used multibounce FG AND GI you would get extra illumination.
CaptainObvious
11-08-2006, 07:11 PM
DYou could use a thousand FG bounces, and it would still be physically accurate. As long as the FG rays only gather photon map info (and doesn't shoot off extra rays at regular lights, for example), it'd be accurate. You might have to take a little care with stuff like self-illuminating geometry, I guess, but it is definitely possible to have a physically accurate lighting solution even with multiple final gathering bounces.
"DYou could use a thousand FG bounces, and it would still be physically accurate. As long as the FG rays only gather photon map info (and doesn't shoot off extra rays at regular lights, for example), it'd be accurate."
I am not sure I really understood your post.How could one do this in mental ray?You mean to actually use photon maps and Multibounced FG at the same time?From what I know this is not possible.What exactly do you mean by :
.."and doesn't shoot off extra rays at regular lights, for example"
"You might have to take a little care with stuff like self-illuminating geometry, I guess, but it is definitely possible to have a physically accurate lighting solution even with multiple final gathering bounces."
You mean with just Multibounced FG no GI/Photonmaps right?
iamcool
11-09-2006, 08:11 PM
Yes you can. There are even different ways you can do this. One is to just use a dummy light like an omni and set it to ambient only. Then simply assign to its light shader input a MR Occlusion Shader. It will overlay its occlusion calculations over your render.
Also you can assign the Occlusion Shader to the "environment" parameter on the material of your object. Or even to your global environment color. You can use the shader pretty much everywhere actually... The only downside over rendering a separate pass is that you have limited control later in compositing.
I'm not following. You are talking about Maya, right?
CaptainObvious
11-09-2006, 11:37 PM
"DYou could use a thousand FG bounces, and it would still be physically accurate. As long as the FG rays only gather photon map info (and doesn't shoot off extra rays at regular lights, for example), it'd be accurate."
I am not sure I really understood your post.How could one do this in mental ray?You mean to actually use photon maps and Multibounced FG at the same time?From what I know this is not possible.What exactly do you mean by :
.."and doesn't shoot off extra rays at regular lights, for example"
"You might have to take a little care with stuff like self-illuminating geometry, I guess, but it is definitely possible to have a physically accurate lighting solution even with multiple final gathering bounces."
You mean with just Multibounced FG no GI/Photonmaps right?
Well, no, you can't do it in mental ray. But you posted this:
If you used multibounce FG AND GI you would get extra illumination.
And I'm fairly sure that's incorrect.
Well , no , what I say is 100% correct.
THIS IS actually the very reason why the user is not allowed to use multibounced Final Gathering AND GI/Photonmapping at the same time in the first place!!! .... so that you dont get extra excess light in your scene!
So Mental ray automatically limits the FG bounces to ZERO when GI is 'on' for very this reason, to maintain physical accuracy and correct luminance in a scene!
If you used Multibounced FG and GI/Photonmaps in mental ray you would get extra incorrect illumination as the second+ bounce of FinalGathering would start to bounce light already correctly(intensity wise) calculated in the GI/Photonmap and 'multiply' it after each consequent FG bounce ;)
Hope this helps
CaptainObvious
11-11-2006, 01:30 AM
Well , no , what I say is 100% correct.
Until you provide me with an explanation, I see no reason to believe you. As far as I've been able to figure it out, using multi-bounce final gathering in conjuction with photon mapping (or indeed any other method) will just mean that the light bounces more. Technically, that's MORE accurate, not less.
Hey man I think you need to take it easy!
Do your research before you jump to conclutions....
Here we go again I ll say it again ....in mental ray ..YOU CANT USE MULTI-BOUNCED Final Gathering WITH GI/photon mapping at the same time.
If you think otherwise then you have no clue on how to use mental ray......:(
Search posts from francescaluce and other respected users here that say the same very thing that you just cant use MULTIBOUNCED FG with GI at the same time........if you just dont 'believe' me...
I ll do a search and post their sayings too just give me a few minuites...
You ve obviously havent done any tests with MULTIbounced fg and GI or you just havent carefully examined the results....
And by the way I just gave ya an explanation!You must not be reading my posts carefully..:(
Here I just found the post from francescaluce I wanted to show you ..stating the very same thing I am saying that when you activate GI you CANT HAVE MULTIBOUNCED FG:
http://img95.imageshack.us/img95/8958/franuk5.jpg (http://imageshack.us)
http://forums.cgsociety.org/showthread.php?t=190232&page=54&pp=15&highlight=finalgathering+bounces
and I can find many similar posts stating the same thing from others....
......Now you do believe me huh?..........But I guess you need to see it posted from someone respected and with lots of posts to be convienced ...
..instead of doing a few simple tests and renders and see yourself.. if what I say is correct or not.
(In fact I think that even the mental ray manual states that when gi & fg is on only one fg bounce is performed)
From what I understand obviously you dont have a clue on how mental ray works and how to use it..
jeremybirn
11-11-2006, 03:53 AM
http://aram.xkcd.com:8080/imgsample/internet%20argument.jpg
I think people may even be arguing about different premises. Maybe one person is talking about what can be turned on in Mental Ray for Maya, another is imagining theoretical alternate rendering strategies? I'm not sure.
-jeremy
CaptainObvious
11-11-2006, 08:15 PM
Here we go again I ll say it again ....in mental ray ..YOU CANT USE MULTI-BOUNCED Final Gathering WITH GI/photon mapping at the same time.
If you think otherwise then you have no clue on how to use mental ray......:(
Look, you're missing the point. You claimed that using photon mapping + multiple final gather bounces is physically inaccurate, regardless of the render engine you're using! Here's exactly what you said:
This is done automatically in mental ray to avoid excess extra illumination and ensure physical correctness in a scene , as when using FG AND GI/Photonmapping the irradiance for the FG is used from the GI/Photonmap.
If you used multibounce FG AND GI you would get extra illumination.
This implies that using multiple FG bounces would reduce the physical accuracy, does it not?
I know you can only use one bounce of FG in mental ray, if you're using photon mapping. The same is true in many renderers (like Kray). But that doesn't mean it's inaccurate when using more bounces. I would like to see some mathematical reasoning behind why it would be inaccurate. Indulge me! :)
"You claimed that using photon mapping + multiple final gather bounces is physically inaccurate, regardless of the render engine you're using!"
Where the hell did I say that ????Dont just assume things...
(before you quote me read carefully my entire posts..../ read again my very first line in post 15# where I say " in mental ray: ..." )
I never said that photon mapping/GI + multibounced FG would produce physically inaccurate results IN DIFFERENT RENDERING ENGINES..
...I / We are talking about mental ray HERE. .. If you missed that then its your fault.
(read once more my very first line in post 15# where I say " in mental ray: ..." )
And in mental ray mulibounced FG with GI/photonmapping is not possible so you do not get inaccurate results(extra excess light) .......and thats why the user is not allowed to use multiple bounces when gi is on in the first place . I explained why you would get inaccurate results/excess light with an example if you read my previous posts.
''I know you can only use one bounce of FG in mental ray, if you're using photon mapping. The same is true in many renderers (like Kray). But that doesn't mean it's inaccurate when using more bounces. I would like to see some mathematical reasoning behind why it would be inaccurate. Indulge me!''
Again we talk about mental ray .. ...if you missed that........
.....and in mental ray multibounced FG+GI = wrong results/ it would give you excess light....whether you like it or not (thats why mental ray automatically limits theFG bounces to zero to prevent that).
In other rendering engines of course its different as the renderer internally takes care to avoid producing excess extra light.....like vray where different gi algorithms can be used for different light bounces...eg photons for the first and qmc for the subsequent bounces..
.....BUT again we talk about mental ray here ..
....read the thread from the begining .. from the very first post...
.. this is a thread regarding mental ray ...I guess everybody else is talking about mental ray except from you.....
CaptainObvious
11-12-2006, 02:52 AM
So we just misunderstood eachother? :shrug:
Here's what caused my confusion:
This is done automatically in mental ray to avoid excess extra illumination and ensure physical correctness in a scene , as when using FG AND GI/Photonmapping the irradiance for the FG is used from the GI/Photonmap.
If you used multibounce FG AND GI you would get extra illumination.
This particular part of your post made me think that you meant that multi-bounce FG + photon mapping produced incorrect results in any renderer, and that mental ray, to prevent this from happening, simply doesn't allow it.
I think that I was very clear, you just didnt read my full post carefully and this threads first post refering to mental ray rendering.
Hopefully its clear now.
Anywayz...
..and now to get back on this thread's subject.. :)
regarding iamcool's questions..
,.. from my experience using GI/photonmapping in conjunction with FG will give you 'better'/faster results especially in interior scenes where you need many light bounces to get a good overall illumination.In 'open' exterior scenes its more practical to avoid GI.
In interior scenes light from multiple bounces plays a very significant role. In multibounceFG each subsequent bounce has high cost, rendertime wise , so its better to approximate the multibounced light with GI/photonmaps and just enable FG to smooth the results.Thats why you will see that GI+FG is the prefered method from most mental ray users in interior scenes, instead of multibounceFG without GI/photonmapping its the best compromise between setup time and rendertime.
...
Plain GI/Photonmapping is very fast with multiple light bounces.It doesnt matter if you use 1 or even 1000 bounces the rendertimes are the same and thats the benefit of using it.The only drawback with just plain GI/Photonmapping is that you ll have to use milions of photons to get a good smooth result without losing the details especially from small geometry.
On the other hand with multibouncedFG its very time consuming for mental ray to calculate the extra bounces , every extra bounce needs a LOT of time to be calculated.
Of course GI/photons need more initial setup.
So if youre interested in the easiest way to setup your scene go with multibounced FG.
If you want better results use GI+FG but you ll need a longer setup.Its up to you.
If you just dont care about rendertimes and you want good results and an easy setup ..use 5-10+ FG bounces and ....wait.. :)
Hope this helps
Cheers
Iodine
11-12-2006, 02:53 PM
wow, been here for 10 minutes and already learning so much! its incredible! great info here!
iamcool
11-13-2006, 06:56 PM
Mer, when you talk about multiple bounces for FG what setting you are referring to? The only setting I see that mentions multiple bounces is in the Render Settings called Secondary Diffuse Bounces.
What about multiple bounces for GI? I don't see any settings for how many bounces it will make. The way I understand GI works is that you set the number of photons emitted, the photon intensity, the light's intensity, light's decay rate, and GI accuracy and the number of bounces depends on how you set these settings. (for example, a higher intensity will send out more light resulting in more bounces, and a lower intensity will send out less light resulting in fewer bounces) Is this right? Or is there a setting that allows you to say how many bounces you want? (for example, I want the light to bounce 100 times regardless of the light's intensity setting) To me, the first example seems to mimic reality more closely.
Hey Iamcool,
''Mer, when you talk about multiple bounces for FG what setting you are referring to? The only setting I see that mentions multiple bounces is in the Render Settings called Secondary Diffuse Bounces.''
You are not using mental ray in XSI right?You use maya/max?
Actually yes I am refering to FG secondary diffuse bounces.
''What about multiple bounces for GI? I don't see any settings for how many bounces it will make. The way I understand GI works is that you set the number of photons emitted, the photon intensity, the light's intensity, light's decay rate, and GI accuracy and the number of bounces depends on how you set these settings. (for example, a higher intensity will send out more light resulting in more bounces, and a lower intensity will send out less light resulting in fewer bounces) Is this right?''
Well, no..
In mental ray in XSI for example in the GI/photon tab one can define how many bounces you want the GI light to do with the parameter that is called ''reflection depth''
If you want 1 GI bounce you set this to 1 , if you set it to 1000 you get 1000 GI bounces.
NOTE :
If you set it to 1 you get a darker image than if ..say you set it to 1000 (as EXPECTED) ...
...but the render times are the SAME(!) in both cases!
This is due to photonmaping using a different algorithm than FG (where every subsequent (2nd 3rd etc) means extra rendetime).
Photonmaps use an approximation if I may say so.. to simmulate the light bounces.So use when using GI use as many bounces as you want without having to worry about extra rendertime 'cost'!
edit:
NOTE :when you have GI+Caustics ON at the same time this reflection depth setting aplies to both GI and Caustics.(at least in XSI's mental ray but I think this must be the case in other mental ray integrations)
Hope this clears things up :)
Cheers
iamcool
11-14-2006, 09:28 PM
FG is clear.
GI is clear ... for XSI. I don't use XSI, I use Maya. Your explanation is not so clear for Maya. Is there a setting that controls the number of GI bounces in Maya? I can't find one.
So you re using maya , ok let me see if I can help ( I am not familiar with maya at all but perhaps I will be able to help you)
, could you please post a screenshot from maya's/mental ray ( GI/Caustic tab ) global render settings interface ?
(you can upload the pic on http://www.imageshack.us/)
The parameters/seetings should be the same in maya I believe.There must be similar parameter to XSI's.As I posted before the setting that controls the GI bounces should be called 'reflection depth'.
PDuff
11-17-2006, 07:24 AM
Ok, I'm not really sure if this question was answered or not in that argument, but is it possible to have multi-bounce FG in mental ray (when photon-mapping is disabled)? If so how do I go about doing this? And also, could someone clarify faking color bounce with ambient occlusion for me? How do I change the Hit/Miss values? And I'm guessing this has to be done on a per shader basis depending on the color of each shader? I'm using mental ray for Maya, by the way.
""Ok, I'm not really sure if this question was answered or not in that argument, but is it possible to have multi-bounce FG in mental ray (when photon-mapping is disabled)? If so how do I go about doing this?""
Yes you can have multibounced FG when you are not using GI ,just icrease the 'bounces' seting from 0 to 1+
(I use XSIv5 and mental ray 3.4 and there is a seting called 'bounces' under the FG accuracy&radius setting I am not sure if the setting is called the same in other software like maya / max but there should be one .
Perhaps it is called 'diffuse reflection' instead of diffuse 'bouces' and it should be in the FG tab in render global settings )
"" And also, could someone clarify faking color bounce with ambient occlusion for me? How do I change the Hit/Miss values? And I'm guessing this has to be done on a per shader basis depending on the color of each shader? I'm using mental ray for Maya, by the way.""
Again, I am not familiar with other sofware but in XSI you can fake color bleeding with per object Ambient Occlution shader , like you said.
Cheers:)
CGTalk Moderation
11-17-2006, 01:27 PM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.