I need to figure out how to create a gradient which is applied to object based on objects Y scale. Let's say Y scale is 0,5 then only half of the gradient is projected to object and if object scale is 1 then the full gradient is shown. Example of this is a wave spectrum where low dB is in green and high dB values get e.g. red color.
Any ideas? I hope I was able to explain this somewhat clearly..
Gradient problem
-
rray
- Moderator
- Posts: 1810
- Joined: 26 Sep 2009, 13:51
- Location: Bonn, Germany
Re: Gradient problem
Could you just use the local Y coordinate to pick the color? This would be done purely in the Render tree, looking like this:
Vector state node(Intersection Point) -> vector to scalars -> (Y) -> Mixers/Gradient
If the object is animated, you could put a "vector coordinate converter" node between the first two.
Vector state node(Intersection Point) -> vector to scalars -> (Y) -> Mixers/Gradient
If the object is animated, you could put a "vector coordinate converter" node between the first two.
softimage resources section updated Sep 26th 2026
-
bdamien
- Posts: 12
- Joined: 29 Sep 2012, 22:40
Re: Gradient problem
Since I'm new to SI and to rendering I didn't quite get what you meant. But I was (almost) able to get the effect I wanted by using Vector_to_scalar -> Gradient (range_max) nodes.
Now what happens is that positivie Y-axis gets the gradient correctly but on the negative Y it has no effect. So it should project the gradient on positive and negative Y the same way.
Now what happens is that positivie Y-axis gets the gradient correctly but on the negative Y it has no effect. So it should project the gradient on positive and negative Y the same way.
-
rray
- Moderator
- Posts: 1810
- Joined: 26 Sep 2009, 13:51
- Location: Bonn, Germany
Re: Gradient problem
Best option it seems is if you create a vector_to_scalars (plural scalars) node and plug its X output into range_min, and its Y output into range_max. You can then control the position of the gradient easily by entering numbers for X and Y. If it previously didn't go into negative Y, you can try setting the range_min to negative values
softimage resources section updated Sep 26th 2026
-
bdamien
- Posts: 12
- Joined: 29 Sep 2012, 22:40
Re: Gradient problem
Thanks a lot! That was exactly what I was looking for!
I also should try to read a bit more carefully.. I didn't notice that it was indeed vector_scalarS node you were talking about in the first place so that's what got me confused:)
Cheers!
I also should try to read a bit more carefully.. I didn't notice that it was indeed vector_scalarS node you were talking about in the first place so that's what got me confused:)
Cheers!
-
rray
- Moderator
- Posts: 1810
- Joined: 26 Sep 2009, 13:51
- Location: Bonn, Germany
Re: Gradient problem
"Vector to scalars" I did only put there to have a UI to enter the values, two "scalar save state" nodes would've done it too. It's strange that range_min and range_max are not exposed in the gradient node.
softimage resources section updated Sep 26th 2026