PDA

View Full Version : TP - access properties of individual parametric objects/particles?


lightdog
11-09-2008, 11:27 PM
A thinking particles/xpresso question:

Is there a way through xpresso to access the properties of parametric objects after they have been assigned to particles?

For example, you assign a Capsule object to a PShape node, which is connected to a PStorm node. Now you want to access the Capsule's Height property for each individual particle, and have that height property be affected by that particle's Velocity. (Simply scaling the particle/object using a PScale node doesn't achieve the desired result in this case, since the rounded end caps of the Capsule object are stretched as well).

Connecting the Capsule's Height property to a PGetData node affects ALL capsules simultaneously (which is to be expected, since you are affecting the Particle Geometry Source, and not each individually generated instance).

Many thanks in advance for any insight into this.

Cinemike
11-10-2008, 04:24 AM
Simply animate the parameters over time.

CU
Michael

Sneaker
11-10-2008, 09:12 AM
if you exactly know how many particles you'll have in your scene,
you could create as many capsule objects as particles. Use a Xpresso setup to
bind the capsules position and rotation to a particle.
Now you have parametric objects and full control over them.
You need of course make them visible invisible when particles are born or die.

-Michael

Darter
11-10-2008, 01:32 PM
Along the lines of Sneaker's suggestion, here's a setup which assigns one of 4 different-sized capsules to each particle based upon its speed.

Spekulatius
11-10-2008, 06:53 PM
Simply animate the parameters over time.

CU
Michael
This would be also my prefered way: Animate your shape and simply change the age of each particle depending on its speed.

Jochen

sandidolsak
11-10-2008, 07:15 PM
Spekulatius :applause:

Love the simplicity! This trick is awsome, too bad it doesnt work with materials thou...

lightdog
11-11-2008, 12:03 AM
Thanks Spekulatius, that's a great workaround. Much appreciated. Still curious if it's possible to access the parametric properties of each particle geometry object directly, after they have been assigned to a thinking particle?

lightdog
11-11-2008, 10:02 PM
Thanks Darter,

I checked out your setup - that condition node sure is handy. Your setup only influences the particle shape on birth, which is cool. I'm looking to influence a particular parameter of the shape along the entire life of the particle.

Spekulatius,

further exploration of your idea yields an interesting roadblock. Using speed to control the Age (and thus the length) of a particle appears to make a PSize node and its Age Gradient useless, since the "Age" of a particle is being continually modified.

Darter
11-12-2008, 01:08 AM
This seems to work...

Each particle's creation frame is stored in a Data Channel at birth. Subtracting this value from the current frame gives the age of the particle. The X-Manager evaluation order must be: PSetData 1, PSize, PSetData 2.

http://www.isopogon.com/agetrick_modified.jpg

Spekulatius
11-12-2008, 08:55 AM
further exploration of your idea yields an interesting roadblock. Using speed to control the Age (and thus the length) of a particle appears to make a PSize node and its Age Gradient useless, since the "Age" of a particle is being continually modified.

Darterīs idea of changing the age twice per frame is really good.
My suggestion for the problem of the lost "age"-value would be to try to rebuild age-depending nodes like PSize or the natural dying of particles... but I think darterīs solution is here much more practicable.

@angeluSlo:
Yes, the limited use of animated materials on particles is REALLY a nasty problem in TP, in my opinion.

Darter
11-12-2008, 10:54 AM
Thanks Spekulatius, I've learned a lot from your speed-controlled particle Age approach. As well as shape object parameters, this apporach works for materials using animated texture tags as mentioned by Srek in the particle colour thread. (The effect only shows when the particles are rendered.)

CGTalk Moderation
11-12-2008, 10:54 AM
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.