Download

Crop Life Color based on color ramp

So, my idea is the following:

  1. I want to change the color of a crop based off of how long it has been alive.
  2. I want to be able to easily change the color cycle with a texture (color ramp)
  3. I want to minimize the code as as much as possible

Here is what I have so far:

Here is the color ramp texture:

The goal should be to have the mask make it where the color on the color ramp is applied to the entire UV mask. The issue is that the only way I know how to do this properly is with a panner, but when you use the panner the UV mask (not all joined) has some issues:

The texture problem exists when I set the TextureCord to .1 or higher, the fixed one has TextureCord set to .01, but this doesnt really resolve the problem. I need a way to pick a location on the texture ramp based off of the life and apply that SINGLE color on top of the mask. The issue is the mask is a ramp and so I have portions of the texture that are bleeding into the areas based off of the UV. I could maybe fix this with a quick UV edit, but that would create different sized elements and would make the UV look bad. Any thoughts on how I might be able to resolve this?

Is the explanation not enough? if so let me know I can make a video or something to show it off better!

try adding a vector2 in the UV input of your gradient, for Y use 0 (or any number actually), and for X use your lifetime parameter (needs to be 0-1)
hope that helps!

cheers
Frank

Frank that did help, thanks!!