f
f
Global SectionArticlesBookstoreDictionaryDownloadsDVDsEventsForumsGalleryJob ListingsNewsNewslettersSchools
 Advanced Search
USER: PASS:  Login  Register

Subscribe
Site Links
Home > Maya > Tutorials > Rendering / Lighting > Shaders > Angle-based Hue Falloff for Maya Lights > Page 1 Change background colorChange background colorChange background colorChange background color
Angle-based Hue Falloff for Maya Lights
Tutorial by jfrancis
Login to add a Bookmark 2 votes for an average rating of 4.50

Updated:   08/26/05

Works on:    Irix  Windows  Linux  MacOS-X
Maya Versions:   4.x, 5.x, 6.x, 7.x
Readership Level:   Intermediate
Owner:   jfrancis
Homepage:   http://www.digitalartform.com



Most CG lights only lose luminosity as they fall off. This can look dull.



If you can calculate what amounts to the light's facing ratio with respect to objects, you can use it to drive ramp-based color on the light itself.







Here's a brief overview:

1) Get the world position of the point being shaded by using the samplerInfoNode.

2) Get the world position of the light using the lightInfo node.

3) Subtract (1) from (2) to get a vector from the surface point to the light.

4) Get the surface normal in camera space using the samplerInfo node.

5) Convert the surface normal to world space using a vectorProduct node set appropriately.

6) Take the dot product of (3) and (5) using another vectorProduct node set to "dot product" -- this is the light facing ratio.

7) Clamp the light facing ratio (6) to between 0 and 1.

8) Run the facing ratio intoi the V-coordinate of a V-ramp set to colors of your choice.

9) Loop the output of the ramp back into the light color.

You now have angle-based hue falloff built into the light.


To explore this in detail, download the maya scene file:
hueFalloffLight.ma


.

Login to add a Bookmark 2 votes for an average rating of 4.50

Related Learning Tools
Maya Related DVDs



Custom Props & Animation-Source Games & Maya
Maya Related Books



Learning Maya 7 Book Bundle
Global DVDs



Mel for Artists

Top Rated Maya Tutorials



Related Tips


No Results to Display


More Tutorials by jfrancis

1. Angle-based Hue Falloff for Maya Lights by jfrancis (08/26/05)
2. Randomly Shuffled Texture Tiles by Joseph Francis (08/25/05)






Sponsors

Sponsor

Contact Us | Advertise | Post Jobs | Post News | Post Events | Terms