Material Question here.
I have a texture that I would like to animate in a material. I want to animate a scaler parameter to advance through the different greyscale values in the texture. The desired effect would be while the the “progress” parameter animates from 0.0 → 1.0 specific blocks are revealed. for example 0.0-0.099 block zero or black is shown, 0.1-0.199 block 10 is shown etc…
Thanks in advance for any thoughts or suggestions?
I think I got pretty close by running the Image through 2 different step nodes then subtracting the difference to isolate the block that I am wanting to see based on the Progress input.
One thing I’m noticing is that my lower grey value in the 10% & 20% range are not separating as cleanly when the progress is at 0.1 and 0.2 respectively. Not sure if this is some kind of linear space issue because I made this texture in Photoshop.
I would just use UV values to output the needed section.
Its both faster to calculate and probably much less error prone when you enable the enhanced UV value checkbox on the mesh…
I do think flipbook uses UVs much the same way in a pre-made function/system.
Use integers for the seps/rows.
Convert your percentage to the needed integer so as to prevent floating point errors like the one you are experiencing.