PhysicallyBased Modeling Generic Library - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

PhysicallyBased Modeling Generic Library

Description:

Basic Simulation Concepts. Particle System Concepts and Example ... Demonstrated ease of creating complex simulations extended from basic library concepts ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 35
Provided by: shawna7
Category:

less

Transcript and Presenter's Notes

Title: PhysicallyBased Modeling Generic Library


1
Physically-Based Modeling Generic Library
  • David Brown Shawna Thomas
  • 12/2/04

2
Physically Based Modeling
  • Techniques that use physics to create realistic
    animations automatically

3
Library Hierarchy
Modeling System
4
Outline
  • Basic Simulation Concepts
  • Particle System Concepts and Example
  • Flocking System Concepts and Example
  • Mass Spring System Example
  • Conclusion

5
Outline
  • Basic Simulation Concepts
  • Particle System Concepts and Example
  • Flocking System Concepts and Example
  • Mass Spring System Example
  • Conclusion

6
Basic Simulation Concepts
  • Modeling System
  • Contains a set of modeling elements
  • Encapsulates the motion in the animation
  • Particle system, rigid body system, fluid flow,
  • Modeling Element
  • Contains a static portion and a dynamic portion
    (called state)
  • Evolve over time by responding to forces through
    Newtons law Fma
  • Particle, rigid body, fluid element,

7
Basic Simulation Concepts
  • Environment
  • Set of obstacles that the modeling system
    interacts with
  • Playground, room,
  • (Environment.h)
  • Obstacle
  • Object that modeling elements interact with
  • Sphere, triangle,
  • (BasicObstacle.h, SphereObstacle.h,
    TriangleObstacle.h)

8
Basic Simulation Concepts
  • Force
  • Models the physical laws governing motion
  • Applies an acceleration to a modeling element
  • Gravity, wind, friction, collision,
  • (Forces.h)

9
Basic Simulation Concepts
  • Numerical Integrator
  • Mathematical tool to advance the modeling system
    to the next timestep given the modeling systems
    current state
  • Euler, Midpoint, Runga-Kutta4,
  • (NumericalIntegrators.h)

10
Basic Simulation Concepts
  • Simulation Loop
  • Continuous loop where the modeling system is
    advanced through time based on the forces present
  • while 1 do
  • Reset modeling system
  • Set A for each modeling element in the modeling
    system based on F
  • Integrate the modeling system forward 1
    timestep
  • Handle collisions
  • Display to screen

11
Outline
  • Basic Simulation Concepts
  • Particle System Concepts and Example
  • Flocking System Concepts and Example
  • Mass Spring System Example
  • Conclusion

12
Particle System
Genesis Effect from Star Trek II The Wrath of
Kahnby William Reeves
13
Particle System
Particle Dreamsby Karl Sims
14
Particle System
  • BasicParticleSystemltTgt
  • BasicParticleltTgt
  • BasicState
  • default_update_visitor

15
Particle System
  • BasicParticleSystemltTgt
  • Models Modeling System
  • Contains a set of interacting particles of type T
  • Defined in Basic ParticleSystem.h
  • Data Members
  • vectorltTgt particles
  • Double mass
  • Methods
  • UpdatetoNextTimeStep(UpdateVisitor vis)
  • CheckCollision()

16
Particle System
  • BasicParticleltTgt
  • Models Modeling Element
  • Defined in BasicParticle.h
  • Data Members
  • double mass
  • BasicObstacle collision
  • T state
  • Vector3d Color

17
Particle System
  • BasicState
  • Models State
  • Defined in BasicState.h
  • Data Members
  • Vector3d X
  • Vector3d V
  • Vector3d A
  • Vector3d deltaX
  • Vector3d deltaV

18
Particle System
  • default_update_visitor
  • Used in UpdatetoNextTimeStep() to prep the
    modeling elements for the next simulation
    iteration
  • template ltclass ModelingElementgt bool
    checkElement(const ModelingElement e)
  • template ltclass ModelingElementgt bool
    updateElement(ModelingElement e)

19
Transient Particle System
  • TransientParticleSystemltTgt
  • Refines BasicParticleSystemltTgt
  • Particles are generated and killed during
    simulation
  • Defined in TransientParticleSystem.h
  • TransientParticleltTgt
  • Refines BasicParticleltTgt
  • Particle with a lifespan and a flag alive
  • Defined in TransientParticle.h

20
Transient Particle System
  • transient_update_visitor
  • Refines default_update_visitor
  • Only updates particles that are alive
  • updateElement()
  • decrements lifespan by 1
  • if lifespan lt 0, sets alive to false
  • Defined in TransientParticleSystem.h

21
Particle System
  • Demo

22
Volcano Simulation
  • VolcanoState
  • Refines BasicState
  • Vector3d Tail
  • VolcanoParticleSystem
  • Refines TransientParticleSystemlt TransientPartic
    leltVolcanoStategt gt
  • AdjustColor()
  • volcano_update_visitor
  • Refines transient_update_visitor
  • updateElement() sets Tail to previous X position

23
Outline
  • Basic Simulation Concepts
  • Particle System Concepts and Example
  • Flocking System Concepts and Example
  • Mass Spring System Example
  • Conclusion

24
Flocking System
Go Fish!by Xiaoyuan Tu
25
Flocking System
  • Refines Basic Particle System
  • Flocking Forces
  • Energy Cutoff

Collision Avoidance
Velocity Matching
Flock Centering
26
Flocking System
  • BoidltTgt
  • Refines BasicParticleltTgt
  • Defined in BoidParticle.h
  • Data Members
  • double energy
  • static double Energy
  • Methods
  • Matrix3x3 RotatetoLocalCoordinates()
  • bool InFieldofView(Vector3d X, double radius,
    double viewAngle) const
  • bool InFieldofView(BoidltTgt pParticle, double
    radius, double viewAngle) const

27
Flocking System
  • FlockState
  • Refines BasicState
  • Defined in BoidParticle.h
  • Data Members
  • Vector3d Tail, Tail2
  • double roll
  • flock_update_visitor
  • Refines default_update_visitor
  • updateElement()
  • Updates Tail, Tail2, energy

28
Flocking Rules
  • Applied at each time step
  • Forces
  • Vector3d AvoidCollisions(int index, Environment
    env, FlockParticleSystemltBoidgt pSystem)
  • Vector3d VelocityMatching(int index,
    FlockParticleSystemltBoidgt pSystem)
  • Vector3d FlockCentering(int index,
    FlockParticleSystemltBoidgt pSystem)

29
Flocking System
  • Advance Function
  • Not sure
  • Apply integrator
  • Update state variables

30
Flocking System
  • Demo

31
Outline
  • Basic Simulation Concepts
  • Particle System Concepts and Example
  • Flocking System Concepts and Example
  • Mass Spring System Example
  • Conclusion

32
Mass Spring System
  • Demos

33
Outline
  • Basic Simulation Concepts
  • Particle System Concepts and Example
  • Flocking System Concepts and Example
  • Mass Spring System Example
  • Conclusion

34
Conclusion
  • Developed concepts for a generic physically based
    modeling library
  • Implemented concepts related to particle system
    simulations
  • Environment, State, Force, Numerical Integrator,
    Particle, Particle System,
  • Demonstrated ease of creating complex simulations
    extended from basic library concepts
  • Volcano simulation

35
Future Work
Modeling System
36
References
  • BWK99 David Baraff, Andrew Witkin, and Michael
    Kass. Physically based modeling. SIGGRAPH Course
    Notes, Course 36, Los Angeles, 1999.
  • BFA02 Robert Bridson, Ronald Fedkiw, and John
    Anderson. Robust treatment of collisions, contact
    and friction for cloth animation. International
    Conference on Computer Graphics and Interactive
    Techniques, pages 594-603, 2002.
  • EMF02 Douglas Enright, Stephen Marshner, and
    Ronald Fedkiw. Animation and Rendering of complex
    water surfaces. International Conference on
    Computer Graphics and Interactive Technjques,
    pages 736-744, 2002.
  • FSJ01 Ronald Fedkiw, Jos Stam, and Henrik W.
    Jensen. Visual simulation of smoke. International
    Conference on Computer Graphics and Interactive
    Techniques, pages 15-22, 2001.
  • FM96 Nick Foster and Dimitri Metaxas. Realistic
    animation of liquids. Graphical Models and Image
    Processing, 58471-483, 1996.
  • GBF03 Eran Duendelman, Robert Bridson, and
    Ronald Fedkiw. Nonconvex rigid bodies with
    stacking. ACM Transactions on Graphics, 22(3)
    871-878, 2003.
  • NFJ02 Duc Q. Nguyen, Ronald Fedkiw, and Henrik
    W. Jensen. Physically based modeling and
    animation of fire. International Conference on
    Computer Graphics and Interactive Techniques,
    pages 721-728, 2002.
  • OH99 James F. OBrien and Jessica K. Hodgins.
    Graphical modeling and animation of brittle
    fracture. International Conference on Computer
    Graphics, pages 137-146, 1999.

37
References
  • R83 William T. Reeves. Particle systems --- A
    technique for modeling a class of fuzzy objects.
    ACM Transactions on Graphics, 2(2)91-108, 1983.
  • R87 Craig W. Reynolds. Flocks, herds, and
    schools A distributed behavioral model.
    International Conference on Computer Graphics and
    Interactive Techniques, pages 25-34, 1987.
  • S90 Karl Sims. Particle animation and rendering
    using data parallel computation. International
    Conference on Computer Graphics and Interactive
    Techniques, pages 405-412, 1990.
  • S99 Jos Stam. Stable fluids. International
    Conference on Computer Graphics and Interactive
    Techniques, pages 121-128, 1999.
  • S00 Bjarne Stroustrup. The C Programming
    Language (Special Edition). Addison Wesley,
    Reading, MA, 2000.
  • TT94 X. Tu and D. Terzopoluos. Artificial
    fishes physics, locomotion, perception,
    behavior. International Conference on Computer
    Graphics and Interactive Techniques, pages 43-50,
    1994.
  • WNDS99 Woo, Neider, Davis, and Shreiner. OpenGL
    Programming Guide Third Edition The Official
    Guide to Learning OpenGL, Version 1.2. Addison
    Wesley, New York, 1999.
Write a Comment
User Comments (0)
About PowerShow.com