Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Hierachies, nested coordinate frames, and all that

Douglas Douglas
Registered User
Join date: 13 Dec 2006
Posts: 29
04-22-2007 04:36
I often make use of hiearchies (nested coordinate frames) when building articulated structures. Can someone please clarify the relationship between SL linking and traditional hierarchies. Say, for example I want to do a simple forward kinematic linkage. Can that be done via clever linking or do I have to resort to scripting. If scripting is the answer could someone please point me to a very basic example.

Cheers,
Doug
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
04-22-2007 07:47
The answer is easy, but you're not gonna like it. There is no hierarchy. You have one parent per object, and all the children are at the same level below. That's it.

I asked Cory Linden once if there were any plans to add more levels. His answer was "our original thinking was 'nature doesn't have hierarchy so why should we?' That thinking was wrong, so we'll change that." Well, that was over two years ago, and how many levels do we have now? That's right, just one parent and one child level, same as always. :mad:
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Douglas Douglas
Registered User
Join date: 13 Dec 2006
Posts: 29
04-22-2007 08:53
Ouch. I hoped I wouldn'd hear that. I'm stunned. That truly sucks.

Sigh.

So what is the recommended work around to achieve hierarchical transformation. Is there and LSL approach? Examples?

Sadder but wiser,
Doug
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
04-22-2007 12:24
While this turns it into more of a scripting discussion than a building one...

I'd set up each child branch with a list of it's parent links (excluding the root, since transformations to the root, by definition, apply to the whole tree). i.e. Right Hand would list the Right Forearm, Right Upper Arm, Right Clavicle and Spine links. Then, anytime a branch is transformed, it would spam that transformation to all children in the linkset via link_message, using a format something like that described here. When a branch receives such a message, it searches its list of parent links for the sender, and if found, applies the appropriate transformation to itself. i.e., the Right Hand wouldn't apply transformations from the Left Thigh or Head.
Douglas Douglas
Registered User
Join date: 13 Dec 2006
Posts: 29
04-22-2007 14:55
Cool Deanna Trollop. So there is hope. I'll take a look.

Cheers,
Doug