David Della Rocca
website

English version by
Bert Vrusch
website

 Telescopic_anim
Project for Universe 5.x
Size: 43 ko
Platform: Mac/PC

infos:

Animating a telescopic movement
 
This tutorial will explain to you how to animate a telescopic object using the position constraint. To help you better understand I strongly recommend you to download the Universe project file below. Open it and take a look at it before reading this tutorial. For this example I rapidly modelled a little 'walkie-talkie' with an antenna. Afterwards I duplicated it and applied the constraints only to the second one, allowing you to test this tutorial to the first model.

Short methodology
We have five parts that build up the antenna on which I applied position constraints with 2 null objects (one being a copy of the other)
- One of the two null objects doesn't move
- The other one will be animated on the Y-axis to mount and desend the antenna.

When I animate one of those two null objects, the five antenna parts will position themselves halfway the position of the two null objects.
If you wish that one of those parts is going to be more influenced by a null object, changing the weight towards one of them will do the job.
 
A few notes regarding the model
The antenna which consists of five parts (tel1, tel2, tel3, tel4 et tel5) has been imported in the "top" view. Please note that the link allignment position of each of those parts is set to the top, except for the last piece, which link alignment is placed at the bottom, right underneath the antenna head. The importance of this placement will become clear later on.

The Null objects

I created a Null Object and placed it at the top level of the walkie-talkie box, centered in the antenna's top view window.
I named it 'moving target'
Then I duplicated it and called it's copy 'static target'

The hierarchy : To simplify any kind of animation with the walkie-talkie, all objects and Null Objects have been linked to the box that I named 'Talkie'

The position constraint

The next step consists of applying a position constraint to each of the antenna parts, targeting at the two Null Objects. This will force the individual parts to take on the same positions as the two Null Objects.
To apply the position constraint :
- Select object tel1
- Go to the 'Constraint' menu and choose 'Position'
- Click on the 'moving target' and 'static target' objects in order to assign them as targets
- Hit 'Esc' to finish the operation.

- Repeat this operation for each of the five antenna parts. They all need to be constrained to the Null Objects.
 
You will see that each part now has been modified to follow the exact position of the Null Objects. (modified according to the axes that I deplaced previously). Their positions now depend on the positions of the Null Objects.

For the moment all parts will be attracted equally by 'moving target' as by 'static target'. You can check this by moving one of the Nulls.
The antenna parts will be moving halfway in between both of them.

We will be changing the weight now towards either one, for each of the parts, which will give us our telescopic movement.
 
Tweaking the 'Weight'

- Select the first part (tel1) and open the window 'Constraint Editor'.
In the target list we find our two Null Objects.
- Click on the first one, 'moving target' and change it's weight to 0.2
- Then click on 'static target' and change it's weight to 0.8
As a result, the object 'tel1' now will be attracted more to 'moving target' than to 'static target', all of this in a 80-20% comparison, hence the values 0.2 and 0.8.
- On the next model, tel2, we will be assigning the values 0.4 and 0.6
- On model tel3, 0.6 and 0.4
- On model tel4 0.8 and 0.2
- And on model tel5 1.0 and 0.0
This implies that tel5 will be perfectly take over the position of 'moving target' and not at all 'static target'

All of this is just a matter of multiplication factor

Knowing that at 1.0 the attraction will be complete, and at 0.0 it will be zero, we just have to divide 1.0 by the number of parts that build up the antenna.
In this example we have 5 parts, which leaves us with 0.2 for each part.

Limiting the movement :
To finish it off , all that remains to be done is defining the movement limits for 'moving target', the Null Object that is going to control our animation.
- Select 'moving target' and open the window 'Joint editor'
- In 'Link type' choose 'Custom'
- Click all boxes except the one called ' position Y' so it will be moving only along that axis.

- In the preview window, slide open the antenna to the max
- Select 'moving target' and open the window 'Joint Editor'
- Click the box called 'Limits' and then click the box 'Position'
- For 'Maximum Y' click on the blue triangle (Use current value)

- Slide down the antenna to the minimum position
- For 'Minimum Y' click on the small blue triangle (Use current value)

Right now 'moving target' can only move along the Y-axis, being between the position limits of 0.0 and 95.6. To animate the antenna, you just have to reposition 'moving target' in order to slide it in and out.

Concluding, this works actually quite nice! Feel free and apply this technique to any of your projects using any telescopic variant you've been building.
Take care my Friendz :-)
David Della Rocca