PDA

View Full Version : animated edge oriented "find target" function


petermannheim
05-14-2010, 11:14 AM
Hello everyone,

I'm using Particle Flow to animate a swarm of balls building different objects like a bottle, a shoe or a F1-car as seen in the example below.
http://www.bildbeweger.de/images/f1_particleflow.jpg
The car on the left side is animated via the "find target" function.
On the right side is the desired look via the "position object" function with the parameter "location" is set to "edges". As i know the influence of this function can not animated.

Now my question:
Is there any possibility to animate the particles like in the "Find target" function with the look of the "Position object" function?

Thanks for answering

Glacierise
05-14-2010, 12:33 PM
You can write the positions into the vector channel, then use that data in the find target. Use the search, you can find all about that.

petermannheim
05-14-2010, 01:09 PM
Hello Glacierise,

how do I write the positions into a vector channel?
The max-help confuses me more that it helped me.

here is the max file (http://www.bildbeweger.de/images/swarm_v132.max) (max8)

thanx

Glacierise
05-14-2010, 01:43 PM
Search here, in the pflow thread. It's been discussed many times :)

Piflik
05-14-2010, 04:12 PM
Allan McKay did a Video Tutorial (http://vfxsolution.com/allanmckay/2009/11/legacy-fx-tutorials/) about that...it's called 'Particle Flow Scripting: Particles Transform OBJ A>B'

petermannheim
05-14-2010, 07:08 PM
Hello Piflik and Glacierise,

great hints! The VideoTut by Allan McKay is awesome.

Thanx a lot

JohnnyRandom
05-14-2010, 09:37 PM
Hello Glacierise,

how do I write the positions into a vector channel?
The max-help confuses me more that it helped me.

here is the max file (http://www.bildbeweger.de/images/swarm_v132.max) (max8)

thanx

It is pretty simple, I have commented the script below:

on ChannelsUsed pCont do --Enable the channels you need
(
pCont.useVector = true --Use the Vector Channel
pCont.usePosition = true --Use the Position Channel
)

on Init pCont do () --this initializes, so anything that you want to do beforehand, like set variables, gather arrays, ect.

on Proceed pCont do --this is where the action happens
(
count = pCont.NumParticles() --Find the total amount of particles in the current event
for i in 1 to count do -- loop through every particle in the above variable 'count'
(
pCont.particleIndex = i --Current event particle Index is set to the integer 'i'
pCont.particleVector = pCont.particlePosition --Assign the current particles position to its Vector channel
)
)

on Release pCont do () --clean up a mess here, empty variables, arrays, ect. :)

CGTalk Moderation
05-14-2010, 09: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.