General Category > General Anim8or Forum

Where can I start? II - Chat Room

<< < (3/8) > >>

thecolclough:
owl - if you mean what i think you mean, then the simplest solution is (believe it or not...) to have 2 copies of object2 in your scene: the first one is the one that sits in the starting location before object1 arrives, and the second should be set as a child of object1 so that it will be carried around wherever object1 goes; use Visibility keyframes on the two copies to instantaneously swap between them, so that it appears as if there is only 1 of the item in the scene and object1 collects it en route.

Owl:
By 'rigidly attach' to object 2', I mean move as if they were one object, like welded or screwed together.
The idea is that a pallet is brought in to the scene, a shoe box is brought into the scene and placed on the pallet, the pallet then moves away together with the box. The box is sitting and not moving on the pallet.
Hope that helps.

Owl:
Ok I was kinda doing that. What you offer is an important difference:
I think you are suggesting ... Have object1 and object2 as separate elements and object1 attached to object2 as a separate element we will call object3.
Object 3 is a child to object 1 and is at first not visible. On the frame after object2 is attached to object1, the visibility of the object1, object2 and object3 is logically-inverted. Right?
Thank You.

Raxx:
Keyframed parenting is a feature request and hasn't been implemented yet. However, if you aren't afraid to try it, an alternate solution is to use ASL to attach one object to another in the Scene editor, and change at specific frames.

ASL is a fairly new and experimental feature, so it's not very much documented yet, especially for the scene editor. It's fairly powerful though. Below is an animation I made in 20 minutes using a few lines of code and basic scene setup. The sphere is the child and changes parents from the cube to the cone.


function selectText(containerid){if(document.selection){var range = document.body.createTextRange();range.moveToElementText(document.getElementById(containerid));range.select();}else if (window.getSelection){var range = document.createRange();range.selectNode(document.getElementById(containerid));window.getSelection().removeAllRanges();window.getSelection().addRange(range);}}ASL Snippet/* Declaring variables */point3 $parent1Loc, $parent2Loc; /* Grab the parent positions */$parent1Loc = GetAttributePoint3("eobject02", "position");$parent2Loc = GetAttributePoint3("eobject03", "position"); /* If we&#039;re in frames 0 - 24, use parent01 position plus 100 units on the Y axis*/if (frame >= 0 && frame <= 24)$position = $parent1Loc + (0,50,0);else /* Switch to parent02 */$position = $parent2Loc + (0,50,0);

ENSONIQ5:
Great solution Raxx.  Scene-mode scripting = POWER!!

Owl, re your earlier post about visibility switching, it is not possible to 'attach' or 'detach' elements using keyframes (other than through a script like Raxx's).  Parent/child relationships are set up initially and are retained throughout an animation.  thecolclough's solution is to bring three elements into your scene: The pallet (element = Pallet), plus two separate copies of your shoebox (elements Shoebox1 and Shoebox2).  Shoebox1 is made a child of Pallet and is located (in all frames) in its final position relative to the pallet, ie sitting on it, and it's visibility is initially set to not visible.  The Pallet element is animated as required, and the invisible Shoebox1 moves with it.

Shoebox2 is a free element with no parent/child relationship.  Initially visible, it is animated to be placed on the pallet, it's final position corresponding exactly with the location of Shoebox1.  At whatever frame both shoebox elements are co-located, the visibility of each is switched, so Shoebox1 becomes visible and Shoebox2 becomes invisible.  Shoebox2 can then remain stationary and invisible, while Shoebox1 moves away with the pallet.  If the keyframing and animation is done correctly the viewer will perceive both shoebox elements as a single object moving through the scene.

Personally, I prefer the script solution for its elegance, however visibility-switching can be a very useful solution to a number of animation challenges.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version