Carving up geometry using voxels

   14690   8   3
User Avatar
Member
86 posts
Joined: Sept. 2008
Offline
In the Killzone 2 case study they mention a process (Waves of Destruction) where a volume is:

- an object is converted to a volume primitive
- cut up into voxel chunks using a “VEX volume shader”
- the chunks are converted back to polygons
- the original object is divided by transferring chunk id attributes from the internal voxel chunks
- a Foreach Sop is used to loop through all chunks and stitch them to the corresponding bits of original geometry

Are there any examples about which might help me to understand these steps? Use of a shader for a geometry operation seems unusual to me. Handling of the UV coordinates is also of interest, though it doesn't seem to be described in the article.

thanks!
I installed a skylight in my apartment… the people who live above me are furious!
- Steven Wright
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Search out johner's fracture tools at OdForce. They use a similar approach to fracturing geometry.
There's at least one school like the old school!
User Avatar
Member
86 posts
Joined: Sept. 2008
Offline
Is it this one: http://forums.odforce.net/index.php?/topic/9119-voronoi-dynamic-location-based-fracture-wip/page__hl__johner%20voronoi__fromsearch__1 [forums.odforce.net] ? I had this flagged for further investigation, but the first post says his favorite feature is that it stays away from the Cookie SOP and volumes so i assumed it was significantly different from the Killzone approach, though they are both handling fractures. A volumetric approach seems like it might be better suited for materials with internal heterogeneity, like strong-grained wood, but if there is a simpler/better way i'm all ears .
I installed a skylight in my apartment… the people who live above me are furious!
- Steven Wright
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Voronoi Fracture is the method you want to use.

I believe Ben Schrivers at Guerrilla Games used his own method that is very similar to the voronoi fracturing tools built by John Lynch. Whether you use cookie/booleans or Clip and Clip Random Edge SOPs, you are still dicing up the geometry. How you drive those plane positions can be defined by volume look-ups. No need to worry about this though. It's nicely wrapped up for you in John Lynch's Voronoi Fracture SOP.

Download the various files near the end of the thread link you provided and yes that is the correct link.

The Voronoi Fracture SOP is real simple to use. The SOP doing the fracturing has a few inputs. The first is the geometry to shatter. The second input takes the points that become the shatter centers. You can individually place those points and move them around while previewing the shatter result so is highly direct-able.

It's all in how you scatter the points.

If you are fracturing a grid, just scatter say 5 points on it and then feed the grid in to the left input of the voronoi fracture and the points in to the middle input and you have a shattered grid.

If you are fracturing a box, you can scatter points on the surface and in the interior of the box. To scatter points inside an object just use an Iso Offset SOP set to fog volume then append a scatter SOP to that. Cut down the number of points to something reasonable (10 or more) and merge the surface scattered points with the interior scattered points and feed that in to the Voronoi Fracture SOP and you will get interior fracturing. Just feed in the surface points gives you a more shard-like fracturing. Passing in both surface and interior points gives you more of a rubble fracture setup.

Again it's all in how creative you get with the shatter points.

As for the uv's, it's really up to you how it ultimately gets sorted but the Voronoi Fracture SOP has it's own methods. First become familiar with Houdini's SOPs in general (if you haven't already) then study the Voronoi Fracture SOP HDA. You will see that there are several For Each SOPs, a few VOP SOPs, one even indexing in to a generated volume and more.
It's all there.

—-

Use of the text “shader geometry operation” is marketing speak as non-Houdini users would not know what VEX/VOP SOP means.
I know this as VEX and VOPs. I use the Houdini acronyms because they have worked for over many years.
You can use VOPs or Vector Operators to build up data processing networks. Modify geometry by moving points around by a turbulent noise VOP and more.
Whether that VOP network is modifying SOPs (geometry), COPs (composite image), mantra surface shader, renderman displacement shader, the logic is all the same but the context differs. VOPs is unique to Houdini in it's scope (the data types it can modify): SOPs (Geometry), POPs (Particle Operators), COPs (composite operators), CHOPs (Channel Operators), SHOPs (all components are supported: displacement, surface, fog, light, etc). It is even extended to support run-time Mantra procedurals via CVEX (look at Fur CVEX support).

H10 introduces Volume VOPs in SOPs that allow you to modify volumes cell by cell.

It's similar to the hack in Maya where you can use the hypershade to build up mathematical expressions you can then reference on object attributes. With VOPs you have tremendous control in a properly supported method.
There's at least one school like the old school!
User Avatar
Member
86 posts
Joined: Sept. 2008
Offline
Thanks! I will dig into this component further… it looks quite interesting.
I installed a skylight in my apartment… the people who live above me are furious!
- Steven Wright
User Avatar
Staff
809 posts
Joined: July 2006
Offline
I actually did some experimentation with Volume based fracturing before deciding on a geometric approach. The nice thing about volume fracturing is you can manipulate it in all kinds of ways and get arbitrarily noisy surfaces out of it. The downside is you have to build a high-quality volume representation of the object you want to fracture, usually as a Signed Distance Function. Also, once you've converted to a volume and fractured, you need to convert back to a polygonal representation that's not insanely dense, and map the UV's and any other attributes back on, which can get tricky as well.

While Houdini has nice tools for all of this, to maintain detail you really need very high resolution volumes, which gets expensive in a hurry in memory and processing time (doubling the resolution means 8 times more memory and processing).

If you're dealing with more straightforward geometry like walls and columns, you might get away with lower res volumes. But for high-res you start needing a more specialized toolkit. I don't have any experience with it, but apparently Digital Domain has a volume-based fracturing toolkit called “Cracktastic”. You can read a short sketch of it here. [ken.museth.org] They describe using resolutions up to 8000^3 (!).

There was also a talk given at Siggraph ‘09 by one of the guys from Guerrilla Games about how they used Houdini in Killzone2 that touches on the volume fracturing and other interesting things. The talk is called “Houdini in a Games Pipeline”. If you’re interested, you can get it for about ten bucks from http://encore.siggraph.org [encore.siggraph.org]. Just browse 2009 and search for “Houdini”.

Jeff gave some great advice on ways to scatter points to feed to the Voronoi Fracture SOP, which hopefully will give you the control you need.

There's also some examples in that thread of using the output of that SOP with the Cookie SOP as well, i.e voronoi-fracturing the bounding box of the object with noisy interiors, then cookie intersecting the result with the original geometry.

If you're interested in what a Volume-based Voronoi fracturing might look like, I'm attaching a somewhat cleaned-up version of some early experiments I did. It's not terribly fast, especially as you increase the resolution of the volume, but looking at the Volume VOPs there might give you some ideas. There's one in there that will turn the object into a shell using some basic SDF math, and then the one that generates each (possibly noisy) Voronoi cell.

Attachments:
volume_fracture.hip (189.0 KB)

User Avatar
Member
86 posts
Joined: Sept. 2008
Offline
Thanks johner. I think i understand the reasoning behind the decisions that you and Jeff have made and for what it's worth given my limited knowledge of Houdini and the problems it solves they seem valid to me. That said, I'm still not sure that Voronoi is a great fit for wood splinters, but perhaps it's nothing that a little motion blur/smoke/sawdust/increased poly count wouldn't cure .

AMD's Open Physics Initiative combines DMM2, Bullet, and OpenCL so it will be interesting to see how it fares. It seems like a promising approach for non-hero fragmentation.

Thanks for your replies.. they certainly help to scale the learning curve
I installed a skylight in my apartment… the people who live above me are furious!
- Steven Wright
User Avatar
Staff
809 posts
Joined: July 2006
Offline
DMM sounds interesting, although I don't know much about it except that it's Finite Element-based.

Sorry, I didn't answer your question about wood splintering. You're right that an out-of-the-box Voronoi-based fracture operation tends to be better at creating rubble and debris and such where there's no real preferred axes of fracture, unlike something like wood.

As Jeff points out you can do some transformation of the fracturing points ahead of time to achieve different looks. You can even go so far as to transform the geometry before the fracture, do a Voronoi fracture, then transform it back to the original space. In this case the pieces back in the original space may no longer be Voronoi, not that that really matters; as long as it's a linear transformation they should still be a non-overlapping division of the original object.

Attached is an example by Marc Horsfield, where a non-uniform scale is applied to the object before fracturing. The axes that get scaled up will be squashed when transformed back, and you can get some pretty convincing looking splintering that way, especially when combined with the Interior Detail feature.

This file uses the version of the Fracture OTL from the Exchange, but I locked the RESULT node so you can see a couple of pieces without having the OTL (just ignore the warnings).

Just clear the Cell Point Group parameter to fracture the whole object, although keeping one or two points in there is a good way to experiment, for example by changing the amount of scaling in each axis before fracturing.

Attachments:
voronoi_splinter.hip (133.5 KB)

User Avatar
Member
86 posts
Joined: Sept. 2008
Offline
The DMM technology is a variant of tetrahedral FEM techniques optimized for speed. It is perhaps best known for its use in Lucas Arts for Star Wars: The Force Unleashed. The ACM paper “Real-time deformation and fracture in a game environment” is the best description i know of the technology. At the time i believe there were some issues with the sudden spike in polygon count whenever the player felt particularly destructive (which was often).

I like the example 8). Thanks!
I installed a skylight in my apartment… the people who live above me are furious!
- Steven Wright
  • Quick Links