[Closed] Particle material by distance
Hi
I wrote for a crowd scene a script based on bobo’s “particle resolution by camera distance” which works ok ( it instances one of my 4 model according to distance just right).
However the models need different materials and i can’t figure how to have the material on a particle change within the flow as well.
My attemps ended in material changing for entire flow, but not for each particle independantly.
I guess applying materials by particles ID could help but i’m not able to manage correct index manipulations without messing all up.
I’m an average script user so if anybody knows better the specific Particleflow part of maxscript i’d be very interested.
Thanks
hi! you might also want to about this in here: http://www.orbaz.com/forum/
hope this helps.
Galagast thanks for the link, it’s (quite obviously) an excellent ressource.
Really a lot of very interesting stuff there.
I managed to have the materials switch with a couple of script test by splitting my events but thus it become quickly uncomfortable.
if anybody knows an equivalent for a .particlematID propertywhich’d be able to assign material ID for a single particle i’d be glad to hear.
However according to Mr Oleg accessing material through script operator is not always possible …
ideas or tricks upon the problem are welcome.
thanks
im not sure if this would pass for a trick… maybe you could use an actual geometry, like what i did in this [thread=222839]thread[/thread]… after getting the geometry collection, you might be able to assign your materials to each corresponding goemetry index, instead of each corresponding particle index.
by the way, did u post at Orbaz? I couldnt find your post there…
(im also an average scripter :))