Random color texture change during time

Forums: Random color texture change during time
3D Studio Max Plugin (Export Script Plugins developed by [gk] and KilaD; Integrated Plugin developed by Karba)
Forum rules
Please post only in English in this subforum. For alternate language discussion please go here viewforum.php?f=18

Random color texture change during time

Postby HHbomb » Sat May 04, 2024 1:40 pm

HHbomb Sat May 04, 2024 1:40 pm
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.
Attachments
pb.zip
(111.43 KiB) Downloaded 6 times
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
HHbomb
Licensed Customer
Licensed Customer
 
Posts: 1311
Joined: Wed Jun 30, 2010 8:45 pm

Re: Random color texture change during time

Postby neonZorglub » Tue May 07, 2024 10:31 am

neonZorglub Tue May 07, 2024 10:31 am
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.
tyFlow_BirthID.png


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
RandomFromInstanceID.png (7.58 KiB) Viewed 260 times

RandomFromInstanceID2.png
RandomFromInstanceID2.png (7.57 KiB) Viewed 260 times


Here is your updated sample, with the osl file InstanceIDAsRandom01.osl
pb2.zip
(115.6 KiB) Downloaded 5 times


I hope that helps, and will work with your scene.
Thanks
neonZorglub
OctaneRender Team
OctaneRender Team
 
Posts: 909
Joined: Sun Jul 31, 2016 10:08 pm

Re: Random color texture change during time

Postby HHbomb » Tue May 07, 2024 1:02 pm

HHbomb Tue May 07, 2024 1:02 pm
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.... :cry:

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 ! :mrgreen:
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
HHbomb
Licensed Customer
Licensed Customer
 
Posts: 1311
Joined: Wed Jun 30, 2010 8:45 pm

Re: Random color texture change during time

Postby neonZorglub » Wed May 08, 2024 11:10 pm

neonZorglub Wed May 08, 2024 11:10 pm
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.... :cry:

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 ! :mrgreen:


Ho right, I should have mentioned this : this can be set per tyflow object:
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 ;) .. I'll try to add several such useful OSL in a preset list..

Thanks
neonZorglub
OctaneRender Team
OctaneRender Team
 
Posts: 909
Joined: Sun Jul 31, 2016 10:08 pm

Re: Random color texture change during time

Postby HHbomb » Fri May 10, 2024 3:24 pm

HHbomb Fri May 10, 2024 3:24 pm
Hi NZ ! Thanks for all these clarifications ! :-)
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
HHbomb
Licensed Customer
Licensed Customer
 
Posts: 1311
Joined: Wed Jun 30, 2010 8:45 pm

Return to Autodesk 3Ds Max


Who is online

Users browsing this forum: No registered users and 1 guest

Mon May 20, 2024 6:04 pm [ UTC ]