Re: collision detection of spheres and meshes

From: ZMan (zman_at_thezbuffer.com)
Date: 12/31/04

  • Next message: vidalsasoon: "Re: collision detection of spheres and meshes"
    Date: Fri, 31 Dec 2004 11:30:01 -0800
    
    

    Try getting Dave Eberly's book
    http://www.amazon.com/exec/obidos/tg/detail/-/1558605932 There's a ton of
    instersection stuff in there.

    Typically though after ruling out collisions with the sphere/sphere you
    would then try some tighter shapes such as a collection of AABB's. They are
    tighter than a sphere but slowere to check but nowhere near as slow as mesh
    intersection which will require you looping through each triangle of the
    mesh. Try wrapping different parts of the model (e.g. head, arms, legs) in
    different boxes. Often you will find that these boxes alone are close enough
    for a collision in a game.

    The other thing you can do is have a very very low polygon equivalent that
    you use for your collision detection but remember even a 100 triangel model
    means 10,000 triangle collision tests if you have to compare them all.

    -- 
    ZMan (zman@thezbuffer.com)
    http://www.thezbuffer.com
    News and Information for Managed DirectX
    "vidalsasoon" <kjobson@gmail.com> wrote in message 
    news:1104433806.831201.94520@z14g2000cwz.googlegroups.com...
    >i have meshes with a bounding sphere around them. Now, when a sphere
    > touches a another sphere around a mesh I would like to refine my
    > collision detection to sphere vs mesh. How do i find out the correct
    > vector that pushes my sphere away when it touches any part of the mesh.
    > my problem is that even if i know the spheres are touching, I dont know
    > how to do this with meshes.
    >
    > I'm guessing that I have to check every polygon of the mesh and check
    > its distance is less than or equal to zero then find the polygons'
    > normal to reverse it.
    >
    > is this a good technique? some C# code sample using a BoundingSphere
    > tested against a meshs' polygon would be nice.
    > 
    

  • Next message: vidalsasoon: "Re: collision detection of spheres and meshes"

    Relevant Pages

    • Floating point errors in collision routines
      ... sphere-triangle collisions and interactions. ... sphere-plane collision routine to see if a collision will occur. ... the sphere has sufficient energy to collide with, ...
      (comp.lang.cpp)
    • Re: Floating point errors in collision routines
      ... zero is fundamentally futile. ... Newer collision engines, like Gino's SOLID, get ... > the sphere has sufficient energy to collide with, ... > the plane.) ...
      (comp.lang.cpp)
    • Re: Collision detection idea
      ... So now any time there is a test for collision one just has to compare the intersection sof the sphere instead of bounding boxes. ... It just seems much easier and quicker to compare spheres instead of bounding boxes that one can save a few cycles and might get more accuracy by allow deeper collision tests). ...
      (comp.graphics.algorithms)
    • Re: collision detection of spheres and meshes
      ... > Putting a sphere around the entire mesh was easy... ... As for your response vector - if you need a perfect one then yes you will ... News and Information for Managed DirectX ...
      (microsoft.public.win32.programmer.directx.managed)
    • Re: how to search the topology of a mesh
      ... > trying to search the topology of a mesh to find regions. ... > sphere is regionI, and the outside of the sphere would be ... > find all connecting neighboring triangles. ...
      (comp.graphics.algorithms)

    Loading