- Home /
Procedural Skinned mesh?
I understand what the SkinnedMeshRenderer does. I also understand how I can create a Mesh, and have it rendered through a MeshFilter. However, what I want to do is create a skinned mesh -- at runtime. The mesh class has vertex channels for position, normal, texture coordinates, color and tanget, but no vertex channel for bone index or weight.
Suppose I have a game that will download data at runtime, and this data will be in the form of a vertex buffer that contains position, normal, texture coordinate, bone index and bone weight data. How should I go about rendering this data in Unity? (I don't want to calculate the skinned mesh output "by hand" in JavaScript or C#; I want to use the built-in optimized skin rendering)
Answer by Eric5h5 · Jan 07, 2011 at 05:13 AM
The mesh class has vertex channels for position, normal, texture coordinates, color and tanget, but no vertex channel for bone index or weight.
Yes, it does. Mesh.boneWeights, also Mesh.bindPoses; see the docs.
I will read the docs, right after I return from my date with the optometrist :-) I guess I was reading old/incomplete docs (not the actual reference docs). Thanks!
How old? :) I think $$anonymous$$esh.boneWeights has been in there since Unity 2.0 or thereabouts.
Your answer
Follow this Question
Related Questions
Grouping vertexes using bones 1 Answer
Changing mesh on SkinnedMeshRenderer causes deformation 1 Answer
Ripped model requires skinned mesh 1 Answer
ImportFBX Error with .DAE 0 Answers
Bump mapping procedural mesh. 1 Answer