Changing model color basing on his height (z)

Hello,

Can you tell me that there is an option to create a shader that will paint my model from z = 0 to z = 10 in red, then from z = 10 to z = 30 in green, and from z = 30 to z = 100 in blue . The colors have sharp transitions between them. If there is no such option, is there an option to give the model, for example, a texture that ignores the model’s shape, only applied based on height.

Hi!
Something like that: https://codepen.io/prisoner849/pen/BaNvBgw ?

1 Like

similarly, I would like to achieve a bar-like effect from the bar chart as here: Chart. My bar is not cube. Can i create that basing on your example or maybe you can help me with that :slight_smile:

Bar-like effect :slight_smile: https://jsfiddle.net/prisoner849/k542eo19/

1 Like

Great thanks :slight_smile: