Fast 3D per polygon collision in low poly environment

Discussion in 'Rendering Technology and APIs' started by rumblesushi, Jan 23, 2010.

  1. rumblesushi


    Jan 23, 2010
    Likes Received:

    I recently built myself a 3D engine in AS3, and I thought this would be a great place to up my game, so to speak.

    It's almost finished, but one of the essential things I have to implement is per polygon collision detection for environment collisions before I start making games. Player to enemy collisions etc I'll handle with a simple bounding sphere.

    But for terrain/slopes/walls etc I need proper collision detection. I have some experience with basic 2D verlet physics, soft body mechanics etc, but no experience at all with real 3D collision detection.

    And when I say low poly, I mean it ;) Bear in mind my 3D engine is running in Flash, 100% software, and despite pushing AS3 for all it's worth, on a Core 2 Duo the performance is very similar to a DS or N64.

    I plan on implementing a grid or quad tree to break the level up, then running the per polygon collision routine on the player or enemy, according to what grid space they are occupying. Right now I'm just trying to get the actual per polygon collisions working, without falling through the floor etc.

    For an engine that's going to be running levels with a total of say 10,000 to 15,000 polygons, and probably no more than 2000 polys rendered per frame, do you have any advice for me?

    Such as a uniform grid or tree, if so - which type of tree, and also, perhaps the quickest per polygon algorithm?

    There must be a very fast way of doing true 3D collision detection, seeing as it existed in 3D games back when machines had 33mhz processors.

    Here is a link to my latest demo too, so you can see what my 3D engine is about. One of the things I've worked on is very fast per model handling. With such a low polygon budget, I find it more impressive to have a large amount of uber simple objects, rather than just a handful of well, slightly less simple objects.

    This demo has 150 basic buildings, and 500 moving flowers (this demo just has some basic 2D collision).

  2. discouraged_one


    Jan 25, 2010
    Likes Received:
    OcTree\QuadTree. Create polygon soup: not necessarily from level geometry - you can optimize a lot.
    If you are not doing "next-gen" levels - it will suffice.
    In general quad\octrees are better for outdoor, BSP for indoor.
    Uniform grids are most optimal if you have really *uniform* grid 8)

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.