Jump to content
gramx

Is it possible to up-res the new sparse pyro solver??

Recommended Posts

Hi,

Loving the speed of the new sparse solver in Houdini 18. I have a job where I have a medium res simulation and I need to upres it for final render without the motion changing to much. I would usually use the Up-Res shelf tool to set this up, but have found it doesn't accept the sparse solver as a source. Is it possible to manually set these up, has anyone tried it?

Thanks

Graham

Share this post


Link to post
Share on other sites
4 hours ago, gramx said:

Hi,

Loving the speed of the new sparse solver in Houdini 18. I have a job where I have a medium res simulation and I need to upres it for final render without the motion changing to much. I would usually use the Up-Res shelf tool to set this up, but have found it doesn't accept the sparse solver as a source. Is it possible to manually set these up, has anyone tried it?

Thanks

Graham

Hey Graham!

I think is all about to update the up-rez pipeline to make it sparse. I think is not that hard to do it!

Cheers!

Alejandro

Share this post


Link to post
Share on other sites

just did this today.. cached out vel and piped it back into a dop net with upres solver. but build it up from scratch

Share this post


Link to post
Share on other sites

Thanks for the replies, good to know that it can be hooked in to the regular upres solver. I will give it a go.

Edited by gramx

Share this post


Link to post
Share on other sites

you can also duplicate your DOPnet and disable everything related to vel since you copy it from the loweres sim
eg: forces/buoyancy/vel advection/projection
then just copy "compute turb","ramp turbscale","primary noise" from the gasUpres solver and you get a sparse upres.
https://vimeo.com/388758247

  • Like 5

Share this post


Link to post
Share on other sites
On 02/02/2020 at 1:57 AM, bunker said:

you can also duplicate your DOPnet and disable everything related to vel since you copy it from the loweres sim
eg: forces/buoyancy/vel advection/projection
then just copy "compute turb","ramp turbscale","primary noise" from the gasUpres solver and you get a sparse upres.
https://vimeo.com/388758247

Thanks for the tip :)

Share this post


Link to post
Share on other sites
On 2/2/2020 at 3:57 AM, bunker said:

you can also duplicate your DOPnet and disable everything related to vel since you copy it from the loweres sim
eg: forces/buoyancy/vel advection/projection
then just copy "compute turb","ramp turbscale","primary noise" from the gasUpres solver and you get a sparse upres.
https://vimeo.com/388758247

Thank you Bunker, A simple hip would be great if it's possible.

Share this post


Link to post
Share on other sites

@iosif I'm making a small tutorial about it now, a hip file wouldn't explain much, there are quite a few steps...

  • Like 5

Share this post


Link to post
Share on other sites

Hi folks !

I am working on a sparse pyro upres on my 'sparse' time (lol). I tryed to automate as much as possible the process by normalizing inputs and coding a python script that copy and paste all the params of the lowres simulation to the upres node. So the only thing to work with after matching params from the script is the noise / dissipation of the upres.

I added a hip with hda in the link. The hip is annoted to guide you through the process.

https://drive.google.com/drive/folders/1H4Y0HNELDJ6lmHsM43eEI_lRgNuCEaxX?usp=sharing

 

the pipeline is fairly simple :
1. add a configure input node, it will merge all inputs from low res sim and source to normalize and rename fields

2. add the sparse pyro upres node

3. In the tab match properties of the upres node drag the lowres pyro and click match properties

4. enjoy

The sparse solver itself is a deeply modified sparse pyro where you basicly cancel all nodes relatives to vel advection / projection and import the vel from the lowres in copy mode. Then you can add your sources (without the vel or v sourcing since it has already been calculated in the lowres) and add some noise. Since vel is in copy your noise won't last in the sim so i created a noise channel in the smoke object that is advected by the vel and merge to the vel.

You can also simulate your low res without color and add color to your upres source and simulate an upres with color, it only needs a Cd and Alpha channel.

  • Like 2

Share this post


Link to post
Share on other sites
On 07/05/2020 at 6:18 PM, k2p8 said:

Hi folks !

I am working on a sparse pyro upres on my 'sparse' time (lol). I tryed to automate as much as possible the process by normalizing inputs and coding a python script that copy and paste all the params of the lowres simulation to the upres node. So the only thing to work with after matching params from the script is the noise / dissipation of the upres.

I added a hip with hda in the link. The hip is annoted to guide you through the process.

https://drive.google.com/drive/folders/1H4Y0HNELDJ6lmHsM43eEI_lRgNuCEaxX?usp=sharing

 

the pipeline is fairly simple :
1. add a configure input node, it will merge all inputs from low res sim and source to normalize and rename fields

2. add the sparse pyro upres node

3. In the tab match properties of the upres node drag the lowres pyro and click match properties

4. enjoy

The sparse solver itself is a deeply modified sparse pyro where you basicly cancel all nodes relatives to vel advection / projection and import the vel from the lowres in copy mode. Then you can add your sources (without the vel or v sourcing since it has already been calculated in the lowres) and add some noise. Since vel is in copy your noise won't last in the sim so i created a noise channel in the smoke object that is advected by the vel and merge to the vel.

You can also simulate your low res without color and add color to your upres source and simulate an upres with color, it only needs a Cd and Alpha channel.

Thanks for sharing this :)

 

Share this post


Link to post
Share on other sites

Hello. @k2p8

This is a basic question...

I'm not sure what upres do.

Does it change low resolution to high resolution?

If anyone knows, let me know.

Thanks if you let me know.

Share this post


Link to post
Share on other sites

Hi @eunchae,

The basic principle of an upres is to make a new simulation with a pre-existing velocity grid that you use to drive a new dye (density / temperature).

Your new simulation should have smaller voxels and parameters close to the lowres (like temperature diffusion, flame amount, time step) if you want this new version to be close to the lowres. You then copy the lowres velocity and simply advect the upres by it. This way you only perform heavy computation like divergent free velocity (ensure the conservation of the mass of the fluid) and the boundary collision on the lowres, the upres solver only has an advect for the density / temperature / ect. all other nodes relative to velocity enforcement / computation are deseabled which allow you to quiclky compute the upres and skip all the heavy parts.

Then you can add a little amount of noise with an add operation to the copyed lowres velocity to give more details to your upres. This small amount is almost divergent free on a large scale so it should not be a problem. You can add any forces at this process in the upres, but, the divergent free velocity node being desabled, only already divergent free forces should be added. Otherwise your smoke will compress into itself. And you should only add forces that do not push your upres smoke to far from the lowres, since you simply copy the lowres velocity, no new velocity will be computed outside of this bounds. So, for example, adding a wind, which is divergent free, is not a good option since your smoke will crash into the bounds of the lowres.

There is some parameters that do not scale well with the upres, usually it is all parameters or operations that need neighbours voxels to be performed, like temperature diffusion. Since you change the size of the voxels, those operations have an overall result which is generaly not the same as the lowres. You could correct that by sampling the lowres version of the simulation and modify the output value, but you lose a lot of details by doing so. So in this case, it is better to slightly twik the upres simulation to perform better, by increasing or reducing the corresponding parameters. 

  • Like 1

Share this post


Link to post
Share on other sites
On 2020. 11. 9. at 2:49 AM, k2p8 said:

Hi @eunchae,

The basic principle of an upres is to make a new simulation with a pre-existing velocity grid that you use to drive a new dye (density / temperature).

Your new simulation should have smaller voxels and parameters close to the lowres (like temperature diffusion, flame amount, time step) if you want this new version to be close to the lowres. You then copy the lowres velocity and simply advect the upres by it. This way you only perform heavy computation like divergent free velocity (ensure the conservation of the mass of the fluid) and the boundary collision on the lowres, the upres solver only has an advect for the density / temperature / ect. all other nodes relative to velocity enforcement / computation are deseabled which allow you to quiclky compute the upres and skip all the heavy parts.

Then you can add a little amount of noise with an add operation to the copyed lowres velocity to give more details to your upres. This small amount is almost divergent free on a large scale so it should not be a problem. You can add any forces at this process in the upres, but, the divergent free velocity node being desabled, only already divergent free forces should be added. Otherwise your smoke will compress into itself. And you should only add forces that do not push your upres smoke to far from the lowres, since you simply copy the lowres velocity, no new velocity will be computed outside of this bounds. So, for example, adding a wind, which is divergent free, is not a good option since your smoke will crash into the bounds of the lowres.

There is some parameters that do not scale well with the upres, usually it is all parameters or operations that need neighbours voxels to be performed, like temperature diffusion. Since you change the size of the voxels, those operations have an overall result which is generaly not the same as the lowres. You could correct that by sampling the lowres version of the simulation and modify the output value, but you lose a lot of details by doing so. So in this case, it is better to slightly twik the upres simulation to perform better, by increasing or reducing the corresponding parameters. 

Oh my god... I was impressed with your kindness. It has helped me a lot. Thank you very much!!

Share this post


Link to post
Share on other sites
On 2020-11-07 at 3:58 AM, eunchae said:

Thanks for sharing. Is it part2 too?

I've been a bit too busy to work on Part2 just yet, but feel free to ask questions here.

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×