[Sidefx-houdini-list] Emission Tweeking

Mark Elendt mark at sidefx.com
Tue Nov 27 15:30:20 EST 2007

On Tuesday Nov 27 at 15:22, gravatar at gravatonia.com wrote:
> Hey guys,
>   I have a VEX shader (It's the super mat, I was lazy) that gives a groovy
> look up close, but not so fabulous from a distance  I am using Emission in
> conjunction with transparency maps and the bumpiness of the displacement
> shader to give me the raw energy appearance I am looking for.  Do you all
> know of an expression variable that I could throw into the emission values
> to increase emission based on distance from the camera?  I think I know how
> to do it in VOPS if I export out the shop out as a VOP node, but it would
> be a lot easier and quicker if I could use an expression directly in the
> SHOP.  Thanks for the help.


will give you the distance from the point on the surface to the origin
of the eye ray.  So, something like:

    exp(-factor * length(P-Eye))

would give you an exponential fall off.  "factor" would be the control
as to how quickly it fell off.

    1 - smooth(length(P-Eye), near, far);

Would give values of 1 until you get to "near" and it would fade out
until "far" at which point it would be zero.  near/far would be two
controls which specified the zone for the falloff.

You can, of course, get fancier.

More information about the Sidefx-houdini-list mailing list