PDA

View Full Version : Cache re-Time with Maya Fluids?


tokanohanna
05-21-2010, 01:56 AM
So I have a simulation of 100 frames that is cached. What I would like to do is re-time the cache utilizing the Trax Editor. I know Ncloth can be re-timed without any hickups or stepping, and it works great using the Trax Editor. When I tried the same approach with fluids it doesn't run as smooth as I would like. Is there a better way to re-time fluids? Or am I just stuck with having to adjust my simulation scale rate? :sad:

andybyrne462
05-21-2010, 02:48 AM
You can always scale the cache in the cache attributes. Scale it down from 1 to .5 to make it run faster etc. Limited, but has saved me in some cases.

johnnymr75
05-21-2010, 03:08 AM
You can always scale the cache in the cache attributes. Scale it down from 1 to .5 to make it run faster etc. Limited, but has saved me in some cases.

I usually cache it at .5 per frame, render at 60 frames per second instead of 30, then do my time remapping in the compositing stage.
setting up the cache to .5 a second will fill in extra fluid calculations for every half frame instead of every frame.

andybyrne462
05-21-2010, 03:39 AM
Just use Fume. ;)

tokanohanna
05-21-2010, 04:55 AM
Just use Fume. ;)

Hey Andy,

Lol....tell me about it....I use fume here at work along with Maya. Sam has got us all set up. Using Maya at home I ran into this problem. The scaling works to a certain extent, but once you scale pass a certain threshold, you run into some stepping problems. Thanks for the help. I'm sure the next iteration of Maya will have a re-time feature.

viki164
05-23-2010, 07:37 PM
what amount of scaling u r doing wayne? I never tried more than 400 % of retiming/scaling the cache but within 400 % it gave me smooth results. I also managed to make a loopable fire sim with the help of trax editor .
if trax isnt giving u a good result then can u test with the old school way of retiming like breaking its current time node?
though I feel in theory it`s a same method of scaling but u can give a try & let us know if it all works for u.
best,
Vik

hkspowers
05-24-2010, 06:01 PM
I am currently working with scenes here at work where I have my cache scaled to 2,000 % and it still runs smooth. I have another scene that is scaled to 6,000 % and I also noticed the stepping but a sub sample of .5 seemed to do the trick. I warn though that sub sampling does change the way your sim will look.

Also a side note ( nParticles seem to not be able to scale smoothly at all).

tokanohanna
05-24-2010, 06:41 PM
Hey Vik,

I am scaling 300%. But no oversampling.....I think that may be the trick. The calculations between frames should be taken into account once I scale the cache up eliminating the stepping.

Thanks for the reply Hks....6000%? That's nuts. Going to give it another go and see if I get some nice results.

hkspowers
05-24-2010, 06:45 PM
Hey Vik,

I am scaling 300%. But no oversampling.....I think that may the trick. The calculations between frames should be taken into account once I scale the cache up eliminating the stepping.

Thanks for the reply Hks....6000%? That's nuts. Going to give it another go and see if I get some nice results.

Hahah I know, but they keep telling me slow it down more, slow it down more. Pretty soon it's going to look like a still image.:p

Duncan
05-26-2010, 01:15 AM
It helps to realize that the interpolation done by the fluid caching is interpolating the grid values( such as density ) as opposed to the render opacity. There can be a highly non-linear relationship between density and opacity of the fluid. Lets say a density of .8 is very opaque and .7 is nearly transparent(an extreme case).. One could have a moving front of density that is .8 and quite opaque. If we interpolate as frame this front of density will blend with a zero density region and the result will be 0.4, which is fully transparent. Thus the interpolated frame may appear roughly the same as the first frame, or even have less density overall. The result then causes a pulsing effect. If instead the density values roughly mapped uniformly to opacity values then the interpolation would be relatively smooth. However most fluids tend to have lower transparency, and also frequently have thresholded opacity graphs. (perhap some day we will modify the interpolation code to attempt to interpolate the density based on the resulting opacity, although it is tricky, especially if the opacity graph is not the default setting)

At any rate you can cache with a smaller "evaluate every" value. As long as "save every" is 1 then you will have more simulation frames and not need as much interpolation.

Unlike fluids and nCloth, nParticle caching currently does not interpolate between frames but rather steps, so speeding up generally works better than slowing down.

Duncan

tokanohanna
05-26-2010, 03:24 AM
It helps to realize that the interpolation done by the fluid caching is interpolating the grid values( such as density ) as opposed to the render opacity. There can be a highly non-linear relationship between density and opacity of the fluid. Lets say a density of .8 is very opaque and .7 is nearly transparent(an extreme case).. One could have a moving front of density that is .8 and quite opaque. If we interpolate as frame this front of density will blend with a zero density region and the result will be 0.4, which is fully transparent. Thus the interpolated frame may appear roughly the same as the first frame, or even have less density overall. The result then causes a pulsing effect. If instead the density values roughly mapped uniformly to opacity values then the interpolation would be relatively smooth. However most fluids tend to have lower transparency, and also frequently have thresholded opacity graphs. (perhap some day we will modify the interpolation code to attempt to interpolate the density based on the resulting opacity, although it is tricky, especially if the opacity graph is not the default setting)

At any rate you can cache with a smaller "evaluate every" value. As long as "save every" is 1 then you will have more simulation frames and not need as much interpolation.

Unlike fluids and nCloth, nParticle caching currently does not interpolate between frames but rather steps, so speeding up generally works better than slowing down.

Duncan


Thanks for the reply Duncan. This is extremely helpful information.

Imshadi
10-29-2010, 07:23 PM
It helps to realize that the interpolation done by the fluid caching is interpolating the grid values( such as density ) as opposed to the render opacity. There can be a highly non-linear relationship between density and opacity of the fluid. Lets say a density of .8 is very opaque and .7 is nearly transparent(an extreme case).. One could have a moving front of density that is .8 and quite opaque. If we interpolate as frame this front of density will blend with a zero density region and the result will be 0.4, which is fully transparent. Thus the interpolated frame may appear roughly the same as the first frame, or even have less density overall. The result then causes a pulsing effect. If instead the density values roughly mapped uniformly to opacity values then the interpolation would be relatively smooth. However most fluids tend to have lower transparency, and also frequently have thresholded opacity graphs. (perhap some day we will modify the interpolation code to attempt to interpolate the density based on the resulting opacity, although it is tricky, especially if the opacity graph is not the default setting)

At any rate you can cache with a smaller "evaluate every" value. As long as "save every" is 1 then you will have more simulation frames and not need as much interpolation.

Unlike fluids and nCloth, nParticle caching currently does not interpolate between frames but rather steps, so speeding up generally works better than slowing down.

Duncan

I tried creating the cache by oversampling. I need my fluid to look big and slow, 5 times as slow as it is now, so my cache creation sampled the fluid every 0.2 of a frame. However, the fluid changes completely. The diffusion becomes large and the detail blurs and vanishes, it looks more like ink in water and not like smoke from an explosion. So, if the diffusion gets stronger the more you sample the fluid, I thought I would reduce the diffusion by to one fifth, but still no joy.

My question is: If I can't make time run slower, can I at least manipulate the scale of the fluid so that it thinks it's bigger and moves more slowly? Is there a control to override the scene scale or do I have to do it by actually scaling up the fluid?

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