Thursday, March 26, 2009

More blogs and demo

http://www.c3dl.org/index.php/c3dl-dev/collision-detection/

This one talks about the improved speed of the collision detection and how that was achieved. The demo is at http://matrix.senecac.on.ca/~pplam3/OSD/canvas3dapi-dev4/testDemo.html



http://www.c3dl.org/index.php/c3dl-dev/collision-detection-default-testing/

This one talks about adding the feature of turning on/off the triangle-triangle test.

Friday, March 13, 2009

More Blogs And Release 0.7

So we're finally reaching close to 1.0. It's crunch time and we really need to get our projects running smoothly. For me, that's a bit of a problem. The collision detection, in theory, is complete. It does what it needs to do, go through the objects in the 3D space, check for any collisions, and return that list back. That part work, it checks and it returns the result. But what the problem is, is the "smoothness" of the collision detection. Whenever there are more complicated objects with a lot more vertices in them, the collision detection takes a plummet to the bottom of processing and completely kills the whole canvas. For comparison, when testing between cubes, it's very smooth, because there are only 12 triangles on each cube. But as soon as we put spheres in, it just dies.

So what happens now is that the collision detection needs major improvement in efficiency. It needs to jack up the speed to run the test and make sure there's no unnecessary code running wild. To start off, I've cut down the number of triangle-triangle tests needed to be perform for the object by about half. Further details here
http://www.c3dl.org/index.php/c3dl-dev/collision-detection-signs-of-improvement/

Then next, I've cut down the number of ray-triangle tests called for each triangle-triangle test. Further details here
http://www.c3dl.org/index.php/c3dl-dev/collision-detection-07-further-improvements/

The plan for the next improvement is to break the 3D space into regions and perform collision detection in each region, instead of checking the 3D space as a whole. This will cut down the number of objects to compare for the collision detection and should increase the speed.

Friday, March 6, 2009