I’ve recently been familiarizing myself with hardware skinning in 3.1 and what the differences we’re between that and software skinning. I now have a few questions regarding hardware skinning.
-
I have an algorithm that worked with software skinning that enabled me to perform a ray cast on a geometry. Using its bone index buffer, I could determine what bones control the particular vertex hit during the ray cast. The problem I am having now using hardware skinning is that the bone index buffer’s internal array is null (essentially, it as no array and throws a UnsupportedOperationException when calling array()). I saw that there was another buffer type for bone indexes when using hardware skinning called HWBoneIndex, but that buffer gives me the same result. Where is the data stored for bone indexes when using hardware skinning?
-
I have another algorithm that lets me switch in and out parts of body/clothing for a character. All parts we’re exported under the same skeleton. When using software skinning it is a simple as detaching and attaching geometries to the node having the skeleton control and the geometries adjust automatically to the skeleton’s transforms. However for hardware skinning it is not that simple. I found that I had to use reflection to call the updateTargetsAndMaterials() and switchToHardware() methods from the skeleton control so that my geometry adjusted to the skeleton’s transforms. Is there an easier way to let the skeleton control know that it needs to add a new geometry and a new material in its lists?