Hellow !!!!
I 'm writing animation system for games..... and I know a wrong AABB for skin mesh will cause Frustum culling mistake, because AABB must
bigger than actual mesh size.
It's impossible to calculate global position of vertices of skined mesh using the bone matrices and then use the vertices to calculate the global AABB .Is there someone know any effective algorithm to get a approximate result ?
By the way, the animation system is run inside the scene graph(model, joint, mesh are made as nodes), and the update AABB function will be called after global transform matrix has been updated .
However I don't actually use the global transform to render the skin mesh, the formula of computing the BoneFinalMat
is initially be : BoneFinalMat = inverseBindMat * BoneToRoot * RootToMeshNode. and somebody(not me) should pass the global transform matrix of mesh node to shader. But I slim down the formula to BoneFinalMat = inverseBindMat * BoneToRoot, so I just pass a Identity matrix as the world matrix to shader.
Maybe I need a algorithm to compute the global AABB of skin mesh that would have nothing to do with the global transform of mesh node.