Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Tags in this Discussion

APEX Destruction: Custom level 0 collision for UDK
  • Hey, I'm creating a modular building, fully destructible, and I'm now putting in windows. I have one problem though, the collision for level 0 is unique, not like level 1.
    This means that when I, while testing in UDK, using the two assets (A wall that destroys like concrete, and a window like glass) the wall collision always comes first, thus I can't destroy the window before I've taken at least one chunk off the wall, as it then gets a more useful convex collision.
    Is there a way to feed a custom collision mesh either inside physx lab or UDK? Or a way to force level 0 to use the collision of level 1?
    Thanks!
  • 7 Comments sorted by
  • This problem was specifically addressed in APEX 1.1. In 1.0, you can only have a single convex hull per chunk, which is quite restrictive and leads to this sort of situation. APEX 1.1 allows you to have any number of convex hulls per chunk, so that the aggregate may better approximate non-convex meshes.

    PhysXLab for 1.1 contains a convex decomposition algorithm which does a good job of approximating any mesh with a reasonable number of convex hulls. (The desired degree of accuracy is a slider-adjustable parameter.) This algorithm is applied to each chunk mesh to produce the collision volumes. Once APEX 1.1 is available in UDK, simply refracturing your asset with PhysXLab for 1.1 should solve your problem.

    Bryan Galdrikian
    APEX Development
    NVIDIA
  • Our goal is to have APEX 1.1 integration ready for the October release of UDK.
  • Bryan, and have you implemented anything that can help to deal with intersecting physical meshes ?

    Cause currently, even slicing of simple mesh can sometimes produce chunks with interpenetrating physical meshes (since they are simply wrapped around graphical mesh), intersecting chunks = asset literally explodes, cause rigid body solver tries to resolve all interpenetrations.

    Maybe voronoi fracture, or option to manually edit physical meshes per chunk ? Or algorithm, that checks all intersections and resolves them, by adjusting vertices of phys. meshes ?
  • Actually the aggregate collision hulls help intersecting meshes as well. I'll explain.

    When slicing with perfectly flat planes, the convex hulls of the graphics meshes naturally do not overlap. But when noise is introduced into the slicing surface, the convex hulls will overlap. A while back we treated this by choosing a "midplane" and clipping each chunk's convex volume against that plane. This prevented overlaps, but when the slicing noise had significant amplitude, this often trimmed the collision volumes so much that very little (and sometimes nothing!) was left. So we introduced a maximum trimming amount, based upon a percentage of the chunks' widths. The convex volumes will get trimmed up to that amount, but no more. This prevents the collision volumes from being whittled away too far, but also leads to overlaps, which you're seeing.

    When there is only one convex volume per chunk, one is left with this dilemma - shrinking collision volumes or overlaps. We could have introduced a slider to expose the maximum trimming distance, but this seemed too fiddly. A better solution is to allow non-convex representations, which is exactly what we have with the convex aggregates. We still apply the same trimming algorithm to the convex volumes in the aggregates, but since they more closely fit the graphics meshes, the amount of trimming is (usually significantly) reduced. This reduces the chance of hitting the trimming maximum distance, and so the trimmed volumes will not overlap.

    You mentioned Voronoi fracture, which we are also planning on implementing.

    We are also currently working on a DCC tool integration for destruction authoring, which will allow you edit not only the collision hulls, but the graphics meshes for each chunk.

    Bryan Galdrikian
    APEX Development
    NVIDIA
  • Thanks for explanations :)

    One last question - are you going to support jointed objects (authoring/runtime) and some kind of stress calculation for support system anytime soon in APEX destruction ?
  • Vote Up0Vote Down Allingby
    Posts: 7 Accepted Answer
    Thanks for the response, Bryan!
    Where or when can I get my hands on Apex 1.1 (Lab)? I see only 1.0 beta 2 on the support site, has it moved? Or is it already in the DDC plugin for Max 2012? (I'm downloading now, checking it out tomorrow)
    And any estimate on Apex 1.1 integration with UDK? September beta perhaps?
  • Vote Up-1Vote Down Allingby
    Posts: 7 Accepted Answer
    Thanks, David! I sent an email requesting beta access to APEX, hoping to be able to continue soon!