Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: MeshinMesh

  1. #1

    MeshinMesh

    Hello,

    I need a function like MeshinMesh.

    I want to know if two meshes collide. Perhaps first check the bounding boxes and the distance, and then checl the polygons or something.

    I need it in 3D not 2D, I found a lot of stuff for 2D already.

    Does anybody have already something like this? Or do I really have to use ODE or Newton, is this that complicated?

    Thanks,
    Firle

  2. #2

    MeshinMesh

    Checking of two arbitrary meshes for collision is a quite complicated task. Even not any physics engine supports this. AFAIR Newton has polymesh colision support.

  3. #3

    MeshinMesh

    ... and I am sure you do NOT need this Eric

    If you want to have it for the project I am thinking of then you definitely need a faster way to detect collisions. I guess games like Assassins Creed use this accurate collisions but a spaceshooter doesn't need it.
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  4. #4

    MeshinMesh

    You could also simplify your geometry and make spheres and boxes out of it. Checking those is a lot easier and faster. Flattening your collision-meshes to 2d (if possible) might also work.

    I think in most cases this will give you satisfactory results. What kind of meshes are you using? Does your collision-checking really need to be THAT accurate ? :?

    OFFTOPIC: Yeeha: Word lord now!
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  5. #5

    MeshinMesh

    Testing sphere collision is faster than boxes (for the very first check). You don't need sqrt() call at all if you power 2 the radius too

    After that the detailed collision which could be each triangle, model defined as a shape or numerous smaller shapes...

  6. #6

    MeshinMesh

    maybe this can help...

    is working 100% here...

    http://www.lordzero.co.nr/tmp/AxisAl...udingBox3D.zip
    Knowledge is power.

  7. #7

    MeshinMesh

    Hi @all

    @lordzero,
    how do you control the demo?
    I am only moving the camera right now...

    @all,
    yes, this is for a spaceshooter, exactly.
    I already have a collision check with sphere, but I find it not good enough.
    I hoped to check the sphere first, and if that spheres collide do another check with the mesh or maybe the mesh simplified or something...

    Thanks,
    Firle

  8. #8

    MeshinMesh

    Quote Originally Posted by Firlefanz
    @lordzero,
    how do you control the demo?
    I am only moving the camera right now...
    numpad 4,8,6,2
    Knowledge is power.

  9. #9

    MeshinMesh

    @lordzero:
    Your demo does not work properly. When I move the right box so that it is behind the left box and then move "down", the box collides before it really hits the other box.


    @Eric:
    It is much faster if you attach a few invisible collision boxes to the models than testing Mesh2Mesh collision.

    For example, if you have an airplane-like model you can easily use two boxes which are overlapping like a cross. This is much more accurate than a bounding box or sphere and is nearly as fast as bounding box-collisions. Think about it. You can "build" nearly every shape out of such simple constructs and use this for collisionchecks.
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  10. #10

    MeshinMesh

    Hmmm. I think this stuff with multiple collision boxes is the best idea until now.

    Seems like I need some editor to load my model, then display and change and save 3 boxes or something, and in the engine when one box collides, I have a collision. Sounds good...and fast.

    Just some additional new work with that editor then but that would be okay. Thanks for the clue Dirk.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •