Caching Volumes

   4634   3   2
User Avatar
Member
12 posts
Joined: 1月 2006
Offline
I have a number of volume clouds that are not moving.

Is there a way to cache the volume information, so Houdini doesn't have to run all the intensive calculations on each frame?

The volumes are generated from metaballs with the volume shader based on the heavy smoke example. These use rendered bgeo files for the metaballs and the only thing moving is the camera.

I can cache the shadow maps and that seems to work OK, but it just seems there should be a way to cache the volume info, too.

Any help would be greatly appreciated.

Thanks

kj
User Avatar
Member
186 posts
Joined: 1月 2006
Offline
AFAIK you can place down a Geometry ROP and write out the frame(s) needed. Be sure to set it to a SOP that contains your Volume (i.e. isooffset etc.) and export as BGEOs.

Then, read in that Volume in a file SOP. Should be much quicker.

cheers.
User Avatar
Member
12 posts
Joined: 1月 2006
Offline
Yeah, I'm not sure what I need is something that can be done.

The volume is only generated at render time by the shader. I've already saved the bgeo of the metasurface that is used for the volume and I'm using cached shadow maps, so I may be as optimized as I can get.

It's down to 7 minutes a frame at 720P with about a dozen different volumes in the frame, so that's probably about as good as it's going to get.
User Avatar
Member
12528 posts
Joined: 7月 2005
Offline
The only (convoluted) approach I can think of is you modify the cloud shader and add in a pcwrite() call and export P and density (or even the resultant illumination if your clouds and lighting is not animated) to a point-cloud.

The trick now is to somehow get this cloud into a regular point grid with as little fidelity loss as possible for conversion into an .i3d by i3dconvert (which can convert volumetric data to- and from regular grids of points). I would think a viable approach might be to load the pointcloud into Houdini, detect the bounds, fill it with a grid of points to match the resolution of point cloud, and maybe attribtransfer the density/illum data from the pointcloud. Now this pointcloud gets converted into an i3d, with which you can render.

Its not too easy- but fun I guess there are many ways to transfer to the regular grid and it'd be good to develop a fast and accurate way to do it. I'm sure the best method would be some specialized C code standalone, or perhaps SESI can easily extend the i3dconvert utility to sample into a sparse pointcloud.

Or, have a mode in Mantra (like the shader unwrapping feature) to bake out volumes…
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
  • Quick Links