Jump to content

Dynamic retiming of volume simulation


dark_cry

Recommended Posts

Hi, i want to retime simulated smoke. I got some idea to do it dynamically. I have density and velocity fields. I'm trying to readvect the existing density with existing velocity with more substeps and changing the timescale of advect field microsolver. But i'm weak in microsolvers and can't realize the starting point. So if i import density and vel fields from cached sim, then make other density field and advect by cached vel with some different timescale and more substep, theoratically it should work. Would really appriciate any suggestion and help.

Link to comment
Share on other sites

You can use a Timeblend node and then timewarp on a cached sim if you are not using the dynamic resize node. (if you just want to slow down a cached sim for example)

If you have a cached sim that used dynamic resizeing the timeblend node wont work.

Here you can copy the density+vel+other fields to a new volume with fixed boundaries that has same div size as the simulation had. This can be done with a volume sop and volume merge sop set to "copy" for example.

You just need to make sure the new volume boundary is as big as the max bounding box of the cached sim over time to not loose any detail.

The calculation of the bounding box for the new volume could be automated with a foreach sop using "each number" and set number range to your simulation framerange and then in the foreach node use a box sop with a couple of point sops to compare the bounding box of the simulation each frame to your box. Or using the Solver node to "evolve" the box would work in the same way :)

Edited by Magnus Pettersson
  • Like 1
Link to comment
Share on other sites

You should look at the gas upres node, it now also has settings to retime a sim, much like you are suggesting by re-advecting. There is an example at the bottom of the help page: http://www.sidefx.com/docs/houdini12.1/nodes/dop/gasupres

Last time I tried it in sops with a timeblend node, it was just blending the values of a voxel over time, I did not love the look, but it is much easier, so it is an option ig you can get away with it.

Cheers,

Koen

Link to comment
Share on other sites

  • 2 weeks later...

retiming fluids is always complicated. speeding fluids up is much more easier. for slowing you need complex calculation to get proper "inbetween" frames.

slowing down just with simple linear interpolation--> you will get stepping / wired motion.

in one of my last production we had 2 different method/tools for slowing fluids down. its takes extra calucation time, it was always limited and/or losing a lot of resolution.

Link to comment
Share on other sites

I did it with help of custom solver that just advected density by baked velocity field. So you can make linear interpolation by advect for 1/n where n is retime multiplier.

You mean just import cached density and vel fields, then reimport it in new dop, advect cached vel with cached density? and 1/n is value of timescale in advect fields microsolver? would it be right way to advect in subframes? I tried with several ways but i can't catch the right values for subframes...

Link to comment
Share on other sites

I did it with help of custom solver that just advected density by baked velocity field. So you can make linear interpolation by advect for 1/n where n is retime multiplier.

I mean, e.g making if i want retime 3 times in dops, and advect cached density by cached vel, and advect it with some timescale value only in subframes and don't touch in frames and write $SF... i did something ($FF-floor($FF)) for timescale of advect fields the result is kinda retimed but there sum flicks:(

Link to comment
Share on other sites

Yes yes I mean same same.

You have to advect by original vel field. For example for 3 times slowly:

-advect original density by vel field with step 0.3333

-save density

-advect original density by vel field with step 0.6666

-save density

the step may be multiply of vel or timestep

Link to comment
Share on other sites

Yes yes I mean same same.

You have to advect by original vel field. For example for 3 times slowly:

-advect original density by vel field with step 0.3333

-save density

-advect original density by vel field with step 0.6666

-save density

the step may be multiply of vel or timestep

That means that the advection occurs only on subframes, but on integer frames the advection timescale will be zero? Am i right? Actually i did so, almost i get some results, but only thing i can't realize how to interpolate cached density in subframes. In my setup i just import it with gas match field...My only problem is flicking because of the interpolation of sourcung cached density:(( Really appriciate your reply.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...