PDA

View Full Version : nParticle Output Mesh - Cacheable?


aghawa
04-01-2010, 07:46 PM
Hi there, i'd like to know if there is a way to "cache" somehow a Polysurface mesh, the result of the Convert nParticle to Polygons operation.
I ask this because i'm working on a shot where i need pretty fast feedback from the scene, and i'd like to run the sim (cached nParticles) and see the output mesh pre-calculated (and, well, cached?). In his actual state, the shot takes like more than half an hour to produce a playblast (and that's only because of the calculation needed to mesh the particles) and i find it not acceptable.

So, maybe there is somewhere a "geometry cache" thing i'm not aware of? :cry:

Thanks :beer:

Aikiman
04-01-2010, 11:24 PM
Sorry theres no way I know of unless some studio has made a hack. Apparently this is all fixed up in Maya 2011.

wrend
04-02-2010, 06:56 AM
Bit hard for the cache to know what to do about changing numbers of points/topology? But this isnt to say that the results of the mesh calculation shouldn't be storable by another means (2011 has a method? cool)... what I do now, simply is to duplicate the mesh each frame during 'calculation caching run', then have an expression that just flips the duplicates visibility on and off based on the frame they were duplicated. Gotta store all the point information anyway, so it probably wont be much diferent than whatever cache method they've come up with.

Aikiman
04-02-2010, 07:48 AM
good idea.

sethfair
04-02-2010, 04:08 PM
wrend, your process sounds interesting. Are there significant speed improvements doing it this way?

wrend
04-03-2010, 01:42 AM
Yep... you turn the calculation of the mesh off, so the only thing that is happending during playback is flipping the visibility of mesh objects on and off.... the only thing that'll be slowing you down is the poly count on your meshes, and of course it'd take yonks longer to recalculate those than to just display them.

aghawa
04-03-2010, 01:47 AM
Right. That's a cool method, thanks man, i think i'll script something to do that automagically. Good news that it's automatic in Maya 2011 anyway!

PolyMangler
07-13-2010, 08:05 PM
Right. That's a cool method, thanks man, i think i'll script something to do that automagically. Good news that it's automatic in Maya 2011 anyway!

in case you don't have 2011 or your needs are more urgent, here is a quick script i wrote to automate this...set the start and end frames in the variables and then select the mesh you want to cache

int $start = 0;
int $end = 380;
int $cnt;
$sel = `ls -sl`;
for($cnt =$start;$cnt <($end+1);$cnt++){
currentTime $cnt;
$curDup = `duplicate $sel[0]`;
setKeyframe -t ($cnt-1) -v 0 -at visibility $curDup;
setKeyframe -t $cnt -v 1 -at visibility $curDup;
setKeyframe -t ($cnt+1) -v 0 -at visibility $curDup;
}

....warning: this method is brutal on the ram usage

Derek Wolfe
07-13-2010, 08:24 PM
Keep in mind, the results of this will likely not render motion blur, but as a playblast-only solution, it sounds good.

CGTalk Moderation
07-13-2010, 08:24 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.