Home Technical Talk

creating convex collision meshes

godlike master sticky
Offline / Send Message
Neox godlike master sticky
Well threadtitle almost says everything, are there any shortcuts when the task is to create convex collisionmeshes? I hate hate hate doing it by hand, aren#t there any semi automatic approaches?

Replies

  • Eric Chadwick
    We use Havok, it includes an automatic tool for this. We eventually wrote our own in MAXScript though, we wanted to create hulls from selections of faces/vertices/multiple objects. That doesn't help you much though, sorry.
  • shadows
    Offline / Send Message
    shadows polycounter lvl 18
    Depending how complex you want the collision mesh to be and if its to be used in UE .You could use the tools inside UE3, open up the mesh viewer and under collision you have some tools there.
  • Lamont
    Offline / Send Message
    Lamont polycounter lvl 15
    What would be your "dream" way of making collision meshes? Select the mesh, hit a button and get a nice conformed group of collision meshes?

    I hate doing it by hand, but it's a necessary evil as the results can be tailored to what you need.
  • Neox
    Offline / Send Message
    Neox godlike master sticky
    shadows wrote: »
    Depending how complex you want the collision mesh to be and if its to be used in UE .You could use the tools inside UE3, open up the mesh viewer and under collision you have some tools there.

    thats way, way, way too simple, now i know why most games are just planar surfaces...
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    I've tried a few automatic solutions and they always sucked in one way or another. Doing it by hand guarantees good collision. Bad collision can make your game feel frustrating or even broken.

    Another thing, about the "planar surfaces" stuff - in id Tech 4 anyway, the collision calculations are done in such a way that any planar group of triangles counts as a single "polygon", so it's actually more efficient to have a perfectly planar quad instead of two triangles which are just slightly off from being a quad.
    This also means that flat cylinder caps are always treated as a single polygon even if your cylinder has up to 64 sides. I'm not sure if this is the same in other games, but it means you can really optimise stuff quite well like that.
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 16
    Is it really that much work, Neox ? A few boxes, convert to poly, drag some verts and done ? What sort of crazy models do you make that collisions become such a burden ?
  • Neox
    Offline / Send Message
    Neox godlike master sticky
    http://media.moddb.com/images/mods/1/11/10979/leuchtturm6.1.jpg

    the tower itself is easy, the platforms too, the suspensionbridges (not in that image) also, what really is annoying is the terrain as it is really wavy and organic
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    what kind of automatic tools have you tried mop?

    http://codesuppository.blogspot.com/2006/04/approximate-convex-decomposition.html
    there is supposed to be a implementation for this

    also I found
    http://portal.acm.org/citation.cfm?id=1375749
    which was rather new
  • Lamont
    Offline / Send Message
    Lamont polycounter lvl 15
    Yeah, terrain is annoying and usually has it's own collision done. Since it's such a small bit what you can do is select the mesh, convert to tri's, explode all of them to individual tri's and extrude down a tad keeping the original face. Then name them all :P. Another thing to is if you're using Havok, it will bitch and maybe crash that the number of collision prims are excessive. So make multiple meshes if you have to...

    I had to do this in a pinch and it worked.

    But watch out for gaps and stuff, not sure how your pathfinding works, but Kismet might freak out.

    Oh and you're supposed to duplicate the mesh BEFORE you do all that stuff... I forgot to mention that.
  • cman2k
    Offline / Send Message
    cman2k polycounter lvl 17
    http://www.amillionpixels.us/StanHull.zip

    kinda old. works well sometimes, doesn't work so well other times.

    :P
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 16
    You might disagree, but you can run such a big piece without collision mesh, using the view mesh as collision. In the commercial UE3 engined game I worked on, we did it for pretty much every big enviro piece. It was never a problem performancewise, even on Xbox or Playstation, since Physx handles that sort of stuff very efficiently for static meshes.
    I guess you know how to set a mesh to that sort of collision ?
  • Neox
    Offline / Send Message
    Neox godlike master sticky
    problem is that you get stuck everywhere especially on those rocks on the tower, however for some reason i have a BAD framdrop when using collision meshes instead of per poly collision, i don't get it...
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 16
    You can just use blocking volumes to fix the problematic areas then ?
  • Neox
    Offline / Send Message
    Neox godlike master sticky
    ok got it had to turn off UseSimpleRigidBodyCollision, now we are back on 60fps - great
    as for blocking volumes on problemetic areas, well i would have to either split up the lighthouse which will be fun as its in some sequences and we would need to plug more assets in those sequences then (this night is msuc so no time for big changes) or i would have to create collisions that are bigger then the per face collision and thats definitely a thing i don't want to have i don't mind the player to cross the rock a bit with his shoulder when jumping as long as the gameplay is solid, so taking space to jump around is really not an option

    but it works now, with a good amount of fps, phew
Sign In or Register to comment.