View Full Version : expression-random rotation/scale?
lowkey 03-04-2003, 09:00 AM i setup a particle instancer to emit random characters, controlled by an expression i modified from the 'creating matrix logo effect'-tutorial on highend3d.
now, can somebody tell me how to make the instanced geometry rotate on emission (at a random rate) and maybe if i can achive random scaling as well?
i'm not that deep into MEL yet, so any hint might be helpful! :hmm:
|
|
alexx
03-04-2003, 10:13 AM
so here the hint:
- you need new per particle attributes (e.g. myScalePP)
- in your instancer settings you have to turn on the toggle "allow all data types"
- now you can choose your own per particle attributes for scaling e.g.
- if you create a creation expression for the myScalePP with e.g.:
particleShape1.myScalePP = <<rand(0,1),rand(0,1),rand(0,1)>>;
you will get a random scaling for each instanced object
cheers
alexx
lowkey
03-04-2003, 10:41 AM
well, that was really helpful, but is there a way to set the instancers' scale parameters even after it has been created?!
i can't find those general attributes in the AE! :shrug:
anyway, thanks a lot! :thumbsup:
alexx
03-04-2003, 12:35 PM
if you want to change sizes for an existing and non-emitting system that has a initial state set on any other frame than 1, you can create a runtime expression, run one frame, delete the expression and set initial state.. that is the fastest way to get there
cheers
alexx
lowkey
03-04-2003, 03:07 PM
yep, it worked! :thumbsup:
thank you very much!
lowkey
03-04-2003, 03:45 PM
one last thing:
i'm controlling randRotatePP by runtime expression, which works pretty well.
anyway, the motion looks kinda harsh and jerky, because the rotation changes every frame.
statements like:
if ((frame % 24) == 0)
force the changes to take place every second, but motion skipping still ruins the effect of smooth floating characters in space.
how can i get a smooth runtime rotation!?
alexx
03-05-2003, 08:21 AM
you can use the particleID to change the rotation behaviour continous..
e.g. something like:
myrotatePP = <<particleId*10+time, particleId*16+time, particleId*21+time>>;
play with the numbers and you might wanna divide the time by a value to slow it down
cheers
alexx
lowkey
03-05-2003, 09:42 AM
yeeeeh, thanks a lot!!! :bounce:
now it's just like i wanted it to be.
damn, i have to get much deeper into MEL... :wip:
CGTalk Moderation
01-14-2006, 01:00 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-2012, Jelsoft Enterprises Ltd.