|
This is my current independent study project. I'm working on with a friend of mine,
Jason Rodriguez. The pictures you see above are a demonstration of the real time graphics
engine I am developing for the project. In the images above, 216 balls arranged in a cube
fall from the sky and crash into the ground. The graphics engine detects collisions between
every ball and passes the results to a physics simulation responsible for approximating the behavior
of this kind of billiard ball collision. The initial collision detectiong is accomplished with the use
of an octree to partition the scene. This simulation runs at about 50 fps on my computer.
The goal of the project is to develop an XML scripting language for creating interactive 3D
environments. The user would develop content for their application (models, textures, sounds, etc.)
and then be able to write a simple XML script to specify where objects in their scene go, and how
they interact with other objects and the user, without ever having to look at any C++ code.
Part of the concept is to mimic the ease of creating a web page in HTML.
|
|
Here's a better representation of the octree that the graphics engine is using. Essentially,
the octree starts with one large cube that encompasses every object in the scene. Then, the cube is
divided equally into eight smaller cubes. The objects in the first cube are distributed to the smaller
cubes. Then, each of the smaller cubes is similarly divided. Once all the objects in the scene have
been partitioned in this way, collision detection becomes much faster because only objects in the same
cube need to be tested against one another.
This process is compliated by the fact that objects in the scene can move. From one frame to the next,
an object may move into a neighboring cube, or place itself on the border between two cubes. Worse, it
may even leave the outer cube of the octree entirely. Dealing with these problems adds overhead to the
octree. Without care, maintainance of the octree may become more expense than the savings achieved by
partitioning the scene.
|