HHbomb wrote:Hi,
I wanted to make some variations of my cars color with Random color texture and a gradient texture set to constant, but when the cars move, their color change during animation.... ( I use tyflow to animate the cars )
Any idea ?
I joined a sample file. I can see the instances get their color from a grid.
Hi HHbomb,
The Random color texture is based on the index and number of instances of group of instances. When the first particle disappear, that re-organize the group, and change some or all of the indexes ..
So that's not very usable in your case.
TyFlow particles can have a Birth ID, that won't change during the animation.
We can use those as Octane Instance ID, from the Render setup / Support / TyFlow :
Set TyFlow particle IDs as Birth Unique ID.
Then, instead of the Random color texture, you need to use an OSL texture that will use the Octane Instance ID as a random generator
- RandomFromInstanceID.png (7.58 KiB) Viewed 325 times
- RandomFromInstanceID2.png (7.57 KiB) Viewed 325 times
Here is your updated sample, with the osl file InstanceIDAsRandom01.osl
- pb2.zip
- (115.6 KiB) Downloaded 9 times
I hope that helps, and will work with your scene.
Thanks