Adverti horiz upsell
Faking outdoor illumination in maya
Faking outdoor illumination in maya
sdb1987, added 2005-09-08 10:02:28 UTC 82,782 views  Rating:
(1 rating)
Page 2 of 4

Here is my basic ramp shader mapped on the deformed plane:



This was the easier part of the tutorial. Now it really gets harder!


We need to use the closestPointOnSurface to tell a light to emit the color (of the plane) where the light is exactly pointing at. This sounds trickky, but it really works well.

I wrote a little script that creates a closestPointOnSurface / light, duplicates the 'sky_file' and its placement and makes the connections to the lights.(3 hours to write 5 loops, I'm getting better everyday!!! :) )

If your 'sky-file' and its placement doesn't have the same name as in the script, just change it in the mel.

This shows what the script connects from the nurbsplaneShape, and the directionalLight to the cpos, and the input connections from the cpos to the 2d placement.



Now all the tutorial is complete. You just have to save the scene, and import it into another one (with objects) and render....

Here is the image file I used for this tutorial (converted from a very basic ramp shader). I have exagerated the colors to clearly see them varying on the object. The other objects are mapped with the default lambert, and .25 in ambient.

Converted image file



computed frame without domeLight




computed frame with domeLight



I already hear some of you saying that it's not global illumination. That's right! It's just a fake, but if you adjust correctly your domeLight intensity, you can achieve a pretty good outdooor lighting. (even without using the closestPointOnSurface, you get very good results. The shadows are really soft (pretty good when you want simulate light bouncing off clouds), and objects are really sticked to the ground!!)

The limitations are (as said above) that it only works with 2d textures (for the UV infos provided). With a 3d texture, you'll have to do the same as explained in the tutorial: convert it in solid file.



Well, I'm finished, and I hope you'll be able to understand all I said.