Announcement

Collapse
No announcement yet.

Collision Detection of Complex Models

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Collision Detection of Complex Models

    Hey all. So I've been digging around the internet trying to learn how to correctly implement collision detection on models for my project. Basically, I'm doing some modeling of complex geometries (structures and what not) that are too detailed for simple bounding box collisions, and also too detailed to be built as BSP models. So for instance, let's say I'm making a large rock of a thousand vertices are so, with lots of angular detail and what not. I want the player to contact this rock based on it's triangle mesh shape, as it's not a perfect square so a bounding box just won't do. It should also stop traceline functions on any triangle of the mesh. Is this possible with DP/FTE? I'm sure it is after seeing some of the projects being made with these engines, such as golden_boy's game before he switched engines.

    It looks like ODE physics may be the solution. There's not a lot of documentation on how to do this, or I simply haven't found it yet. Within the ODE physics section of dpextensions.qc I've found:

    const float SOLID_PHYSICS_TRIMESH = 35;
    Is this property defining collision as the mesh of the rendered model by the engine? Am I on the right track here? I've got some learning to do, any advice is greatly appreciated.
    'Replacement Player Models' Project

  • #2
    Hey,

    I really don't know if this helps you.

    I was at one point facing a similar problem.
    I modelled an open shipping container so that I could have it present in maps but angled in a way that Quake hated if built using brushes.
    The model looked great but the only problem I had was that it was either non-solid (like a func_illusionary), or solid to the point you couldn't walk through it.

    It was something that had not occurred to me when making it.
    PrimalLove pointed me towards an inside3d thread (I don't think it was the one I linked) which explained a work-around method but in the end I abandoned that approach.

    I hope you find a way as it would be a helpful thing to know for future development.

    Primal or GB should be able to point you in the right direction.
    Best of luck!
    Username : Atomic Robokid on Steam

    Please check out my Quake made things:

    https://www.indiedb.com/games/run-over
    https://adam-freeman.itch.io/hazard
    https://adam-freeman.itch.io/diver
    https://adam-freeman.itch.io/beyond

    Comment


    • #3
      just making it SOLID_BSP should result in mesh collisions on non-bsp objects. make sure its bbox fully covers the entire mesh.

      if its just for weapons, you can use MOVE_HITMODEL which will force mesh collisions for ALL non-bsp ents that the trace might hit (assuming the bbox covers all geometry, again).
      Some Game Thing

      Comment


      • #4
        @Adam

        Yes, that link is extremely helpful, particularly in proper OBJ export. I have a better idea of where to start and what to study up on. Thanks man! Damn I looked all over for a thread like that, even on inside3d...guess I wasn't searching for the right terms.

        @Spike

        Wow, that is incredibly simple. Very cool. I'm going to test this as soon as possible. I appreciate you always having helpful answers man, I'm sure you've answered these questions a few hundred times by now. Thank you sir. After I get this solution dialed in I will be experimenting with FTE's heightmap generation.
        'Replacement Player Models' Project

        Comment

        Working...
        X