PDA

View Full Version : how to rotate particles inst. geom.?


syntetik
03-13-2003, 02:27 AM
Iīve emmited instanced geometry from direction emmiter and I want that geometry to slowly rotate, no matter what axis. How can I make it rotate slowly? Do I have to write some expression?

BTW Iīd like to thank to administrator for adding special Maya threads!

syntetik
03-13-2003, 02:29 AM
I want to add: I mean per particle rotation, every particle should rotate differently.

SheepFactory
03-13-2003, 03:11 AM
You are welcome.


Add the spriteTwistPP attribute under Add dynamic attributes -> general , to your particles. than write an expression on that attribute.

example:

particleShape1.spriteTwistPP = frame *4;

Octagon
03-13-2003, 10:16 AM
Originally posted by Sheep Factory
You are welcome.


Add the spriteTwistPP attribute under Add dynamic attributes -> general , to your particles. than write an expression on that attribute.

example:

particleShape1.spriteTwistPP = frame *4;

Just as a further explanation. You need to "tell" the particle instancer to use the spriteTwistPP attr for calculating orientation.
Find the section in the instancer node and select the spriteTwistPP or whatever attr you have designed for that purpose to let the instancer know about the attr.

There are various ways to orient instanced geometry and of course randomize that orientation though the use of pp Attrs. But again, you need to _tell_ the instancer about that pp attr or there wont be an effect.

See in the manual or dg node reference for more instancer info. :)

matthias

syntetik
03-13-2003, 10:50 AM
thanX you both.

Iīve created runtime expression for new dynamic attribute spriteTwistPP. Then I wondered where to connect it. I found that in Instancer under Rotation Options/ Rotattion Type is new option spriteTwistPP, so I selected it. But there still was no effect.
Then I switched Rotation Options/ Rotattion to "position" and instances began to rotate, but too fast. I think itīs not right.
I was also looking at dg node help for particleShape but I didnīt find any attribute to connect spriteTwistPP to.

PLEASE HELP! :rolleyes:

mark_wilkins
03-13-2003, 07:33 PM
spriteTwistPP is a particle attribute, not an object attribute. You can't connect it in the dependency graph at all. You can only control it using expressions or (maybe!?) by assigning a ramp or something like that.

-- Mark

syntetik
03-13-2003, 07:52 PM
Thanks for re-directing Mark. :)
Could you give me advice how to make it all work? I guess it can not be much problem, but Iīm not expert over dynamics. I was playing around just with basic stuff like fields, emmitors, collisions. Didnīt need more control.

I looked at your site, you have pretty nice project list!!! Working on Minority Report could be fun ;)

mark_wilkins
03-13-2003, 08:24 PM
If you look at the option box for the instancing choice, you'll see that there are a number of options related to rotation. You can drive the rotation of the instanced objects by connecting it to various per-particle attributes using those choices, then use particle expressions to drive those attributes.

I got the objects spinning rather fast, for example, by having worldPosition drive their rotation.

-- Mark

syntetik
03-13-2003, 10:41 PM
I found that I canīt choose anything else in Rotation Options/ Rotation than: acceleration, force, ...., worldVelocity to drive particlesīrotation. So I would write a runtime expressions like

particleShape1.worldVelocityInObjectSpace = frame/50;

but when I chose worldVelocity as Rotation for instances, it was too fast like the rest (or particle movement was damaged by that expression) , Position (even without expression), no change. I know itīs probably wrong way, can anyone help? Cause I still didnīt get it :thumbsdow

I could let these particles rotate fast cause Iīm simulating flying bank bills, but I want to see how would they look rotating slower.

wrend
03-13-2003, 11:11 PM
you may need to apply the the instance again after adding your twist attrib to have it listed as an option for driving rotatn.

syntetik
03-13-2003, 11:18 PM
interesting! Iīm going to sleep now. But Iīll give it a try right in the morning!

thanx wrend

;)

syntetik
03-13-2003, 11:51 PM
:) well I couldnīt wait until morning, Iīve tryed it and... it DOESNīT work! :cry:

maybe someone wil have a better idea...

kag122
03-14-2003, 01:10 AM
Hi syntetik,

it seems that you are basing all of your rotations in worldspace. Since this is so, you need to move all of the objects that your are instancing to the worldspace 0,0,0 This is because the worldspace rotation (as i understand it) is based on the original location of the particle at its starting life. To solve your problem you simply need to select the object that you are instancing and grid snap it to the middle of the grid. If you want some strange looking effects, move the pivot point for some of the objects so it rotats from a different pivot.

Also to get move options in your particle instancing, simply open the attribute editor of the particles goto the instancer options and check the box "allow all data types"

Hope this helps :)

sethmisek
11-02-2004, 12:42 AM
a good way to do this is.

Add a VECTOR PER PARTICLE attribute called rotation.


creation expression type

rotation = <<0,0,rand(360)>>;


runtime expression type

rotation += <<.01,.01,0>>;

sethmisek
11-02-2004, 01:01 AM
Im having a more complicated problem.

Im makeing some bats fly down a curve.

I can use velocity in the instancer aim direction.
But the particles dont bank or lean side to side as they turn..

if anyone knows how to make the particle instances bank around corners I really could use some help.

alexx
11-02-2004, 08:49 AM
i just wanted to mention, that it seems that the particle instancer rotation always seem to be in radians and not in degrees, no matter what you enter in the particle instancer.

cheers

alexx

jadamburke
11-06-2004, 02:30 PM
Im having a more complicated problem.

Im makeing some bats fly down a curve.

I can use velocity in the instancer aim direction.
But the particles dont bank or lean side to side as they turn..

if anyone knows how to make the particle instances bank around corners I really could use some help.
Well the amount of banking (rotation on the x-axis) could be a function of the change in rotation on the direction (y-axis) the particle is travelling. So the greater the difference between the current rotation and the rotation on the previous frame, the greater the banking.

CobraX
11-06-2004, 05:14 PM
I would believe that would work too....to your bat problem.

Why not group your particles. Then animate that group along a motion path, which has those exact featuers you are looking for, which are bank and lean.

It believe it could work.

sethmisek
11-06-2004, 06:35 PM
jadamburke : sounds good. I had them all going down mostly Z axis so I used the X velocity. But that sounds like it will work well in any direction. I'll try it out.

CGTalk Moderation
01-14-2006, 03: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.