Falloff material based on worldspace?

Discussions about rendering in SOFTIMAGE©
User avatar
Pete
Posts: 118
Joined: 16 Jun 2009, 07:28

Falloff material based on worldspace?

Post by Pete » 21 Dec 2011, 03:27

Hi there,
Just wondering if anyone could help me out with this shader, I was trying to control mixing between two colours by the position in world space (along one axis). So at say Y 0 the mix would be black then as it approached Y 1 it would blend to white.
Any ideas?
Thanks
Pete

User avatar
Memag
Posts: 339
Joined: 08 Aug 2010, 23:37
Location: Tits

Re: Falloff material based on worldspace?

Post by Memag » 21 Dec 2011, 11:57

I guess you could right click on "weight" divot and "link with".
In parameter connection editor "link" it with "global.posy" and set relative values how you want 'em (white when y=1, black when y=0).
Then click on "L" which appears as a divot and in animation editor set curve to linear , if you want nice and even transition.

Image

There are probably faster ways through expressions and ICE. Hopefully someone will provide you with them.

User avatar
rray
Moderator
Posts: 1810
Joined: 26 Sep 2009, 13:51
Location: Bonn, Germany

Re: Falloff material based on worldspace?

Post by rray » 21 Dec 2011, 12:53

You get less control than with Memag's approach, but you can do it directly in the render tree doing this: Take a "Vector State" render tree node, set to "Intersection Point" -- this returns the position of the rendered point, which you can extract the Y of.
softimage resources section updated Sep 26th 2026