PDA

View Full Version : pflow standard tools-> particles find target by their grayscale texture map, how?


PiotrAdamczyk
06-15-2010, 11:09 AM
I needed the particles to travel from the icon to one object, for this i used find target (object), after that i have a lock bond node with force at 98% air/fluid dampening which lockes the particles to the object they found.

the particles fly to the object and are being locked with a slight dampening.

I would like the particles to find target and stick to it by its mapping, so that white areas would attract more particles and gray ones less.

The particles cant just pop out of the surface based on the mapping (like while having "position object by grayscale map" node "after find target"),

Bobo
06-15-2010, 03:31 PM
Here is one possible approach (Max 2010 file):

http://www.scriptspot.com/bobo/stuff/cgtalk/FindTargetByGrayscale_v001.zip

In short, you give birth of the particles, place them on the TARGET mesh first using Grayscale distribution in Position Object operator, then use a Script Operator to copy the Position channel into the Scripted Vector channel. Then you send out all particles to a second event where they get their actual start position using another Position Object operator.

Now you can set up the Find Target to use Point:"By Script Vector" without picking an object as target - each particle will fly to the point stored in the Script Vector channel seeded by the first Position Object operator. When the particle reaches the point, Lock/Bond it there as you did already.

If you had Box #3, you could also use two particle systems - one as target points generator, one as the actual system flying to these points.

PiotrAdamczyk
06-15-2010, 05:30 PM
thx for the help, and to think such a small script solves the problem...
i dunno why they didnt include such functionality to find target operator.

PS: i will definitely check out BOX plugins for pflow, i hear more and more about them but i never had time to see their full functionality. Which do you think is better, pflow with BOX 1 2 3 or Thinking particles? and which one require more programming knowledge?

Bobo
06-15-2010, 10:34 PM
thx for the help, and to think such a small script solves the problem...
i dunno why they didnt include such functionality to find target operator.

PS: i will definitely check out BOX plugins for pflow, i hear more and more about them but i never had time to see their full functionality. Which do you think is better, pflow with BOX 1 2 3 or Thinking particles? and which one require more programming knowledge?

Box #1 is now part of Max 2010 - the Lock&Bond is one of the operators that came from it.

Box #2 is PhysX dynamics, inter-particle collisions and a lot of cool stuff. Check out the videos available online, it is quite amazing.

Box #3 does what you need and is a form of "scripting" using a visual node-based language. It is quite similar to how Thinking Particles works.

TP is worth trying but it might go over your head. Check out Hristo Velev's (Glacierise) new DVDs if you want to jump into that.

I have two DVDs on using MAXScript to squeeze some new capabilities out of vanilla PFlow without any Boxes. Just a shameless plug. ;)

PiotrAdamczyk
06-16-2010, 12:16 PM
I've heard a lot about box2 and will be checking it as soon as i have some time. I've heard of your dvds, but when it comes to such material i imagine large pages of pure code in my head.....however, i am thinking about ordering the whole set, not only pflow ones, even if it's just for simple tasks like this one.

Thanks again for your quick reply

d0c
10-07-2010, 03:03 AM
Can this same effect be done in max 2009 without the lock/bond operator?

I am stuck using 2009 so I dont have the lock and bond :(

PsychoSilence
10-07-2010, 04:50 PM
box1 with lock/bond was part of the 2009 extension if i'm not mistaken.

CGTalk Moderation
10-07-2010, 04: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.