XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : particles: methods of evaluation at discrete times

12-13-2010, 08:04 AM
Hi all,

I have only a theorical ground with dynamics but got into MEL already.

I want to extract per particle motion data to an extent, before and after the frame being evaluated. That range may be arbitrary and cover multiple frames "back and forth", with an arbitrary number of points of interest in-between.

For the camera I got around the "rotate pivot not being an attribute" using snapshot nodes, what would your suggestion(s) be for particles ?

12-13-2010, 02:03 PM
is this for motion blur?

12-13-2010, 03:10 PM
it is, indeed. This data will be used outside of Maya.

Ok, it seems to me that caching particles is probably the broadest way. Given that I'm experienceless on dynamics I'd take any advices, do's and dont's.

And eventual alternatives as well.

12-13-2010, 04:08 PM
yes, cache them, use dyn-export, in mel, just make sure you use pdc as the format if ur using data in maya

the other formats are ascii and binary i think, normally used for pipeline.


12-13-2010, 04:44 PM
I will look into the dynExport command, thank you lightcache :)

I'm not caring about the format Maya will use to give me access to the data, I don't mean to parse the cache files by my own means. My point is to use Maya for this.

How to query the dataset, what would the counterpart be for dynExport (cacheFile?) ? Sorry about the dumb question, dynExport is not queryable.

How about a dynExpression ?

Edited the post alot, I'm done :)

12-13-2010, 04:59 PM
As for the particles you could use something like:

global proc vector[] getPositionAtFrame(int $frame, int $partId) {
currentTime -edit $frame;
$count = `particle -ct particleShape1`;
if ($partId>=0) {
$range = $partId;
} else { $range = "0:"+$count; }
vector $curPos[] = `getParticleAttr -at position -array true particleShape1.pt[$range]`;
return $curPos;

That should return the position of the queried particle on the queried frame (if its cached).
Then all you need is to query the frames you want and the particles you want.


12-13-2010, 06:06 PM
Okay, I see where I am going now. Thank you guys !

CGTalk Moderation
12-13-2010, 06:06 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.