PDA

View Full Version : Squiggly Particle Motion?


AtrusDni
08-08-2007, 07:45 PM
Thats the best way I can describe it. Here is an image to better communicate what im after:
http://i25.photobucket.com/albums/c86/Fishypants/particle-motion.jpg

Basically im looking for a way to have the particles do that sort of motion, with out fields. I tried using different combinations of sin and whatnot, but cant come up with a good result. I want to slightly, and smoothly have the particle deviate from its default path, but still end up roughly where its going, i just need to add some noise to it. Any ideas?

AtrusDni
08-08-2007, 10:37 PM
alright i figured it out with the help of my friend.

Basically I added 3 per-particle float attributes called offsetX, offsetY, and offsetZ. I created a Creation Expression that assigns a random value between -1 and 1 for each of these values. Ex:

particleShape1.offsetX = rand(-1,1);
particleShape1.offsetY= rand(-1,1);
particleShape1.offsetZ = rand(-1,1);

Then I created a runtime expression that looks like this:
float $intensity = 0.15;
ivy_particleShape.velocity += <<gauss(noise(ivy_particleShape.offsetX)) * $intensity, gauss(noise(ivy_particleShape.offsetY)) * $intensity, gauss(noise(ivy_particleShape.offsetZ)) * $intensity>>;

And this seems to work pretty good. So if for so reason anyone needs this, here is the solution i came up with.

CGTalk Moderation
08-08-2007, 10:37 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.