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.

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.
Author: sdb1987
Submitted: 2005-09-08 09:51:26 UTC
Tags:
Software: Maya
Views: 82,782
Related Items
-
Outdoor Umbrella Parasol 3D Model
$25.00 (USD) -
Blonde woman in jeans and sweater - aXYZ design - AWom0004-CS / Rigged for 3D Max + Character Studio 3D Model
$49.00 (USD) -
Outdoor Furniture Set 3D Model
$50.00 (USD) -
Rugged Military outdoor laptop 3D Model
$69.00 (USD) -
Outdoor oven 3D Model
$32.00 (USD) -
Animated Olympic Fire 2014 (Maya) 3D Model
$69.00 (USD) -
The Alchemy Tools for Maya for Maya 1.0.0 (maya script)
$20.00 (USD) -
Elephant 3d textured model 3ds max and maya scene files 3D Model
$30.00 (USD) -
Human Character Rig in 1 minute (skeleton, rig & bind skin in 1 minute) 3.1.0 for Maya (maya script)
$25.00 (USD)









