Re: ambient lightsource
| Date : Sat, 1 Dec 2007 04:40:39 -0800 |
| To : <xsi(at)Softimage.COM> |
| From : "Matt Lind" <speye_21(at)hotmail.com> |
| Subject : Re: ambient lightsource |
After thinking a bit, I remembered to look in the "duh" file.
You can compute the ambient effect using existing nodes in the rendertree. The setup is as follows:
1) Activate incandescence on your material shader with desired color. The associated intensity parameter will drive the effect.
2) Get a vector share shader. Apply an expression to the input parameter so it's driven by the global position of an object in the scene - doesn't have to be a light.
3) Get a vector_state shader. Set the operation to "intersection point". This is the coordinate of the point on the surface currently being rendered.
4) Get a vector-scalar node from the Math shaders. Connect the two vector shaders to the inputs of the vector-scalar shader. Set operation to "distance between v2 and v1".
5) Connect output of vector-scalar shader to input of a change_range shader. Set the old start and end parameters to your min/max range for the ambient effect. So, if old range start / end are 3 and 10 respectively, then any shading point within 3 units of the designated ambient light object will receive 100% incandescence. Any shading point more than 10 units away will not receive any incandescence at all. Anything inbetween will receive incandescence at reduced intensity with linear falloff. Set the new range start to 1 and new range end to 0 because we want to inverse the falloff and keep the result within a legal range.
6) Connect the output of the change_range to the incandescence intensity parameter on your material shader.
7) Preview the effect in the render region. voila!
Since the computations are mostly to determine intensity, you can apply this as an override to all objects in the scene while each can have it's own incandescence color. They'll just share the same intensity.
Matt
-------------------------- Matt Lind Animator / Technical Director Softimage certified instructor: Softimage|3D Softimage|XSI Matt.Lind(at)Mantom.net
Date : Sat, 1 Dec 2007 10:43:30 +0100 To : XSI(at)Softimage.COM
- Follow-Ups:
- Re: ambient lightsource
- From: "Thomas Helzle" <thomashelzle(at)gmail.com>
- Re: ambient lightsource
- From: "Bernard Lebel" <3dbernard(at)gmail.com>
- Re: ambient lightsource
| DATE: | << | >> | THREAD: | << | >> | INDEX: | Main | Thread |
|---|
- Previous by Date: Re: ambient lightsource
- Next by Date: Re: ambient lightsource
- Previous by Thread: Re: ambient lightsource
- Next by Thread: Re: ambient lightsource
- Index(es):
| Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available. |