SlideShare a Scribd company logo
Tutorial Falling Cube




School of Electrical Engineering & Computer Science,
                                                         1
National University of Sciences & Technology, Pakistan
Run Sofa Modeler
• After installing sofa
• Go to the bin folder at installed location and double
  click the Modeler




                      Muhammad Muddassir Malik      2
Modeler
• After double clicking a Modeler a GUI window will
  open up as shown below, with sofa components on
  its left side and scene graph on its right.




                    Muhammad Muddassir Malik    3
• There you will see root node already added.
  – This node will control the global behavior of the
    simulation.
  – Majority of them are used to control the Collisions and
    the responses between two or more objects during the
    simulation.
     • In our current exercise there is only one object so all of them
       are not needed.
  – All new nodes will be added under it and consequently
    properties added to it will effect upon all other nodes.

                           Muhammad Muddassir Malik                 4
Deleting the unwanted nodes
• Delete all of the already placed properties root node by
  selecting them and pressing the delete button (as they are
  not required in our current exercise)




                        Muhammad Muddassir Malik         5
Adding a node
• Then you have to add a node under whom whole
  properties for a physical entity is going to be placed.
• For this you have to drag and drop GNode (placed
  almost at left bottom of the Modeler under Sofa
  Components) on Root node.




                      Muhammad Muddassir Malik       6
Adding a node




  Muhammad Muddassir Malik   7
Name the node
• To name the node double click on the node and
  overwrite your desired name in object name blank
  of property 1/2 tab. In this example we will name it
  cube and then press the ok button.




                     Muhammad Muddassir Malik      8
Mesh topology
• First of all to define and/or load the topology our
  object’s mesh we have to add the MeshTopology
  component.
• MeshToplogy define the topology and the relation
  of one vertices with the other.
• Drag and Drop MeshTopology (lying in Topology
  drop down of the sofa components) on the cube
  node.


                     Muhammad Muddassir Malik      9
Mesh topology




   Muhammad Muddassir Malik   10
Loading the Mesh
• Now we need to load and link the mesh of our object.
• Three easy ways to link and/or load the mesh with the topology are
   – Load the mesh with in MeshTopolgy object.(practiced in this
      exercise)
   – Link the already Loaded Mesh (loaded through a loader e.g.
      MeshObjLoader)
   – Define the position of vertices in the mechanical object.
• To load the mesh file double click the MeshTopolgy Object and it will
  open up a new Window.
• In Property 1/3, under file topology Click on the three dots like … in
  front filename of the object and browse it to the location of your
  intended object file (which is C:sofasharemeshcube.obj in our
  current case).
                             Muhammad Muddassir Malik               11
Loading the Mesh




    Muhammad Muddassir Malik   12
Mechanical state
• To define the mechanical properties and degree of
  freedom you will have to add mechanicalObject.
  – Here in Mechanical state of Rigid type object can only
    act in a non-deformable way.
  – While Vec3d type objects could act in both deformable
    and non-deformable way.
  – LaparoscopicRigid3 act same as Rigid type but with a
    pivot in its center.
  – Here 3d means three dimensional degrees of freedom
    with precision of double and 3f means 3 dimensional
    degree of freedom with precision of float.

                       Muhammad Muddassir Malik        13
Adding MechanicalObject
• Click Mechanical State to open the drop down
  – there you will find another drop down on the right side
     • click to open that dropdown and select Vec3d from it
• Drag and drop MechanicalObject with Vec3d option
  on the node present in the scene graph.




                         Muhammad Muddassir Malik             14
Adding Mass to the object
• To define the mass of the object you have to add a
  Mass component.
• Click on the Mass option (Just above Mechanical State)
  in sofa components to have a look at the available mass
  options in a drop down form.
• Select the Uniform Mass (simplest) of Vec3d for the
  current exercise others will be used in relatively
  complex type of exercises.
  – Make sure it is of same type as of MechanicalObject which is
    Vec3d in our current case.
• Drag and drop it on the cube node.
                        Muhammad Muddassir Malik            15
Adding Mass to the object




        Muhammad Muddassir Malik   16
Adding Solvers
• Now to solve all of the equations running behind the
  intended simulation we have to add some
  mathematical solver.
• For the instance you will have to add an ode solver
  followed by a linear solver for our current exercise.
• Resultant of our ODE solver are the Linear equations
  which are further efficiently solved by Linear Solver.
• For that you will have to drag and drop
  EulerImplicitSolver from ode solver and CGLinearSolver
  from Linear Solver.

                      Muhammad Muddassir Malik      17
Adding Solvers




   Muhammad Muddassir Malik   18
Visual node
• Afterwards we will put another GNode in our cube
  Node to handle the graphical display.
• For that we will again drag and drop GNode on cube
  node and name it cubeVisual.




                    Muhammad Muddassir Malik    19
Visual Model
• We will now have to place a graphical display
  modeler in the node.
• For that we will drag and drop the OglModel from
  the VisualModel dropdown.
• In the property 2/4 of OglModel we will browse file
  mesh the location of the intended show model
  which is C:sofasharemeshcube.obj in our
  current case.


                     Muhammad Muddassir Malik     20
OglModel




Muhammad Muddassir Malik   21
Mapping
• Now to map our graphical model on the mechanical
  object we will use a mapping function.
• For this purpose you will have to drag and drop
  BarycentricMapping from the mapping dropdown
  of the sofa component to the Visual Node.




                    Muhammad Muddassir Malik   22
Adding Barycentric Mapping




         Muhammad Muddassir Malik   23
Run sofa
• Now you are done with your development of first
  exercise i.e. falling cube due to gravitational force.
• Click the run in sofa button, lying on the to middle
  of the modeler screen.




                       Muhammad Muddassir Malik       24
Animate
• It will open up another GUI window.
• There you have to click the animate button to run
  the animation.




                     Muhammad Muddassir Malik    25
Video




Muhammad Muddassir Malik   26

More Related Content

PDF
From Experimentation to Production: The Future of WebGL
PPTX
TASK 2
PPTX
Week 10 - Introduction to Animation in 3DS Max
PDF
Avalanche and Meteor Destruction
PPT
Benchmarking expert surgeon's_path_for_evaluating_a_trainee_surgeon_presentation
PPTX
Tutorial two cubes falling on a floor due to gravity
PPTX
Tutorial fourth inserting a laproscopic instrument
PPTX
Tutorial third peg transfer exercise
From Experimentation to Production: The Future of WebGL
TASK 2
Week 10 - Introduction to Animation in 3DS Max
Avalanche and Meteor Destruction
Benchmarking expert surgeon's_path_for_evaluating_a_trainee_surgeon_presentation
Tutorial two cubes falling on a floor due to gravity
Tutorial fourth inserting a laproscopic instrument
Tutorial third peg transfer exercise

Viewers also liked (6)

PPTX
Piug presentation jane_list_lighthouse_ip_group_2012
DOC
天闻数媒科技(北京)有限公司招聘需求及简介
PDF
Sdv 2012 powerpoint_wg_lagemaat_endnote
PDF
Sdv 2012 powerpoint_wg_lagemaat_endnote
PDF
INTRODUCTION TO Monarch Advisory Group
PDF
Vm sistemi suite data discovery
Piug presentation jane_list_lighthouse_ip_group_2012
天闻数媒科技(北京)有限公司招聘需求及简介
Sdv 2012 powerpoint_wg_lagemaat_endnote
Sdv 2012 powerpoint_wg_lagemaat_endnote
INTRODUCTION TO Monarch Advisory Group
Vm sistemi suite data discovery
Ad

Similar to First Tutorial - Falling cube (20)

PDF
Incarnation - Turning Real World Objects into Perfume World
PPT
Max2015 ch01
PPTX
Methods of protyping-1.pptx
RTF
PPTX
Polybot Onboarding Process
PDF
Mode d’emploie delta force xtreme mission editor
RTF
redmy
PPTX
DESIGN AND SIMULATION OF 3D PRINTING MACHINE IHP.pptx
PDF
mastercam_full
PDF
mastercam_full
PDF
Geogebra for physics
PDF
Beginning iOS6 Development CH04 More User Interface Fun
DOCX
Fluid Mechanics Project Assignment (Total 15)  Due Dates  .docx
PDF
Lecture2_practice.pdf
PPTX
Unity - Building your first real-time 3D project
PPTX
SolidWorks report.pptx
PPTX
FCPL 2022.pptx
PPTX
computergrapgichiddensurfacemethodes.pptx
PPTX
Modeling for 3D Printing with Tinkercad
PDF
VGEGIS%20Training%20Tutorial
Incarnation - Turning Real World Objects into Perfume World
Max2015 ch01
Methods of protyping-1.pptx
Polybot Onboarding Process
Mode d’emploie delta force xtreme mission editor
redmy
DESIGN AND SIMULATION OF 3D PRINTING MACHINE IHP.pptx
mastercam_full
mastercam_full
Geogebra for physics
Beginning iOS6 Development CH04 More User Interface Fun
Fluid Mechanics Project Assignment (Total 15)  Due Dates  .docx
Lecture2_practice.pdf
Unity - Building your first real-time 3D project
SolidWorks report.pptx
FCPL 2022.pptx
computergrapgichiddensurfacemethodes.pptx
Modeling for 3D Printing with Tinkercad
VGEGIS%20Training%20Tutorial
Ad

Recently uploaded (20)

PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation theory and applications.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Empathic Computing: Creating Shared Understanding
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Cloud computing and distributed systems.
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
Electronic commerce courselecture one. Pdf
Encapsulation theory and applications.pdf
Programs and apps: productivity, graphics, security and other tools
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Dropbox Q2 2025 Financial Results & Investor Presentation
“AI and Expert System Decision Support & Business Intelligence Systems”
Empathic Computing: Creating Shared Understanding
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Encapsulation_ Review paper, used for researhc scholars
Review of recent advances in non-invasive hemoglobin estimation
Advanced methodologies resolving dimensionality complications for autism neur...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Cloud computing and distributed systems.
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Understanding_Digital_Forensics_Presentation.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?

First Tutorial - Falling cube

  • 1. Tutorial Falling Cube School of Electrical Engineering & Computer Science, 1 National University of Sciences & Technology, Pakistan
  • 2. Run Sofa Modeler • After installing sofa • Go to the bin folder at installed location and double click the Modeler Muhammad Muddassir Malik 2
  • 3. Modeler • After double clicking a Modeler a GUI window will open up as shown below, with sofa components on its left side and scene graph on its right. Muhammad Muddassir Malik 3
  • 4. • There you will see root node already added. – This node will control the global behavior of the simulation. – Majority of them are used to control the Collisions and the responses between two or more objects during the simulation. • In our current exercise there is only one object so all of them are not needed. – All new nodes will be added under it and consequently properties added to it will effect upon all other nodes. Muhammad Muddassir Malik 4
  • 5. Deleting the unwanted nodes • Delete all of the already placed properties root node by selecting them and pressing the delete button (as they are not required in our current exercise) Muhammad Muddassir Malik 5
  • 6. Adding a node • Then you have to add a node under whom whole properties for a physical entity is going to be placed. • For this you have to drag and drop GNode (placed almost at left bottom of the Modeler under Sofa Components) on Root node. Muhammad Muddassir Malik 6
  • 7. Adding a node Muhammad Muddassir Malik 7
  • 8. Name the node • To name the node double click on the node and overwrite your desired name in object name blank of property 1/2 tab. In this example we will name it cube and then press the ok button. Muhammad Muddassir Malik 8
  • 9. Mesh topology • First of all to define and/or load the topology our object’s mesh we have to add the MeshTopology component. • MeshToplogy define the topology and the relation of one vertices with the other. • Drag and Drop MeshTopology (lying in Topology drop down of the sofa components) on the cube node. Muhammad Muddassir Malik 9
  • 10. Mesh topology Muhammad Muddassir Malik 10
  • 11. Loading the Mesh • Now we need to load and link the mesh of our object. • Three easy ways to link and/or load the mesh with the topology are – Load the mesh with in MeshTopolgy object.(practiced in this exercise) – Link the already Loaded Mesh (loaded through a loader e.g. MeshObjLoader) – Define the position of vertices in the mechanical object. • To load the mesh file double click the MeshTopolgy Object and it will open up a new Window. • In Property 1/3, under file topology Click on the three dots like … in front filename of the object and browse it to the location of your intended object file (which is C:sofasharemeshcube.obj in our current case). Muhammad Muddassir Malik 11
  • 12. Loading the Mesh Muhammad Muddassir Malik 12
  • 13. Mechanical state • To define the mechanical properties and degree of freedom you will have to add mechanicalObject. – Here in Mechanical state of Rigid type object can only act in a non-deformable way. – While Vec3d type objects could act in both deformable and non-deformable way. – LaparoscopicRigid3 act same as Rigid type but with a pivot in its center. – Here 3d means three dimensional degrees of freedom with precision of double and 3f means 3 dimensional degree of freedom with precision of float. Muhammad Muddassir Malik 13
  • 14. Adding MechanicalObject • Click Mechanical State to open the drop down – there you will find another drop down on the right side • click to open that dropdown and select Vec3d from it • Drag and drop MechanicalObject with Vec3d option on the node present in the scene graph. Muhammad Muddassir Malik 14
  • 15. Adding Mass to the object • To define the mass of the object you have to add a Mass component. • Click on the Mass option (Just above Mechanical State) in sofa components to have a look at the available mass options in a drop down form. • Select the Uniform Mass (simplest) of Vec3d for the current exercise others will be used in relatively complex type of exercises. – Make sure it is of same type as of MechanicalObject which is Vec3d in our current case. • Drag and drop it on the cube node. Muhammad Muddassir Malik 15
  • 16. Adding Mass to the object Muhammad Muddassir Malik 16
  • 17. Adding Solvers • Now to solve all of the equations running behind the intended simulation we have to add some mathematical solver. • For the instance you will have to add an ode solver followed by a linear solver for our current exercise. • Resultant of our ODE solver are the Linear equations which are further efficiently solved by Linear Solver. • For that you will have to drag and drop EulerImplicitSolver from ode solver and CGLinearSolver from Linear Solver. Muhammad Muddassir Malik 17
  • 18. Adding Solvers Muhammad Muddassir Malik 18
  • 19. Visual node • Afterwards we will put another GNode in our cube Node to handle the graphical display. • For that we will again drag and drop GNode on cube node and name it cubeVisual. Muhammad Muddassir Malik 19
  • 20. Visual Model • We will now have to place a graphical display modeler in the node. • For that we will drag and drop the OglModel from the VisualModel dropdown. • In the property 2/4 of OglModel we will browse file mesh the location of the intended show model which is C:sofasharemeshcube.obj in our current case. Muhammad Muddassir Malik 20
  • 22. Mapping • Now to map our graphical model on the mechanical object we will use a mapping function. • For this purpose you will have to drag and drop BarycentricMapping from the mapping dropdown of the sofa component to the Visual Node. Muhammad Muddassir Malik 22
  • 23. Adding Barycentric Mapping Muhammad Muddassir Malik 23
  • 24. Run sofa • Now you are done with your development of first exercise i.e. falling cube due to gravitational force. • Click the run in sofa button, lying on the to middle of the modeler screen. Muhammad Muddassir Malik 24
  • 25. Animate • It will open up another GUI window. • There you have to click the animate button to run the animation. Muhammad Muddassir Malik 25