View Full Version : getting instanced object to just scale in one axis?
01-14-2011, 01:44 PM
I'm trying to emulate that shot in tron legacy where Sam enters the tron world. I'm using a particle emitted off a texture. I then use an instancer node - my instance is an elongated cube. When I set the scale to "age" the instances scale nicely but they scale in X Y and Z uniformly. Ideally I'd just like them to simply scale in one axis. Is this possible? I'm assuming I would need some kind of PP attribute which tells the particle that age only scales it in one axis?
01-14-2011, 02:32 PM
Just create a vector per-particle attribute to drive the scale.
Next, change your instancer options to have that new vector attribute drive scale.
Finally, add expressions to drive the value of the created attribute.
Something like this in your Runtime before dynamics:
(using ".nonUScalePP" as my created attribute)
particleShape1.nonUScalePP = <<1,(particleShape1.age*2),1>>;
Season to taste...
01-14-2011, 02:52 PM
you sir are a studiotic missile man thankyou - it worked perfectly - I figured it would use some kind of vector on the end of the expression but just haven't used them enough to know how to amend, edit or indeed even write them! Thankyou!!! :beer:
just need to suss out how to get the instancer to inherit colour from particles now but from what I've swotted up I can't see that happening anytime soon! :hmm:
01-14-2011, 03:03 PM
Yeah, scale is easy...color from particles...not so much.
As far as I know, driving instance colors from particles can't be done with vanilla maya.
Don't even think you can give the instances different materials/color at all.
Maybe someone knows a plugin or work around...I will wait with you.
Hopefully it won't be long...
01-18-2011, 12:01 PM
yeah read that myself - its a real shame. I would hazard a guess the way to do it is maybe using separate instances of the cube and each one inherits the particle colour - not sure if that would be expensive (slow) to do and run though. Maya's instancer is pretty pants really heh!
(ps only just seen your reply as for some reason cgtalk didn't email me to tell me you had posted a comment!)
01-18-2011, 12:01 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.