Custom Shape Mod Resource: is the theory sound ?
by Orion Elenzil · in Torque Game Engine · 02/19/2009 (11:28 am) · 7 replies
sorry for posting in the forums about a resource,
but i think there may not be many people subscribed to the resource in question.
we've implemented Duncan Gray's fantastic Custom Shape Mod resource, which lets you dynamically change the scale of bones in a skeleton, thus enabling effects like popeye arms or different body types.
however, i think there may be a fundamental problem with the approach,
and would love to hear from other folks who've worked with it.
say we have two bones, bParent and bChild.
the problem i'm seeing is that the bone bChild inherits the scale of bParent in bParent's reference frame, not the frame of the child. So say the parent's neutral position is up-and-down, and has scaled "forward", so that the vertices are farther from the bone. if the child is also up-and-down, all is well. but if the child is rotated so that the child bone itself points forward, then the child bone stretches in length.
this means that if you scale say the thigh, the feet quickly lose registration with the ground.
i would love to hear if anyone has had success with this resource,
or if someone has Duncan's email i'd like to drop him a line.
tia,
orion
but i think there may not be many people subscribed to the resource in question.
we've implemented Duncan Gray's fantastic Custom Shape Mod resource, which lets you dynamically change the scale of bones in a skeleton, thus enabling effects like popeye arms or different body types.
however, i think there may be a fundamental problem with the approach,
and would love to hear from other folks who've worked with it.
say we have two bones, bParent and bChild.
the problem i'm seeing is that the bone bChild inherits the scale of bParent in bParent's reference frame, not the frame of the child. So say the parent's neutral position is up-and-down, and has scaled "forward", so that the vertices are farther from the bone. if the child is also up-and-down, all is well. but if the child is rotated so that the child bone itself points forward, then the child bone stretches in length.
this means that if you scale say the thigh, the feet quickly lose registration with the ground.
i would love to hear if anyone has had success with this resource,
or if someone has Duncan's email i'd like to drop him a line.
tia,
orion
About the author
#2
03/03/2009 (8:45 am)
bump around! bump around !
#3
i would be on a killing spree.
03/18/2009 (12:15 pm)
if this thread were an unreal tournament match,i would be on a killing spree.
#4
03/29/2009 (5:59 pm)
Most likely, a suicidal spree.
#5
It applies the parent scale to the child instead of transforming the parents scale into the childs local transformation space and apply it there.
commonly the transform is applied top down in the hierarchy from root to child and on each step you have a new matrix transformation ie new matrix multiplication of the parent transform * local tranform
sounds like exactly that part is not working and as such the parent transform is applied to the child so it gets "stretched forwards" instead of "vertically"
03/30/2009 (6:37 am)
from what you describe sounds like the child transform is just incorrect.It applies the parent scale to the child instead of transforming the parents scale into the childs local transformation space and apply it there.
commonly the transform is applied top down in the hierarchy from root to child and on each step you have a new matrix transformation ie new matrix multiplication of the parent transform * local tranform
sounds like exactly that part is not working and as such the parent transform is applied to the child so it gets "stretched forwards" instead of "vertically"
#6
i'm sure this can be fixed, but if someone's already fixed it that would be handy.
06/05/2009 (10:58 am)
bump - i may be looking at this again soon, and marc's description is quite apt. the deformations are happening in the parent's frame instead of the child's.i'm sure this can be fixed, but if someone's already fixed it that would be handy.
#7
Each transform take care on 3 unit vectors (lenght=1) and a position.
If you break that rule,and use normal vectors with lenght of "N",you actually will handle a transform with scale = "N".
So there is a way to control the axis scale (Nx,Ny,Nz) breaking the lenght of the normal unit vector (a hacky resolution).
I had a similar issue with my custom projectiles,i needed to control the scale without the external scale factor.
Using this approach you can custom-adjust the scale.
06/05/2009 (11:35 am)
Actually the transform can handle a "hidden" scale.Each transform take care on 3 unit vectors (lenght=1) and a position.
If you break that rule,and use normal vectors with lenght of "N",you actually will handle a transform with scale = "N".
So there is a way to control the axis scale (Nx,Ny,Nz) breaking the lenght of the normal unit vector (a hacky resolution).
I had a similar issue with my custom projectiles,i needed to control the scale without the external scale factor.
Using this approach you can custom-adjust the scale.
Associate Orion Elenzil
Real Life Plus