How are weights set for multi bone DTS?
by David Mathews · in Torque Game Engine · 09/03/2005 (5:03 pm) · 8 replies
I finally added multi bone (multiple bone weights per vertex) to my DTS export, but the partially weighted points head toward the origin.
I'm using weights that sum to 1.0. How do they need to be set for multiple bone DTS?
I am just adding the bone index, point index and then weight, as many as needed, to the skin mesh arrays. It works fine as long as I have only one and the weight is 1.0. Partial weights give add results.
I'm using weights that sum to 1.0. How do they need to be set for multiple bone DTS?
I am just adding the bone index, point index and then weight, as many as needed, to the skin mesh arrays. It works fine as long as I have only one and the weight is 1.0. Partial weights give add results.
#2
Are you sure that the skinning code is actually processing more than one bone? Perhaps there's an ordering constraint in the data.
09/03/2005 (6:26 pm)
Pretty sure the positions are weighted.Are you sure that the skinning code is actually processing more than one bone? Perhaps there's an ordering constraint in the data.
#3
I'm processing through the bones, writing out each point it affects along with the weight.
I just did some tests with the ShowToolPro and the weights are as I exported them. Any joint point that is set .5 to one bone and .5 to another is correctly showing up tied to both bones at roughly .5 (from the color), but way out of place.
How do the multi weights work?
.5 to one bone and .5 to another does not work (the normal weigh method).
How does Torque weight bones?
09/03/2005 (6:45 pm)
Hi Ben,I'm processing through the bones, writing out each point it affects along with the weight.
I just did some tests with the ShowToolPro and the weights are as I exported them. Any joint point that is set .5 to one bone and .5 to another is correctly showing up tied to both bones at roughly .5 (from the color), but way out of place.
How do the multi weights work?
.5 to one bone and .5 to another does not work (the normal weigh method).
How does Torque weight bones?
#4
Maybe export a skinned cube and single step through the skinner?
09/04/2005 (8:08 pm)
The implementation half way down tsMesh.cc. It's just a normal additive weight. But it does do some optimizations.Maybe export a skinned cube and single step through the skinner?
#5
My onlyexport issue now is why models over 5,000 or so triangles do not display properly. I don't see any limits in the file format.
09/06/2005 (6:29 pm)
The issue was the order. It has to be ordered by vertex id to be additive or only the last weight for a vertex gets used. So with the list reordered, the weights are working now as I would expect.My onlyexport issue now is why models over 5,000 or so triangles do not display properly. I don't see any limits in the file format.
#6
09/06/2005 (10:41 pm)
How many verts?
#7
It animates in reasonable time in either view tool, but at least half the triangles are drawn to a bad vertex. It seems that after a certain number of triangles, it is no longer correctly referencing the vertex list, as if the index into the vertex list is to small. But I haven't seen anything used less than an int, so it should work, just be slow.
Is there any place where a short is being used? I haven't found one.
4,300 triangles is the most I've gotten to work so far.
(I'm still trying to get the dsq file to work with my morphs - everything else is done.)
09/07/2005 (7:19 am)
I have one test with 30,000, trying to see if I can get one that size to work.It animates in reasonable time in either view tool, but at least half the triangles are drawn to a bad vertex. It seems that after a certain number of triangles, it is no longer correctly referencing the vertex list, as if the index into the vertex list is to small. But I haven't seen anything used less than an int, so it should work, just be slow.
Is there any place where a short is being used? I haven't found one.
4,300 triangles is the most I've gotten to work so far.
(I'm still trying to get the dsq file to work with my morphs - everything else is done.)
#8
09/07/2005 (12:00 pm)
I've run into some issues with particularly large meshes as well - not quite sure where the problem originates. Originally I guessed it was due to a bad tristripper in the exporter, but if your exporter is all homegrown that blows that theory.
Torque 3D Owner David Mathews
They go half way to the origin.
What is the weighting scheme for DTS since it is not a normalized one?
(It actually appears to only use the first weight it hits in the list.
Do I have to flag multi bone somewhere?)