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.
Random color texture change during time
Forum rules
Please post only in English in this subforum. For alternate language discussion please go here http://render.otoy.com/forum/viewforum.php?f=18
Please post only in English in this subforum. For alternate language discussion please go here http://render.otoy.com/forum/viewforum.php?f=18
- Attachments
-
- pb.zip
- (111.43 KiB) Downloaded 54 times
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
- neonZorglub
- Posts: 1017
- Joined: Sun Jul 31, 2016 10:08 pm
Hi HHbomb,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.
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 Here is your updated sample, with the osl file InstanceIDAsRandom01.osl I hope that helps, and will work with your scene.
Thanks
Hi NZ !
Thank you very much to take time to make such an answer ! I think it'll be helpfull for a lot of people !
OSL is really powerfull but it is an another language....
Another question :
We can change Tyflow particle IDs option for all tyflows of the scene ?
Could it be possible to make this option per tyflow object basis ?
So we can drive particle Ids differently by tyflow objects.
Thanks again !
Thank you very much to take time to make such an answer ! I think it'll be helpfull for a lot of people !
OSL is really powerfull but it is an another language....

Another question :
We can change Tyflow particle IDs option for all tyflows of the scene ?
Could it be possible to make this option per tyflow object basis ?
So we can drive particle Ids differently by tyflow objects.
Thanks again !

YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
- neonZorglub
- Posts: 1017
- Joined: Sun Jul 31, 2016 10:08 pm
Ho right, I should have mentioned this : this can be set per tyflow object:HHbomb wrote:Hi NZ !
Thank you very much to take time to make such an answer ! I think it'll be helpfull for a lot of people !
OSL is really powerfull but it is an another language....![]()
Another question :
We can change Tyflow particle IDs option for all tyflows of the scene ?
Could it be possible to make this option per tyflow object basis ?
So we can drive particle Ids differently by tyflow objects.
Thanks again !
Just add a Octane Geometry Properties modifier, and there are the same options in the TyFlow rollup..
This will override the global settings from Render settings / Support / tyFlow ..
I picked up the OSL from a previous case, I think from the Texture Selector

Thanks
Hi NZ ! Thanks for all these clarifications ! 

YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |