[Solved] How to include skinIndices and skinWeights when converting ExtrudeGeometry to BufferGeometry?

I am currently trying to rig a programmatically generated extruded geometry and I have a problem with assigning skin indices and skin weights to the geometry’s vertices. I tried creating an ExtrudeBufferGeometry and programmatically seting the skinIndex and skinWeight attributes but this method is quite difficult since ExtrudedBufferGeometry is non indexed and tracking the indices of certain vertices is quite a pain.

Another approach I’m trying out right now is creating an ExtrudeGeometry first, then setting its skinIndices and skinWeights, then converting it to a BufferGeometry using “new THREE.BufferGeometry().fromGeometry( geometry );”. I was hoping it would include the skin indices and weights to the converted geometry but that does not seem to be the case.

Is it really intended for Three to strip off the skinIndices and skinWeights when converting to BufferGeometry? If that’s the case, why does Geometry even have those properties if it wouldn’t be carried over to the converted BufferGeometry? Isn’t BufferGeometry the only way for implementing Skeletons? If not, is there a way to implement Skeletons on a Geometry?

Just looked through BufferGeometry Class codes and it seems to be expecting array of Vector4s. Sorry, mistake on my end.

Just to clarify: Skin indices and weights are respected when converting from Geometry to BufferGeometry. But both properties are only one part of the data you need for skeletal animation. THREE.Skeleton represents a hierarchy of animated bones and thus the actual virtual skeleton of a character. The skin indices and weights are only necessary to determine how the bones influence/affect the vertices of the geometry.

Since R99, SkinnedMesh does not support Geometry anymore. In general, you should try to avoid using Geometry since at some point it is not rendered anymore.