Particle replacing without instancing
Hi,
Does anyone know how to replace particles with some geometry without instancing. I'd like to have each replaced particle as a separate duplicate of an object which could then have their own dynamic (soft-body) secondary movement. I think this is not possible with Maya's particle instancer. |
You might have to do it via mel m8...
Sorry, not in front of Maya right now.... Danny in the mel section might have an idea or two for you regarding that. |
I already tried to do it with a per particle expression but I encountered a problem. I was thinking of duplicating the geometry in a creation expression, storing the duplicate's name in a per particle custom attribute and then deleting the duplicate when the particle dies. Then it would have been just a matter of moving the geometry in a runtime expression.
The problem is that you can only (?) have per particle custom attributes of float type meaning I can't store the name :( Any ideas? *edit* Maybe I could rename every duplicate to something that includes the particle's Id in it's name but it wouldn't be fool proof... |
Moved. Let's try this here :)
|
I have no idea.
|
Well, I got it working with an ugly hack :p If someone can figure out a more sophisticated method I'd be really appreciated.
Here's what I did: For the per particle creation expression I wrote: Code:
string $sDupName = ("dup" + particle1Shape.particleId); Code:
string $sDupName = ("dup" + particle1Shape.particleId); Code:
if(frame == 0) |
Great hack m8!
I'll keep looking for another way for you tho:) |
Quick question... I'm trying to use this trick, but it doesn't seem to use the scale and rotational information that's in my particle system. How could I adapt the following so that the duplicate gets made with the scale and rotational information?
particleShape1.scalePP = rand(.08,.4); particleShape1.rotPP = rand(0,360); string $sDupName = ("dup" + particleShape1.particleId); string $sNewObj[] = `duplicate target_plane`; rename $sNewObj[0] $sDupName; Thanks. figured it out. I should stop posting, because half the time I figure it out before people get a chance to reply. |
All times are GMT. The time now is 05:47 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018