1. Tutorial Third Peg Transfer
Exercise
School of Electrical Engineering & Computer Science,
1
National University of Sciences & Technology, Pakistan
2. What’s new
• Practice of Rigid Mechanical Object.
• A proper interactive exercise making practice to
train some one.
3. Scene
Now what we want to build right now is
• Some static bars placed on a static tray enclosed in
a static cubical box which is opened from one side.
• Along with Two pegs one Rigid and one Deformable
placed in the box.
• A practitioner will have to put those pegs in one bar
and then transfer t to the other bar by pick and
place it up in another bar.
4. Adding nodes
• First of all add four nodes to the Root Node and
name them
1. Peg Box.
2. Peg Tray.
3. Bars.
4. Peg Deformable.
• Now add the collision and Visual Nodes to them.
6. MeshTopology
• Now Add Mesh topology to all.
• In every node’s meshtopology component, add
following object file’s location in the fileTopology
blank of property 1/3,in respect to there name.
1. pegbox.obj (attached with this exercise) for Peg Box node’s
Mestopology Object.
2. pegtray.obj (attached with this exercise) for Peg Tray node’s
Mestopology Object.
3. bars.obj (attached with this exercise) for Bars node’s
Mestopology Object.
4. torus.obj (attached with this exercise) for Peg Deformable
node’s Mestopology Object.
9. Collision Model
• Now we will have to add the collision models in all
of the collision nodes of the object nodes.
– For this we will drag and drop Ttriangle model in all of
the collision nodes other than Peg deformable.
– In Peg deformable we will add Tsphere model in the
collision nodes of the Peg-Deformable
10. Additions in the Peg
Deformable
• As we want our peg to feel all of the forces and deform
and displace accordingly.
• We will have to add some other properties differing
from the other nodes like mass, ODE & Linear solver
along with some Force Field in Peg Deformable.
• In our current exercise the user will handle and move
the peg on his will, so we will have to assign a separate
mestopolgy and the mechanical object to the collision
node.
• To map the Graphical and Collision nodes on the parent
node’s objects we will add Barycentric mapping in both
of them.
12. Peg Rigid
• Now we will make a Rigid Peg alongside over
deformable Peg.
– For this we will repeat all of the steps done for the Peg
Deformable except the Mechanical state object, Mass and
the Force Fields of Vec3d will be replaced by the Rigid Ones.
– And In the inferior nodes we will replace Barycentrtic
mapping with Rigid Mapping.
– Translate the initial position of OglModel and Mechanical
state to the 10 units on the X axis.
– Change the color of the peg by changing the values of
Ambient in the property 2/4 of the Ogl Model.
13.
14. Resultant Animated Exercise
• Now Animate the scene, there you will see two
pegs side by side
1. Deformable Vec3d.
2. Non-Deformable Rigid.
• To practice pick one peg by simultaneous clicking
the Left and pressing shift key on them and place
them in one desired bar.