Collision Detection System

In last post I have already talked about why i wanted to make proper collision detection system and also said I will be posting progress and what things i want to implement so here it is –

Basically I want to implement the whole collision detecting system involving primitives, mesh colliders etc together with broad phase optimization techniques. So i don’t have to worry about collision detection ever again. Also i want to utilize knowledge gained in the process and apply it to the rendering and finally implement the things i wanted from a long time like Scene Graph, Occlusion Culling, Portals systems, etc.

I have divided the things into 2 phases –

Phase 1

In this phase player or object in consideration will either be a AABB, Cube, Sphere or Ellipsoid. And we will be using polygons/ triangles making up the objects for collision also and not simple primitive objects. Goals for this phase –

  • Design Collision Manager that will be handling all collision related stuff.
  • CD (Collision Detection) of AABB with Polygons (triangles making up objects in current scene , yes there are no simple primitives).
  • Sphere & Ellipsoid with Polygons.
  • Registration & CD of Static Objects
  • Registration & CD of Dynamic Objects (Moving objects like bullet etc)
  • Registration & CD of Height map Terrains (avoiding registration of whole terrain mesh if possible because that’s going to take allot of memory and unnecessary CPU time )
  • Registration of Static Hierarchal meshes loaded from 3ds Max as Static Objects.
  • Registration & CD of Models with animation loaded from 3ds Max (e.g. Walking character , etc).
  • Update Player FPS Controller and Implement Response phase.
  • Map Editor with collision detection support for making simple levels.
  • Or Implement the support for Loading Levels from 3ds Max and register it with Collision detection System and also make a provision to place some simple entities in 3ds Max and recognize it in engine while loading.
  • Make the whole Collision Detection System and Response phase of Player Independent of Default Co-ordinate Axes. (I will explain it later but it’s like using OABB instead of AABB. But thing am trying to do is beyond that and I can’t explain it without screenshots etc)

Phase 2

  • Implement primitives (Cylinders) to speed up Collision Detection allowing us to avoid Mesh Collider implemented in Phase 1 whenever we can. (Mesh collider can be used easily with every object but it’s quite heavy on the processing side. Also arguably its the most involved one.)
  • Implement High Level or Broad Phase Optimization techniques like KD Trees, Oct Trees, BSP, etc
  • Use the tools and knowledge gathered in Collision Detection and Apply it to Rendering also.

Phase 3

  • Convex Hulls
  • Collision Detection on GPU (using general techniques and maybe using CUDA also).

Phase 3 is not really planned but am looking forward to do it. But I think it will not be soon because I would like to implement other things first like Physics. There’s no point of fancy Collision Detection System without a good Physics System with rigid body physics at least. There are other things I would like to do before that like a more robust Scene Manager with Portals, Occlusion Culling etc. All these techniques are related with Collision Detection.

Advertisements

About chetanjags

Game Developer

Posted on April 1, 2012, in Collision Detection, Game Development, JustAnotherGameEngine and tagged , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: