So the big 1.0 is finally here. I've added some fixes to collision detection as I was making demos. One of the fixes that I should have really done before was the bounding sphere. Instead of recalculating it every single time, I have it stored in the model and only recalculate it if its size change, otherwise, the center will always be the object's position and and radius stays the same.
As for the demos, I've created 3 so far, and I plan to make at least one more. Here are the links to them:
Demo 1 - Pong
Demo 2 - Linear Collision
Demo 3 - Multi-direction Collision (with no triangle test)
And here's the 4th demo
Demo 4 - Multi-direction Collision (with triangle test)
Friday, April 24, 2009
Thursday, April 23, 2009
Another Demo
So I've made 2 small demo. This one uses collision detection to find all objects that have a collision, and make those objects bounce off of each other.
Blog on C3DL: http://www.c3dl.org/index.php/demos/simple-collision-detection-demo/
Blog on C3DL: http://www.c3dl.org/index.php/demos/simple-collision-detection-demo/
Old and New Post
Forgot to link the blog about 0.9 release.
http://www.c3dl.org/index.php/c3dl-dev/collision-detection-09-release/
And here, I've made a simple game of pong in C3DL. Play Here.
On to updates.
As I was making a demo using collision detection, I've found some bugs that I didn't encounter before. I was a little surprise at first, since I thought I've tested it pretty thoroughly and tried many different things with it. I guess I was wrong. For example, I clearly thought I had consider the scaling factor in the model when I get their bounding sphere, but that was missed out. So now I've got that fixed.
However, onto an even more serious problem. I ran into a situation where my collision detection is failing when two objects are obviously colliding. Again, this happens when both objects have been scaled. As I review my code, I found that I had include in the scaling factor as I was testing for both bounding sphere and triangle-triangle intersection test. Hence, I'm a little stuck right now. And with so little time left till the big 1.0 release, I'm definitely starting to panic.
http://www.c3dl.org/index.php/c3dl-dev/collision-detection-09-release/
And here, I've made a simple game of pong in C3DL. Play Here.
On to updates.
As I was making a demo using collision detection, I've found some bugs that I didn't encounter before. I was a little surprise at first, since I thought I've tested it pretty thoroughly and tried many different things with it. I guess I was wrong. For example, I clearly thought I had consider the scaling factor in the model when I get their bounding sphere, but that was missed out. So now I've got that fixed.
However, onto an even more serious problem. I ran into a situation where my collision detection is failing when two objects are obviously colliding. Again, this happens when both objects have been scaled. As I review my code, I found that I had include in the scaling factor as I was testing for both bounding sphere and triangle-triangle intersection test. Hence, I'm a little stuck right now. And with so little time left till the big 1.0 release, I'm definitely starting to panic.
Labels:
0.9 release,
bugs,
collision detection,
panic,
Pong
Sunday, April 5, 2009
Collision Detection - Sectioning DONE
Sectioning is implemented and done. This should reduce the time it takes to run collision detection when there are large amounts of objects in the scene. For more details, read the blog at http://www.c3dl.org/index.php/c3dl-dev/collision-detection-sectioning/.
Wednesday, April 1, 2009
Release 0.8
The day has come for another release. And what's a release without a blog? Here's the post for it http://www.c3dl.org/index.php/c3dl-dev/collision-detection-recap-of-release-08/
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.
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.
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.
Subscribe to:
Posts (Atom)