Global space to local altered hierarchy
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/01/2008 at 08:41, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R9-R10
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;---------
This is a tricky situation. I have a sphere object whose global transformations place it with respect to one of the bones of a rigged object (figure). The transformation relationship is only valid when the figure is 'zeroed' (initial pose, no other transformations on it).The two simultaneous problems that I face are these:
1. The sphere object isn't a real object - it is the result of BaseDraw::DrawSphere() - so nothing to parent, no way to get a local matrix from the global one being constructed.
2. The figure may not be zeroed. Since this involves interactive drawing of the sphere while values are being changed, it is not recommended to zero the figure, parent a temporary object (with the sphere's global matrix), repose the figure, and extract the relevant matrix while interactivity continues. That would be insane - the time it takes to do this would not be commensurate to reasonable interactivity.
So, I've been trying to visualize how this could be done strictly with matrices - and my head hurts. Remember that I'm given global transforms which can be made local to the zeroed figure but the figure may not be zeroed - and I have no real thing to manipulate but matrices.
Even if I were to store the bone's global matrix when the figure is zeroed, how would one interpolate between this and the posed global matrix? I can't apply the bone's global matrix since the sphere's is already global.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/01/2008 at 11:05, xxxxxxxx wrote:
Got it.
Already had the bone's zeroed global matrix but needed to remove the bone orientation to add a possibly changed one and remove the bone's global origin to make the transition from global to local for the sphere. The major problem was getting the order of concatenations correct between the sphere's global matrix, the bone's local zero matrix, and the bone's global matrix - eeks.
Maybe my hair will grow back eventually?