Possible to cache velocity at half resolution for volumes?

   2041   6   3
User Avatar
Member
117 posts
Joined: Feb. 2015
Offline
I'm working on a larger sim with 400 mil voxels and the total cache is 1TB large for 100 frames.
I have density and vel.
I wonder is it possible to reduce the file size somewhat? Compression maybe?

For example lower the resolution of vel to half resolution and then add it back later with the more high resolution density. I only use vel for motion blur.

Cheers,
Andreas
User Avatar
Member
53 posts
Joined: Feb. 2017
Offline
When the volumes come out of the DOP network you get them as native houdini volumes which is not always very efficient. You can convert the volumes to VDBs which can be sparsely populated. Merge the vel.* volumes with VDB vector to scalar, you could then also clip your vel VDB by the density to only save vel in areas where you actually have density coverage. Depending on your sim, this might reduce memory consumption quite a lot.
Technical VFX artist @ Housemarque / Sony Interactive Entertainment
User Avatar
Member
4512 posts
Joined: Feb. 2012
Offline
Check out Pyro Post Process SOP.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
User Avatar
Member
8539 posts
Joined: July 2007
Offline
in case you are using Pyro Solver SOP you can find the same options from embedded Pyro Post Process in Output Tab
- check Convert to VDB
- Use 16bit float
- and Resample Volumes, potentially Cull Volumes

since 19.5 you can also sim with half res velocity that can give you performance boost, but you would have to test for your case as the it would obviously change your simulation look a bit even though there are claims that for hi res sims the difference is acceptable
you'll find it here: Setup/Velocity Voxel Scale
Edited by tamte - Sept. 7, 2022 12:56:30
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
117 posts
Joined: Feb. 2015
Offline
tamte
in case you are using Pyro Solver SOP you can find the same options from embedded Pyro Post Process in Output Tab
- check Convert to VDB
- Use 16bit float
- and Resample Volumes, potentially Cull Volumes

since 19.5 you can also sim with half res velocity that can give you performance boost, but you would have to test for your case as the it would obviously change your simulation look a bit even though there are claims that for hi res sims the difference is acceptable
you'll find it here: Setup/Velocity Voxel Scale

Thanks guys, very helpful.
I realized why it was so slow. The simulation was 1.9 billion voxels. Interesting because the VDB resolution was only 400 million voxels but when I checked the pyro node it was 1.9. I was doing render tests at 2048x2048 with a smoke covering the full screen in Redshift and wanted to see the maximum resolution that would be meaningful. I struggle with simulating since it crashes Houdini about 60% in the simulation even though I have 256GB of RAM. It seems its just running out.

I found a tutorial that helped so I did these. Does it make sense? The files got a lot smaller.
- import pyrofields
- convertvdb. still 32bit float
- Primitive properties. In it I set VDB to Write 16bit floats.
- File cache

Velocity. I only use velocity for motion blur in Redshift, so I would think it does not have to be that highres.

This is an older simulation that I reuse so its not a SOP. I should probably convert it though. We often have old simulations we really like and keep reusing them so they are not always updated to the new cool methods.
User Avatar
Member
117 posts
Joined: Feb. 2015
Offline
All great suggestions. I will change to working with Pyro in SOP. Feels a lot finally to finally be in one place instead of jumping around.
I thought a bit about it and I realized I do not want the velocity grid to be lower resolution in the simulation. However when caching the final VDB to disk THEN I would like to lover the resolution of the vel grid since I only use it for motion blur. I would think that motion blur does not need to be that detailed, or?

1)
I'm thinking
1. Split out the vel property to another vdb.
2. Half resolution of vel vdb. Also would the vel not be possible to have in 8bit instead of 16bit? How can you convert that? I know how to convert to 16bit, but not sure about 8bit
3. delete vel in original vdb
4. Now cache both density and vel vdb to disk
5. merge them together
However this looks like it could be quite a bit slower, if the operations are slow may be too much pain.

2)
Also another question with motion blur. Is it possible to use several steps of attribute for the motion blur. I find that the motion blur is always very straight, while it would look nicer if it was more "bent" basically reading from more steps or even sub steps.

3) Another question. When you guys render for movies in say 2k. What resolution would you simulate the volume in if it will cover the whole screen? To me it seems like 1/3rd voxels will cover the resolution quite well with motion blur.
So if the render resolution is 2000 then a 700x700x700 voxel grid will be enough?

Cheers,
Andreas
User Avatar
Member
9 posts
Joined: Dec. 2015
Offline
If you're using the Pyro SOP, the Output tab might help you a lot:

[postimages.org]

Does all the nice stuff like convert to VDB, switch to 16bit half float, downsample vel field, ...
  • Quick Links