SOFA : Design for Parallel Computations Jérémie Allard.

Slides:



Advertisements
Similar presentations
FEA Reference Guide See additional material herehere.
Advertisements

Advanced Character Physics
Modelling FSI problems in ANSYS Fluent via UDF
CISC 879 : Software Support for Multicore Architectures John Cavazos Dept of Computer & Information Sciences University of Delaware
Course Outline Introduction in algorithms and applications Parallel machines and architectures Overview of parallel machines, trends in top-500 Cluster.
Hierarchical Multi-Resolution Finite Element Model for Soft Body Simulation Matthieu Nesme, François Faure, Yohan Payan 2 nd Workshop on Computer Assisted.
Adaptive dynamics for Articulated Bodies. Articulated Body dynamics Optimal forward dynamics algorithm –Linear time complexity –e.g. Featherstone’s DCA.
GATE D Object Representations (GATE-540) Dr.Çağatay ÜNDEĞER Instructor Middle East Technical University, GameTechnologies & General Manager SimBT.
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 24: Animation Many slides courtesy Adam Finkelstein,
Quasi-Rigid Objects in Contact Mark Pauly Dinesh PaiLeo Guibas Stanford UniversityRutgers UniversityStanford University.
Interactive Animation of Structured Deformable Objects Mathieu Desbrun Peter Schroder Alan Barr.
CSE351/ IT351 Modeling and Simulation
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 20: Inverse Kinematics Ravi Ramamoorthi Most slides courtesy.
Articulated Body Dynamics The Basics Comp 768 October 23, 2007 Will Moss.
Adaptive Dynamics of Articulated Bodies. Articulated bodies in Computer Graphics – Humans, hair, animals – Trees, forests, grass – Deformable bodies –
Dr. Y.P. Daniel Chang Weidong Zhang Velocity Transformation Based Multi-Body Approach for Vehicle Dynamics Abstract: An automobile is a complex close loop.
Haptic Cloth Rendering 6th Dutch-Belgian Haptics Meeting TUDelft, 21 st June 2006 Lode Vanacken Expertise centre for Digital Media (EDM) Hasselt University.
CS 261 – Winter 2010 Trees. Ubiquitous – they are everywhere in CS Probably ranks third among the most used data structure: 1.Vectors and Arrays 2.Lists.
VLSI DSP 2008Y.T. Hwang3-1 Chapter 3 Algorithm Representation & Iteration Bound.
Feature-length films: Games: Desktop Animations: Computer Animation.
An Introduction to Physics Engines Michael Sundqivst TV10S1M3.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Physically Based Animation.
An Overview of SOFA (Simulation Open Framework Architecture)
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Objectives Review some advanced topics, including Review some advanced topics, including Chapter 8: Implementation Chapter 8: Implementation Chapter 9:
L15: Putting it together: N-body (Ch. 6) October 30, 2012.
Start Presentation November 22, th Homework In this homework, we shall attempt the modeling of a planar mechanical system. We shall do so once.
CSE 380 – Computer Game Programming Box2D Box2D TestBed.
Spring Rigid Body Simulation. Spring Contents Unconstrained Collision Contact Resting Contact.
Data Structures for Scenes, The Basics of Scene Graphs Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Friday,
Evolving Virtual Creatures & Evolving 3D Morphology and Behavior by Competition Papers by Karl Sims Presented by Sarah Waziruddin.
Mixing deformable and rigid- body mechanics simulation Julien Lenoir Sylvère Fonteneau Alcove Project - INRIA Futurs - LIFL - University of Lille (France)
Design Issues. How to parallelize  Task decomposition  Data decomposition  Dataflow decomposition Jaruloj Chongstitvatana 2 Parallel Programming: Parallelization.
Detail-Preserving Fluid Control N. Th ű rey R. Keiser M. Pauly U. R ű de SCA 2006.
A Computationally Efficient Framework for Modeling Soft Body Impact Sarah F. Frisken and Ronald N. Perry Mitsubishi Electric Research Laboratories.
Chapter 12: Collections by Lewis and Loftus (Updated by Dan Fleck) Coming up: Collections.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Physics for Games Spring 2012.
Dynamics of Linked Hierarchies
Beyond Bouncing Boxes Fast, yet still Realistic, Deformation and Fracture Jeff Lander Darwin 3D, LLC Luxoflux James O'Brien U. of California, Berkeley.
An Efficient CUDA Implementation of the Tree-Based Barnes Hut n-body Algorithm By Martin Burtscher and Keshav Pingali Jason Wengert.
M. Zareinejad.  What ’ s Virtual Proxy? ◦ A substitute for the probe in the VE ◦ An extension of the ‘ God-Object ’ ◦ A finite sized massless sphere.
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
M. Zareinejad
Barnes Hut N-body Simulation Martin Burtscher Fall 2009.
A Pattern Language for Parallel Programming Beverly Sanders University of Florida.
1 Rocket Science using Charm++ at CSAR Orion Sky Lawlor 2003/10/21.
Rick Parent - CIS682 Rigid Body Dynamics simulate basic physics of an object subject to forces Keyframing can be tedious - especially to get ‘realism’
Trees CSIT 402 Data Structures II 1. 2 Why Do We Need Trees? Lists, Stacks, and Queues are linear relationships Information often contains hierarchical.
3D Object Representations 2009, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
Barnes Hut N-body Simulation Martin Burtscher Fall 2009.
Feature-length films: Games: Desktop Animations:.
Physics-Based Simulation: Graphics and Robotics Chand T. John.
Physically Based Simulations For Games
Character Animation Forward and Inverse Kinematics
Xing Cai University of Oslo
Manipulator Dynamics 1 Instructor: Jacob Rosen
3D Object Representations
Graceful Degradation Of Collision Handling in Physically Based Animation John Dingliana , Carol O’ Sullivan.
Artificial Intelligence
Jim Fawcett CSE776 – Design Patterns Summer 2003
GENERAL VIEW OF KRATOS MULTIPHYSICS
Course Outline Introduction in algorithms and applications
Q: What Does the Future Hold for “Parallel” Languages?
Analysis models and design models
Ph.D. Thesis Numerical Solution of PDEs and Their Object-oriented Parallel Implementations Xing Cai October 26, 1998.
Adaptive dynamics for Articulated Bodies
Computer Graphics Matrix Hierarchies / Animation
Force Directed Placement: GPU Implementation
Mattan Erez The University of Texas at Austin
Presentation transcript:

SOFA : Design for Parallel Computations Jérémie Allard

SOFA Goal: interactive deformable objects simulation platform Integrate as many simulation algorithms as possible –Rigid bodies, mass-springs, finite-element models, fluids, articulated bodies, … –Implicit/explicit/static solvers, penality/constraint collision response, stiff interactions, …

SOFA: Basic Principles Each object has several aspects –Behavior Model –Collision Model –Visual Model Mappings are used to link them –BM  VM/CM : propagate positions and velocities –CM  BM : send back forces Behavior Model Visual Model Collision Model X,V F

Behavior Model 2 possible designs –“black-box” single element No knowledge of the internal algorithm of each object Exchange interaction forces at each time-step Similar to FlowVR Interact –“white-box” aggregation MechanicalModel : Degree-of-freedoms (DOF) Attached elements : Mass, ForceField, Constraint, Solver, … Internal MechanicalMappings to map new representations to the original DOFs –Attach a set of points on a rigid body as if it was a mass-spring object –Embed a surface inside a deformable FFD grid –Implement interactions between 2 types of objects by mapping them to a common representation whenever possible

Scene structure Scene-graph design All data are in leaf elements (Objects) –Internal elements (Nodes) contains only pointers to attached objects and child nodes Computations are implemented as traversals of the tree –Separate computations from scheduling (order of traversal)

Collisions and Interactions Generic collision pipeline –Compute set of contacts between collision models –Change the scene structure dynamically Add new forcefields or constraints between objects Change integration groups (implicit stiff interaction forces, global constraints solvers) Interactions create loops in the graph –InteractionForceFields point to the 2 MechanicalModels involved –Attached to the first common ancestor node Except if one of the model is immobile (such as static obstacles), in which case it is attached to the other model Mechanical Model Mechanical Model Interaction ForceField

Example 4 objects falling on the floor –1 Rigid –1 Mass-spring –1 FFD spring grid –1 FEM Each have an mapped collision surface Legend

Example (2) Contacts with the floor –New nodes containing contact points –New InteractionForceFields

Example (3) Contacts between objects –Hierarchy changed to group connected objects under one solver

Computations Each computation is implemented as an Action executed from a given graph node –called recursively for each node processNodeTopDown called before recursion to child nodes processNodeBottomUp after –At each node, it can: Ask to be called recursively on each child Stop the recursion Execute other actions from that node

Computations (2) Data dependencies rules: –processNodeTopDown: read access to all parent nodes, read/write access to current and all child nodes –processNodeBottomUp: read access to all parent nodes, read/write access to current and all child nodes and parent node

Computing Animation Animate Action Algorithm: –Call updatePosition() for each BehaviorModel –If there is a Solver : Call solver->solve(dt) (which will execute mechanical actions) Stop the recursion –Else Continue the recursion Mechanical Actions: –PropagatePositionAndVelocity: set new position and velocity and apply mappings to propagate them downward –ComputeForce: call all ForceFields to compute the current force and apply mappings to accumulate it upward –AccFromF: use Mass to compute accelerations from force –V = A + B. f : linear vector operation (i.e. x += v.dt)

Computing Animation: Step 1 Animat e UpdatePosition

Computing Animation: Step 2 Animat e solve Animat e solve Animat e

Computing Animation: Step 3 Compute Force compute Force Compute Force Compute Force compute Force compute Force compute Force compute Force

Computing Animation: Step 4 Compute Force Compute Force Compute Force compute Force compute Force compute Force compute Force compute Force Compute Force

Computing Animation: Step 5 Compute Force Compute Force Compute Force compute Force compute Force

Computing Animation: Step 6 Compute Force Compute Force Compute Force Compute Force Compute Force Compute Force

Computing Animation: Step 7 accumulate Force accumulate Force accumulate Force accumulate Force accumulate Force accumulate Force

Computing Animation: Step 8 accumulate Force accumulate Force accumulate Force

Computing Animation: Step 9 accumulate Force accumulate Force

Computing Animation: Step 10 AccFromF acc FromF AccFromF acc FromF AccFromF Acc FromF acc FromF

Computing Animation: Step 11 VOp V += A.dt X += V.dt VOp V += A.dt X += V.dt V += A.dt X += V.dt V += A.dt X += V.dt

Computing Animation: Step 12 Propagate Pos&Vel setX setV setX setV Propagate Pos&Vel Propagate Pos&Vel

Computing Animation: Step 13 propagateX propagateV setX setV Propagate Pos&Vel Propagate Pos&Vel setX setV Propagate Pos&Vel propagateX propagateV Propagate Pos&Vel

Computing Animation: Step 14 propagateX propagateV Propagate Pos&Vel propagateX propagateV propagateX propagateV Propagate Pos&Vel Propagate Pos&Vel

Computing Animation: Step 15 Propagate Pos&Vel propagateX propagateV propagateX propagateV propagateX propagateV propagateX propagateV propagateX propagateV propagateX propagateV Propagate Pos&Vel Propagate Pos&Vel Propagate Pos&Vel Propagate Pos&Vel Propagate Pos&Vel

Task dependency graph Determined by the scene tree More advanced solvers requires more actions varying number for iterative solvers (CG)

Parallel Scheduler Coarse grained: –Schedule Animate actions (green tasks) # thread ≤ # integration groups ≤ # objects Fine grained: –Schedule all tasks Cost of parallelization increase with the size of the tree Adaptive: –Work stealing Costly only when necessary (when one idle thread steals a task)

Work Stealing Scheduler Requirements –Handle > 1000 tasks per iteration (with > 30 it/sec) –Support Linux and Windows Linux-only is fine for initial tests Several possibilities –KAAPI ? –Cilk ? –Custom code ? (Luciano’s octree work)