PDA

View Full Version : Controlling instances cycle rate


Aikiman
11-02-2009, 05:41 AM
im trying to cycle through an instance list based on the speed of the particle. The example I am working on is a walk cycle of a bug that I have goaled to a surface and used a ramp based on lifespan to randomise the speed it crosses the surface.

I tried taking the speed of the particles velocity and placing it in Age attribute of the instancer but it doesnt appear to cycle through any quicker. Does anyone know how to set this up so it works? Indeed I am missing something here.

cheers

apoc519
11-02-2009, 05:48 AM
it's probably just not sure what to do with the vector. Maybe better to make a new float attribute and do mag(velocity) and then divide that by a lot probably.

You probably also want to use object index instead of age

Aikiman
11-02-2009, 06:00 AM
mmm I had a look at the sample in help and it says that if you stick "age" in the age of the instancer, you can affect the speed of the cycle. You can add a multiplier on a per particle level and have the cycle speed change per particle.

So what I have done is multiply the speed of the particle (speed is the mag of velocity) with the particles age and it seems to be working although the speed attribute needs adjusting. Still not sure if this is the most efficient way to do it, but it is giving me the desird results.

apoc519
11-02-2009, 06:02 AM
never used that cycle option age thing. Interesting. I bet you could have some fun if you plugged a ramp into that

Aikiman
11-02-2009, 06:35 AM
Gnomon has an old DVD on instancing, and I know for sure that it covers this. Wondering if anyone has seen it and can explain it.

Wick3dParticle
11-02-2009, 05:37 PM
Hey Jeremy,

As far as I know, when you animate goaled particles the way you are... that data doesn't translate over to velocity. You can see that by setting your particle type to numeric and piping in velocity. What you should try is creating an attribute like 'speedPP' and make that equal [age * an arbitrary value] until the cycle speed feels right.

I hope that helps,

~Ilan

Aikiman
11-02-2009, 05:53 PM
Hey Jeremy,

As far as I know, when you animate goaled particles the way you are... that data doesn't translate over to velocity. You can see that by setting your particle type to numeric and piping in velocity. What you should try is creating an attribute like 'speedPP' and make that equal [age * an arbitrary value] until the cycle speed feels right.

I hope that helps,

~Ilan

Funny you should say that because I am getting a velocity reading from the goaled particle that seems to reflect the "speed" they are travelling. Ill double check the next time I take a look at the scene.

cheers :)

Wick3dParticle
11-02-2009, 05:58 PM
You are right, my mistake. I dont know why I was thinking that. I just checked.
But I still always use an arbitrary value, and fiddle from there.

~Ilan

Aikiman
11-02-2009, 06:02 PM
You are right, my mistake. I dont know why I was thinking that. I just checked.
But I still always use an arbitrary value, and fiddle from there.

~Ilan

I always had the impression you couldnt get a value either, Im starting to wonder now if you could get a value if you goaled the particle to a moving object?! One for next time.

arkangel-fx
11-02-2009, 06:12 PM
Why wouldnt you get the velocity? The math is based on the particle itself, if the particles moves it has a position variation over time, having the actual position and the old you can get the velocity, nothing too fancy tough.

Wick3dParticle
11-02-2009, 06:15 PM
absolutely. As I mentioned before, I dont know why I said that... I know what velocity is...lol. I for some reason thought for a second that the variation in goal value was masking velocity. Breakfast didnt kick in yet att he time of my first post.

~Ilan

Aikiman
11-02-2009, 06:50 PM
Why wouldnt you get the velocity? The math is based on the particle itself, if the particles moves it has a position variation over time, having the actual position and the old you can get the velocity, nothing too fancy tough.

Im pretty sure that in the past using goal expressions to move your particle did mask a velocity value. Unless you try and extract it from querying the newPos from an oldPos.
Anyway it works now.

CGTalk Moderation
11-02-2009, 06:50 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.