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!

No comments:
Post a Comment