Finally, physics destruction is completed, I have reduced number of triangles per object to necessary minimum by storing object envelope in it. Than when collision occurs I make geometric difference between ground and explosion vertices, in this example it is simplified circle, but it can be everything (just imagine laser which creates deep but slim holes – great for passing). Final concave polygon is triangulated. Graphics and physics store the same triangles and as far as that’s good for graphics is not as efficient for physics (convex polygons are better)
Another new thing is the animation, created using ExploTexGen. It can generate texture that contains sequence of smaller images. I only have to manipulate texture coordinates to jump to the correct place – position of the next frame.
Here is video where you can see this news. In middle of film you can see bullet controlled by mouse (I stopped simulation then grabbed it) Ps. youtube screwed my video : (
Nice tech demo, I am doing something similar in regards to terrain destruction. Although at the moment i am having trouble triangulating my polygons. I am how you are handling the triangulation, and if you have holes and stuff working.
Sorry, That was a question, Stupid typo. How are you handling triangulation and holes?
Hello,
For triangulation I’m using “poly2tri”http://code.google.com/p/poly2tri/ It can handle holes but… as I noticed, only that which are inside triangulated polygon, if there is at least one hole vertex outside vertices of triangulated polygon then triangulation fails and you might get weird results. So additionally i found “clipper” polygon library that can easily calculate boolean actions on polygon (such us difference, union, xor and more)
Pingback: Particle effects « Paweł Mogiła's game development blog