- Home /
Bounds of Skinned Mesh after Blend Shapes are applied
Hi,
Is there a way to get the bounds of the rendered skinned mesh? Eg in a specific animation frame or after certain blend shapes are applied? Any Help would be appreciated !
Thanks
Answer by kiriri · Nov 10, 2014 at 04:02 PM
There isn't . The vertex buffer the renderer uses is internal/c++ and there seems to be no way to get its' pointer. There is however a function called BakeMesh() in SkinnedMeshRenderer that calculates the mesh as it is in that frame. It does not recalculate bounds though, so that has to be done separately.
Hope this helps everyone else who may have the same issue :)
Thanks for posting a follow-up with the Bake$$anonymous$$esh() solution. I was also desperately searching for an answer to this problem. So confir$$anonymous$$g that this works:
Bake$$anonymous$$esh(baked$$anonymous$$esh)
baked$$anonymous$$esh.RecalculateBounds()
baked$$anonymous$$esh.bounds.size
Your answer
Follow this Question
Related Questions
SkinnedMeshRenderer: Change Bones at start without changing mesh or blendshape results. 0 Answers
Can multiple characters share blendshape animations in Unity? 2 Answers
Script generated mesh with blendshapes gets messed up when uvs are added -1 Answers
Get position of the centre of each grid tile 1 Answer
How can I consistently get the rectangle bounds around a mesh? 2 Answers