r1 - 18 May 2007 - 14:35:18 - MattEstelaYou are here: TWiki >  Maya Web > WebLeftBar > MayaAnimation > MayaBatchRenderOptions > MayaCloth > MayaFluids > MayaFur > MayaJapan > MayaLightingShading > MayaLinks > MayaMelAndExpressions > MayaMentalRay > GlobalIlluminationIllustrated

Global Illumination, in Pictures

Basically the same steps as the MentalRay page, with pictures and text. There's 2 main processes in a global illumination render; matching the light energy to your scene, then smoothing the result.

gi_001justRoom.jpg
1. here's a simple room that we'll light with GI. it has a single directional light that we'll use to cast photons.





gi_002_photons1000_radius0.1_int8000_exp2.jpg
2. here i've enabled GI, given it a cache filename, set the GI render options to radius = 0.1, accuracy = 1. I've also set my render preview to 50%, and sampling at -2, 0.

The directional light is casting photons, set its global illum photons = 1000, and left the default values of intensity = 8000, exponent = 2.0. For this scene size, the photons are too small to make out.
gi_003_intensity50.jpg
3. I've increased the render globals GI radius = 0.5, so I can see whats going on. The photons were pure white, meaning they have too much intensity. Quick tests brought the dirlight's photon intensity from 8000, to 4000, to 2000, to 1000, to 500, to 100, to 50, where I could start to make out that little gradient pattern in the photons. So here, intensity = 50.
gi_004_photons10000_exp2_notBouncingUnderShelves.jpg
4. The last render clearly doesn't have enough photons, so I boost the global illum photons = 10,000. The intensity looks about right, but there aren't enough photons getting into the shadowed areas. The photons need more bounce!
gi_005_exp1.5_gettingUndersidesButTooBlownOutAndNotEnoughPhotons.jpg
5. To get the photons to bounce further, I set exponent = 1.5 on the light. now we're getting photons onto the undersides of the shelves, but we're getting blown out hotspots. Exponent and intensity go hand in hand, adjusting one normally means tweaking the other to match. Also we still don't have enough photons.
gi_006_photons40000_exp1.5_intensity20_goodBalance.jpg
6. I increase the dirlight global illum photons = 40,000, and reduce the exponent = 1.5, and also lower the intensity = 20. (again each tweak normally means slight adjustments of other values). We're now getting a nice balance. Note that setting seemingly high numbers like 40,000 doesn't take that long at all; this surprised me at first. You can easily get up to 100,000 or higher, and the photon casting will only take a minute or so. Large scenes can get up into the millions.
gi_007_lockedPhotonMap_accuracy100_radius1_bitBlotchy.jpg
7. i'm happy with the photon distribution for now, so I set rebuild photon map = off in the GI globals. This forces mentalray to re-use the photons in the photon map file, saving a lot of time.
Now I start to blur the photons. I increase their size by setting radius = 1, and start to blur them with accuracy = 100. Its ok, but still a bit too blotchy.
gi_008_radius1.5_accuracy500_goodEnough.jpg
8. I increase the radius = 1.5, and blur even more with accuracy = 500. This is looking good enough, final gather will take care of the rest of the smoothing.
gi_009_fgEnabled_GI_disappeared.jpg
9. I enable final gather, set rays = 100, point density = 0.2, point interpolation = 20. Hang on, the GI has disappeared! What are we gonna do??
gi_010_giColourScaleBoostedTo3_giBack.jpg
10. Several ways to fix this. we could rebuild the photons with FG enabled, adjusting the intensity and exponent so that the GI is bright enough. Or we can use the GI colour scale to boost the GI overall, which I've done here. In the GI render globals I set GI scale = 3. To do this I clicked on the colour swatch, put the picker in HSV mode, and typed 3 into the V slot.
gi_011_miaMaterial_masonryPreset_recalcFG_recalcGI_andRelock.jpg
11. Here I created a mia_material, loaded a masonry preset, applied it to the room, and recalculated the GI map and the FG map (different materials, especially the mia materials, will bounce photons differently). The solution looks good, so I lock both maps.

gi_012_fullSizeRender_samplesNeg1And1.jpg
12. Time to go to a full-size render, and increase the antialias samples to min = -1, max = 1. Looks good! Now we need some ambient occlusion to pick out the corners.
gi_013_ambocc_tooWide_tooBlotchy_tooDark.jpg
13. I enable ambient occlusion in the mia shader, leaving the defaults of samples = 16, length = 10, dark = 40% gray. The ambocc is too grainy, too wide, and too dark.
gi_014_samples32_distance5_dark0.75gray.jpg
14. I reduce the grain by boosting the samples = 32, make it not extend so far from the corners by lowering the distance = 5, and lighten the effect by making dark = 75% gray. Much nicer! Nearly there.
gi_015_keylightYellow_photonsBlue_recalcAll.jpg
15. finally I tweak the colours by setting the dirlight's colour to a pale yellow, and the photon colour to a pale blue, to fake the sunlight/sky ambient effect, and I do a final recalculation of the photons and final gather. Not perfect, but not bad. I call this done for now.

Here's a download of the final scene, maya8.5, 64kb. photonTutorial.mb

-- MattEstela - 18 May 2007

Topic attachments
I Attachment Action Size Date Who Comment
jpgjpg gi_001justRoom.jpg manage 3.7 K 18 May 2007 - 13:06 MattEstela  
jpgjpg gi_002_photons1000_radius0.1_int8000_exp2.jpg manage 2.1 K 18 May 2007 - 13:07 MattEstela  
jpgjpg gi_003_intensity50.jpg manage 9.9 K 18 May 2007 - 13:07 MattEstela  
jpgjpg gi_004_photons10000_exp2_notBouncingUnderShelves.jpg manage 11.1 K 18 May 2007 - 13:08 MattEstela  
jpgjpg gi_005_exp1.5_gettingUndersidesButTooBlownOutAndNotEnoughPhotons.jpg manage 19.8 K 18 May 2007 - 13:09 MattEstela  
jpgjpg gi_006_photons40000_exp1.5_intensity20_goodBalance.jpg manage 15.1 K 18 May 2007 - 13:09 MattEstela  
jpgjpg gi_007_lockedPhotonMap_accuracy100_radius1_bitBlotchy.jpg manage 4.8 K 18 May 2007 - 13:09 MattEstela  
jpgjpg gi_008_radius1.5_accuracy500_goodEnough.jpg manage 3.8 K 18 May 2007 - 13:09 MattEstela  
jpgjpg gi_009_fgEnabled_GI_disappeared.jpg manage 1.6 K 18 May 2007 - 13:09 MattEstela  
jpgjpg gi_010_giColourScaleBoostedTo3_giBack.jpg manage 2.7 K 18 May 2007 - 13:10 MattEstela  
jpgjpg gi_011_miaMaterial_masonryPreset_recalcFG_recalcGI_andRelock.jpg manage 3.7 K 18 May 2007 - 13:10 MattEstela  
jpgjpg gi_012_fullSizeRender_samplesNeg1And1.jpg manage 17.8 K 18 May 2007 - 13:12 MattEstela  
jpgjpg gi_013_ambocc_tooWide_tooBlotchy_tooDark.jpg manage 99.2 K 18 May 2007 - 14:15 MattEstela  
jpgjpg gi_014_samples32_distance5_dark0.75gray.jpg manage 18.3 K 18 May 2007 - 13:13 MattEstela  
jpgjpg gi_015_keylightYellow_photonsBlue_recalcAll.jpg manage 19.4 K 18 May 2007 - 13:13 MattEstela  
elsemb photonTutorial.mb manage 64.8 K 18 May 2007 - 14:34 MattEstela  
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback