Falloff material based on worldspace?

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

Falloff material based on worldspace?

Post by Pete » 21 Dec 2011, 04: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: 09 Aug 2010, 01:37
Location: Tits

Re: Falloff material based on worldspace?

Post by Memag » 21 Dec 2011, 12: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: 1775
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Falloff material based on worldspace?

Post by rray » 21 Dec 2011, 13: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 Jan 5th 2024

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests