Hello again. Things are progressing very slowly, but I still wanted to show you what I've been up to. Remember the issue about the cubes that passed right through the head mesh collision shape? Well, I've scoured the Bullet forums and even posted my own questions regarding the issue, but the problem is still mostly unresolved. However, in the process of trying to figure out what was going on, I've come across a method of optimization for creating the head collision shape. Using an open-source convex hull decomposition library (see here), I've managed to break down an originally semi-dense head mesh OBJ into several convex hull shapes, which I can then combine together (unfortunately, converting the original extremely dense OBJ takes a *very* long time - but I'm hoping the convex hull decomposition step will replace my need for a decimation via Maya step in the application pipeline):
Notice how this knocks things down from one huge AABB to multiple smaller AABBs, which is a better approximation for the head mesh and will hopefully speed things up later on. Unfortunately, attempting to recompute the smaller AABBs at each frame (as the head mesh deforms) has become tricky. I was able to do it easily with just one, but with multiple, Bullet throws errors. I don't think it should take me too long to resolve the issue, though.
I think the most probable explanation for why some cubes *still* want to pass through the head mesh (even though it has been optimized) is due to a computation bug with co-normal collisions. When I shoot cubes along the normal of a particular face, that's when (I think, anyway) the collision fails to register. One solution could be to generate a small box at the center of each face. But that just means even more shapes to check, so I don't know. I suppose some particles going inside the collider isn't a bad thing *if* they can come back out (i.e. 1-way collisions). However, Bullet doesn't have that feature built-in (I would have to code it myself). At the end of the day, I feel kind of silly for spending so much time on something that isn't even hair... So I think I'll just put this issue aside for now. Things don't look very promising in terms of finishing the project by the 18th, but I'll keep putting it as one of my top course priorities.
Another update to come later tonight / tomorrow morning!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment