Sign in to follow this  

Collision Detection/Scene Management

This topic is 2959 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Before I dive in and start trying to implement this thing I'm working on, a basic 3D engine for FPS or RPG, I have a few questions that I need some help with. I can do the reading on my own, but I need to know what methods people are using with modern day computers. I have read many articles, but most are very old. I would appreciate and leads anyone can offer on these topics: 1) I just recently picked up DirectX after coding out my own software rendering engine by piece by piece. So far, it seems like directx takes care of all the clipping(near/far/sides) by itself, but I read somewhere that I should still do it myself...is this true? It seems to me that I should at least reject objects that are entirely outside of the frustrum before starting to process a frame...but that I can comfortably leave the rest to the hardware..right? 2) Do people still use BSP trees for hidden surface removal or z-sorting anymore? or can I just pass all the polys on to the hardware and let the z-buffer sort it out? 3) What kind of collision detection should i use? I have read about the following methods, but don't know what is practical, and what will turn out to be the right computational price these days: a)Axis aligned bounding boxes b)Oriented bounding boxes c)Bounding spheres, multiple per object if needed. d)Runtime convex hulls e)Model-time, imported, simplified hulls for each object f)ray/triangle, triangle/triangle intersection I also have no idea how much of this, and other physics can or should be taken care of with hardware. 4)In my project, I have a simple list of vertices and indices for my main room, that are sent in to the hardware as the initial data using the D3D10_SUBRESOURCE_DATA structure. How do I deal with multiple objects? Do I create a vertex and index buffer for each object? I am sure I could figure something out for this, but what is the proper way to do it and minimize the overhead? I guess thats all for now. I hope none of these questions make me look like too much of a nüblɘt =) thx

Share this post


Link to post
Share on other sites
Hey Nick,

it's hard to answer your questions, because there's no "best" way, each has advantages/disadvantages, and we don't really know what your project looks like. Therefore we can't suggest which way to go.

About vertex/object culling: The graphics hardware is really good at culling single vertices, but a simple check whether some bounding sphere is out of view is always cheaper than letting the graphics card decide for each single vertex in that bounding sphere whether to draw it. Bounding spheres are for example really easy to do and if you're a beginner, you can do really much with them already.
Simplyfying meshes for object detection is generally only done when you're doing precise physics, because a mesh may have vertices which aren't important for a physics simulation, or don't have any measurable impact on it.
BSP trees are still used, of course. As are octrees etc, it depends on what you're trying to do again.
Ray intersections are used for things like picking, checking whether a camera can see a certain thing, etc .. Again, depends on what you do. Some data structures are better for ray intersections than others. But if you don't need to cast rays, the other data structures may have some other advantage..

So I really don't know where to start helping you. Maybe it would be better to ask more precisely what your problem is, because right now it sounds like you want to have all these techniques explained to you to decide for yourself, in which case I would just suggest picking up some books about them :s

Share this post


Link to post
Share on other sites
Quote:
I can do the reading on my own, but I need to know what methods people are using with modern day computers.


Quote:
I would just suggest picking up some books about them :s
^?^

edit- plz, no lists, but if anyone could recommend any one good book about DX10 game programming that has actually enabled them to finish a game, that would be awesome

[Edited by - CPPNick on November 6, 2009 1:18:46 PM]

Share this post


Link to post
Share on other sites

This topic is 2959 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this