Jump to content

  • Log In with Google      Sign In   
  • Create Account


Just a *bit* more accurate than bounding spheres?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 MisterFuzzy   Banned   -  Reputation: 161

Like
0Likes
Like

Posted 10 February 2013 - 08:44 PM

Hey!

 

I'm not exactly proficient with 3D collisions. 2D is fine, but 3D volumes are, needess to say, quite a bit different. I've been reading around the interwebs on 3D collision, and all seem to say the same thing: "Using bounding spheres..." The thing is, for my experimental FPS, bounding spheres can be too inaccurate: Players could be frustrated when they die when a bullet whizzes just in front of their face, or a clear hit travels straight through their target without ever touching the bounding box. My question is, how can I get accurate collision detection without sacrificing speed or accuracy?

 

(An article would be great, too) mellow.png


Edited by MisterFuzzy, 10 February 2013 - 08:45 PM.

"Only idiots quote themselves" - MisterFuzzy

 


Sponsor:

#2 MichaelNIII   Members   -  Reputation: 195

Like
1Likes
Like

Posted 10 February 2013 - 09:01 PM

Often you will use bounding spheres as the first level of detention, after your game detects that it is in the players sphere, it should then either use bounding boxes on each of the bones in your skeleton, and if one of the boxes is hit, from there check to see what polygon in that box if any was hit - It all depends on how accurate you need your detection to be.



#3 MisterFuzzy   Banned   -  Reputation: 161

Like
0Likes
Like

Posted 10 February 2013 - 11:48 PM

Aye, I've already been considering the "narrow it down" apporoach, I can detect which mesh in a model was hit to appropriately apply damage (A head shot would be an instant kill, whereas a shot to the toe should do little to no damage): But what I really would like is an article on collision detection of actual Models/volumes. I can't seem to find one that involves just the models without the bounding boxes or spheres. Thanks, though!


"Only idiots quote themselves" - MisterFuzzy

 


#4 MrDaaark   Members   -  Reputation: 3539

Like
1Likes
Like

Posted 11 February 2013 - 12:02 AM

Here:

http://www.realtimerendering.com/intersections.html

With your collision, you should start out as crude as possible, and keep working down. Sphere are used because it's a quick and cheap test to perform.

If the collision is outside the sphere, it couldn't possible collide with the object.

If the collision is inside the sphere, then you can do further checks.

This helps when you have lots of objects to test for collisions.

#5 MisterFuzzy   Banned   -  Reputation: 161

Like
0Likes
Like

Posted 11 February 2013 - 12:12 PM

Thanks, Daaark! That's exactly what I was looking for smile.png.

 

Yeah, I plan on having each mesh hold a collision sphere, and for each particular mesh collision (on a character or vehicle) the "weight" of damage to be applied will be determined by what mesh in a model was "hit." Of course, a shotgun to a car's bumper shouldn't stop it, but the engine? Not so much. A rocket would kill a vehicle if it hit anywhere :D.

 

From there, I plan on having an undrawn "collision model" that handles any per-vertex collision that is the same shape as the model, but is far less detailed. It will cover the general area, but with far fewer vertices. It will be subdivided into meshes, so I can handle the "weight of damage" I mentioned earlier.


"Only idiots quote themselves" - MisterFuzzy

 





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS