PDA

View Full Version : GI + FG, what am I doing wrong?


maco
04-21-2005, 12:16 PM
Hello!

I have been trying to create some renders with maya 6.5 and mental ray GI + FG but im not quite satisfied with the result.

Itīs all step by step, just so you can see where or why im having problems, so be cool this is going to be a pretty big/long post. :D
The scene is a simple room with some chairs and a table. All with grey dsg shader and dgs photon shader without Specular and Glossy.

Light setup. (http://svetlana.nu/getreal/image01.jpg)

As you can see there are 2 mentalray arealights in each window and a spot light with low cone angle as sunlingt.
Both arealights have the mental ray physical light shader attached.

Next step i followed Dagons tutorial(the english translated one, while it was up) on how to set and adjust GI.

First the sunlight. (http://svetlana.nu/getreal/image02.jpg)
0:01:16.96 total

Then the two arealights(6 6 shadow sampling). (http://svetlana.nu/getreal/image03.jpg)
0:03:13.04 total

All together with some tweak. (http://svetlana.nu/getreal/image04.jpg)
0:03:37.94 total


I used 500000 photons, acc = 512 and radius = 0 on all of the lights to begin with.
Donīt know if itīs to much or to little photons, I think itīs hard to see.

After that i turned on FG(50 rays 0 min 0 max radius).

0:09:45.47 total (http://svetlana.nu/getreal/image05.jpg)


Then i thought... Hmmmm shadow artifacts and no good contact shadows.
Perhaps changing the min and max radius will help.
I messured my scene and from reading on various forums i calcualted and choosed to start testing with min 0,14 and max 1,4.

0:09:03.04 total (http://svetlana.nu/getreal/image06.jpg)


It rendered a bit faster and got a little less artifacts but lost all the contactshadows.
So that didnīt help, then i exaggerated and lowered min to 0,014 and max to 0,14 and got this.

0:15:54.68 total (http://svetlana.nu/getreal/image07.jpg)


Better contact shadows but a significantly higher rendertime and spotty walls.
Increased the amount of FG rays to 200.

0:32:12.43 total (http://svetlana.nu/getreal/image08.jpg)


Better but the rendertime doubled.
Changed back to 50 FG rays and tried to increase the amount of photons to 1000000 on all the light to see if that would help.

0:20:08.28 total (http://svetlana.nu/getreal/image09.jpg)


Changed back to 50 FG rays and the min = 0,14 and max = 1,4 but still with 1000000 photons on each light.

0:13:16.78 total (http://svetlana.nu/getreal/image10.jpg)


What if my scene is to small and thats why the radius setting need to be such small values and thats why the rendertime is long??
Scaled up the scene x 10. And tweaked all the values so that the light intensity and photon intensity looked ok again.
Increased my FG min and max radius and got this.

0:08:50.00 total (http://svetlana.nu/getreal/image11.jpg)


The last image is similar to image nr 6 and renders a bit faster so the size must have something to do with it or... not at all??

I have seen lots of rendered images that have better quallity with much more materials and they all have less rendertime.
Do people messure their rendertimes with stored photon and fg files or?

Now to the question... what am I dooing wrong?

=OverDrive=
04-22-2005, 04:56 PM
It looks like your settings are right there, but I see what you're saying on the clarity and shadow artifacts.

A couple of things I noticed from your posted settings:

Lower the GI accuracy to 200 and increase the radius to 1 or 2 (don't go over 3 is what i've read). Also you may be overdoing the photon emission number. See how much of a difference it makes to lower the number to 50000 or 100000.

Increase the FG rays back to 200 or higher. (the higher the number the longer the render time.)

The min and max settings. The lower your min the longer the render (so I've been told, but I can't tell a difference). I generally use for the max, 10% of the total scene size and 10% of the max for the min. If this increases the render time drastically, increase your min and max 1%.

"mental ray physical light shader attached" I'm not familiar with this node. So it may work against the numbers I've posted.

Hope this is helpful.

O|D

floze
04-22-2005, 07:01 PM
Lower the GI accuracy to 200 and increase the radius to 1 or 2 (don't go over 3 is what i've read).
The gi radius is measured in world units, so it strongly depends on your modelling scale. If your room is built in real world units (e.g. 500cm x 500cm or something alike) and your working units are cm, you might try a value between 50 and 100. But it's not that important if you use finalgathering afterwards. Paolo Berto suggests doubling the acquired radius when using finalgathering in conjunction with gi.

Well, however. I guess your main problem is the broken relation of direct and indirect illumination of both of your area lights. What is the 'energy' value of your physical lights (the HSV value component of it's color)? It should match your original light's photon energy if you would like to see an exact 'match' of direct and indirect light distribution. But this way you will probably notice a blown out illumination in areas near the area light - that's because of the way mentalray samples the area lights. So switching back to a mib_light_point instead of a physical might be worth a shot because adjusting the decay and distribution with it is a piece of cake (though not physically correct). Finding the right balance of direct and indirect light amount is a bit tricky sometimes. In your case, there's definitely too much indirect light.

Also make sure every object has it's 'visible in reflections/refractions' flag set correctly, specifically if you imported them.

And here's another great piece of in-depth explanation, full of tips and trix (4 kids) - thanks Paolo Berto:

http://www.jupiter-jazz.com/wordpress/wp-content/data/tr4kv2/html/chapter1-FG.html

maco
04-22-2005, 07:32 PM
Thank you very much for the answers!

Yes floze you are right the balance of direct and indirect light amount is wrong and just as you said the direct light blew out the stuf near the arealights. And that is where it all went wrong, I lowered the area lights and increased the photon intensity.

Iīm definetly going to read through the link Floze posted.
After that i shall try to do the scene all over again with both of your answers in mind.
Hopefully it will turn out alot better! :)

Thanks again, Cheers!

maco
04-27-2005, 04:18 PM
Ok, tried again today with much lower settings and used a texture
and some colors, the result is this. (http://svetlana.nu/getreal/newTest.jpg)

Now i use 25000 photons on the lights and 300 fg rays.

Still need to work on the settings but i just though i should show it.
Any tip on how to get better quality where the right wall meets the ceiling (the floor to)?

Cheers!

floze
04-27-2005, 04:35 PM
Seems like you're on the right track now. :)
Allthough I would raise the contrast between direct and indirect illumination even more. The high (though nice smooth) amount of GI makes it look a bit too artificial, but that's just my humble opinion of course.

To eliminate the speckles you might try to add some finalgathering filter, up to a value of 3 or even 4. But with a little texture on the wall the artifacts will vanish anyway I guess.

LehaS
06-23-2005, 02:34 PM
Up to now i was using mostly FG for renderings .... Time to test GI

My scene:
I have 2 MAYA lights ( spot and point ) converted to MR area lights in the scene both emitting photons ..... GI is on , lights' Emit Photons flags are on also....I have FG in the scene also with some lambertian dirtmapped diffuse

Why on earth do i get this message...?

//RCGI 0.3 error 361053: no photons stored after emitting 1000000 photons (canceling emission job) :sad:

I thought even though amount of photons can be small it means that they ll have bigger radius and appear like spots....but they dont appear at all....

Thanx in advance ...

bgawboy
06-23-2005, 05:33 PM
When you are combining GI + FG, you may wish to use the option
Precompute Photon Lookup
in the Final Gathering section of mental ray Render Globals.

Although this increases photon tracing (GI) time, it should speed up overall
rendering because, typically, the FG time is decreased much more so.

bgawboy
06-23-2005, 05:51 PM
leha_sokol,

This message means a lot of photons are going out without hitting a GI receiving surface.
Typically if you have a point light which is not enclosed in a diffuse reflecting environment,
this will happen. Point lights spray out photons in all directions, 360 degrees in sphere of distribution.

For GI, you typically use spots for emitting photons.
If you use a spot, typically you put it up in a corner of a diffuse reflection box/room.

Here's a tip I just thought up for looking through a diffuse reflecting room wall from the outside looking in:
Try putting mib_continue (Sample Compositing section of mental ray shaders) on the wall you want to look through. The regular material shader feeds into the input slot. The photon shaders with that material should continue to bounce the diffuse photons appropriately. This all assumes a mib shader tree for material.

floze, have you tried this?

floze
06-23-2005, 11:40 PM
Try putting mib_continue (Sample Compositing section of mental ray shaders) on the wall you want to look through. The regular material shader feeds into the input slot. The photon shaders with that material should continue to bounce the diffuse photons appropriately. This all assumes a mib shader tree for material.

floze, have you tried this?
Yes, I was using the transmat though. You probably could use a full transparent lambert as well (without refractions of course). The mib_continue seems to be way more suitable for this job however.
It's always a challenge wrangling those photons, heh.

LehaS
06-24-2005, 06:36 AM
Thanx for info guys.... but i m still on 6.0.1 so i guess i dont have this mib_continue shader to test your trick....

Anyway....what does this shader to? From what u said i understood it can make geometry invisible which will still e used as a photon reflector? What is the advantage of using this techique ?

And also about Photon Lookup option of FG....here is what is written in docs

Precompute Photon Lookup
This option (which also turns on Final Gather) causes photon tracing to compute and store an estimate of the local irradiance at every photon location. This means that far fewer final gathering points are required because the photon map carried a good approximation of the irradiance in the scene -- mental ray for Maya can estimate irradiance with a single lookup, instead of many photons. In this case, photon tracing takes longer than before and requires slightly more memory, but rendering is faster.

Does it mean that GI is first computed and then all irradiance info collected by photons is used for computing FG? What are the advantages and drawbacks ?

I'm not a native English speaker so please forgive me if get something wrong....

Thanx

floze
06-24-2005, 08:52 AM
Does it mean that GI is first computed and then all irradiance info collected by photons is used for computing FG? What are the advantages and drawbacks ?

I'm not a native English speaker so please forgive me if get something wrong....

Thanx

[/list]
Ahh, it's still my favorite one:
http://www.jupiter-jazz.com/wordpress/wp-content/data/tr4kv2/html/chapter1-FG.html
..scroll down to 'FG with photon tracing'.

bgawboy
06-25-2005, 04:44 AM
A couple of supplemental pieces of information in case you are interested.

Normally, with GI only, the photon map stores the photon energy and the photon location.
Irradiance is then calculated at render time. Irradiance is energy per unit area. So the summed photon energies within a radius is divided by the area defined by that radius. (Also when I say energy, I really mean energy flux, or watts.)

So when you turn on fastlookup using GI+FG, an irradiance calculation is added to the data stored in the photon map in the photon tracing phase. Then when an FG ray hits a surface during rendering, it doesn't need to calculate the irradiance. With lots of FG rays, this makes sense so as not to keep repeating this calculation at similar spots.

LehaS
06-27-2005, 10:16 AM
A couple of supplemental pieces of information in case you are interested.



Ahh, it's still my favorite one:
http://www.jupiter-jazz.com/wordpre...hapter1-FG.html (http://www.jupiter-jazz.com/wordpress/wp-content/data/tr4kv2/html/chapter1-FG.html)
..scroll down to 'FG with photon tracing'.


Well .... i m always interested....Thank you guys for your answers....I think my general understanding of Photon Lookup feature was not that far from the truth :thumbsup: .....

BTw one more thing i wanted to ask....:D

After reading Paolo Berto's notes i was testing my scenes with diagnoseFinalg flag to get better undestanding of how fg points are being spread by MR....

What i noticed is that for some reason FG points on DGS materials are not visualized in FG map....

I m posting 2 images ...
the 1st one is LAmbertian Chair+DGS floor+diagnoseFG map.....FG points on the Chair are visible
2nd is DGS Chair + DGS floor + diagnose FG map....no FG points on the Chair

As u see there are no green or red points for DGS materials there....

Is it MR that "forgets" to make them visible ..or some REflective nature of DGS shaders?

CGTalk Moderation
06-27-2005, 10:16 AM
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.