? 3D physics collision testing with OpenGL

Hey, I just had an idea of simulating 3d physics using offscreen rendering, and never found anything about this on the internet.

So basically,

  • imagine an object with some movement force falling somewhere in space,
  • I would create an small viewport 1x1 with perspecive inside the object facing the way of the movement force,
  • I would render depth values of whole scene into the framebuffer
  • then i would just check the depth value if its too close - boom - collision = true;

Dunno if it’s worth the gpu and cpu time than regular collision detecting. Does anybody got any article about this or something similar?

Whilst it’s a lovely idea, I don’t see any way it could be at all efficient. Essentially, each and every frame you would be rendering the entire scene again for each object in motion. That’s on top of the normal rendering which is often several passes as it is. Some day hardware will be capable of this. Not today.
Purely theoretically speaking, I don’t think it would be as simple as you have made it out to be.
-You couldn’t use a 1 x 1 pixel view unless every face was perpendicular to the movement. Unlikely.
-How do you know if its too close? You would have to render the object moving, then render the scene to a different
frame buffer and then compare them pixel for pixel.

Use bullet. It won’t slow your frame rate down to 3 seconds per frame.

bungee did something like that for their particle effects in halo 3. there is also a slide from GDC I think out there