Community
Maya Dynamics
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya dynamics topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Particle expression for constant velocity

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
adam.hurwitz
816 Views, 7 Replies

Particle expression for constant velocity

Hi

I am attempting to animate a bug flying around the inside of a lampshade. I have a single instanced particle moving around the shade and have a passive collider mapped to the inside of the shade. I also have a Newton field to attract it to the bulb. The problem is that the particle slows down over time and I can't figure out how to control it. I would like to control particle so it starts to bounce quickly around the shade and doesn't slow down.

 

Thanks

 

Adam

7 REPLIES 7
Message 2 of 8
eric30202002
in reply to: adam.hurwitz

Create a custom attribute for previous position of the particle, and subtract the previous position vector from the current position to get the distance traveled.

 

Scale the distance vector to a constant amount and use it to reposition the particle starting at the previous position.  This sounds like a pain in the ass but it works quite well.

 

 

And don't use nparticles, they have some great aspects but some nasty surprises as well.  Dear Autodesk employees if you are listening - PLEASE FIX NPARTICLES THEY NEED WORK!!!  

 

Eric

Message 3 of 8
adam.hurwitz
in reply to: eric30202002

Hi Eric

 

Many thanks for your reply. I apologize for my density but could you walk me through the process a bit? I haven't done a lot of scripting so I'm not sure what the custom attribute would look like. Failing that, could you point me toward a good resource for creating these attributes?

 

Thanks again,

 

Adam

 

 

Message 4 of 8
eric30202002
in reply to: adam.hurwitz

Hi Adam,

 

It sounds like you need some basic particle expression knowledge.  This takes time and effort but will give you a technical understanding that a lot of 3D people don't have.

 

There are probably some good particle expression tutorials but the one I learned from is this DVD:

http://www.kolektiv.com/products.php

 

I'm not sure if their store is still working but if you can get your hands on that DVD it's got some great information.  The authors have a TON of production experience (google them) and know what works.

 

Don't be freaked out by how old it is; 95% of the stuff they cover is still relevant in my opinion.

 

Cheers,

Eric

Message 5 of 8
adam.hurwitz
in reply to: eric30202002

Thanks for the tip, Eric! That's what I'm looking for. I'll check it out.

 

Cheers

 

Adam

 

Message 6 of 8
adam.hurwitz
in reply to: adam.hurwitz

I ended up resolving the problem by adding a Radial Field to the instanced particle and it gave me the effect I was looking for pretty nicely. Will get better at expressions when I'm not on a deadline (haha).

 

 

Message 7 of 8
docaberle
in reply to: adam.hurwitz

Did anyone figure this one out yet. I'm trying to simulate photons which always travel at the same speed. But when the particles collide with something their speed changes drastically. Is there a way to make the velocity stay the same. I tried an expression like this:

 

nParticleShape1.velocity = pPlane1|_Emitter1.normalSpeed;

 

But it really changed the look of the animation and clearly didn't work the way I expected.

Message 8 of 8
adam.hurwitz
in reply to: docaberle

I ended up using the work-around above.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report