CS461561 Virtual Environments: Principles - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

CS461561 Virtual Environments: Principles

Description:

all BBs in Andy's tutorial. Virtools Physics Tutorial ... Degrees of Freedom (DOF) Hinge constraints. Set Physics Hinge BB. Ball and Socket constraint ... – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 27
Provided by: janicets
Category:

less

Transcript and Presenter's Notes

Title: CS461561 Virtual Environments: Principles


1
CS461/561Virtual Environments Principles
ApplicationsVirtools Physics
  • 3-05-2007
  • Prof. Searleman
  • SC375
  • jets_at_clarkson.edu

2
Overview
  • HW2
  • Quiz2 (after class today)
  • simple characters animations
  • all BBs in Andys tutorial
  • Virtools Physics Tutorial
  • C\Program Files\Virtools\Virtools
    4.0\Documentation\Physics\
  • web format above...\Physics Users
    Guide\Start.html
  • pdf above...\Physics Users Guide\Physics_Library
    .pdf

3
Virtools Physics Package
  • for today read the physics tutorial, and do all
    the suggested activities found in
  • Chapters 1 2 of Start.html (recommended), or
  • Chapters 5 through 12 in Physics_Library.pdf
  • for Wednesday continue with the physics tutorial
  • HW3 posted VRPong

4
Complete for today Physics Tutorial
  • 6. Getting Started
  • 7. Physics Topology Modeling (p.21)
  • 8. Mesh Control
  • 9. Concave Hulls
  • Concave made of convex.cmo
  • Concave made of convex Final.cmo
  • 10. Compound Concave Hulls
  • 11. Ball Primitives
  • Ball Primitive.cmo
  • Ball Primitive Final.cmo
  • Ball Primitive - Final Reflect_Shadow.cmo
  • 12. Level of Detail (LOD)
  • Concave Topology LOD.cmo

5
Physics Tutorial
  • Start.html (or Chapter 6. Getting Started)
  • Getting Started.cmo
  • Getting Started Final.cmo
  • Getting Started Final Reflection.cmo
  • Friction.cmo
  • Shadows reflections must add attributes to the
    objects that are casting shadows reflections
  • Important concepts
  • Physics Engine
  • Physicalize Building Block
  • Physics Mesh convex concave hulls

6
Physicalize BB
7
Physicalize BB
  • Fixed if checked, the object will be considered
    as unmoveable
  • Friction
  • 0 means no friction at all.
  • 0.1 ice.
  • 3 very rough.
  • Elasticity defines the bouncing property of the
    physics material associated with the object.
  • 1.0 means never ending bounces.
  • Caution dont give unrealistic values to the
    elasticity. A value too high (say 10) will make
    your simulation very unstable after a while.

8
Physicalize BB
  • Mass how heavy the object should be tons.
  • Caution dont use too small a value if the
    object is to be used as a root object in a
    constraint system (kinematic chain), or too high
    a value if the object is supposed to collide with
    very small objects.
  • Collision Group filter string that defines the
    collision rules for this object.
  • NULL string ("") means the object will collide
    with every other object.
  • Non-NULL string (like "car") means the object
    will collide with every object, except those in
    the same collision group.
  • Caution only the first 8 characters will be used
    to determine the real collision group.

9
Physicalize BB
  • Start Frozen if checked, the object is not
    affect by gravity, until some event awakes it
    (like a collision with another object, an
    impulse, or the creation of a spring attached to
    it).
  • This is useful for example, when you need to
    physicalize a lot of objects that already lie on
    the floor, and don't want the physics engine to
    slow down your composition by calculating all the
    needed collisions to stabilize your objects.
  • Enable Collision if checked, collisions are
    allowed. If set to FALSE, this boolean value
    overides the "Collision Group", and no collision
    will ever affect the object.
  • Shift Mass Center by default the mass center is
    calculated automatically (done when "Automatic
    Calculate Mass Center" is checked).
  • You can change this center for a non-barycentric
    object. Shifting the mass center can give your
    object better stability or a somersault effect.
  • If the setting "Automatic Calculate Mass Center"
    is TRUE, the "Shift Mass Center" vector won't be
    taken into consideration.
  • Otherwise, the "Shift Mass Center Parameter"
    defines the mass center position in the object's
    referential.
  • Caution the "Shift Mass Center" parameter is not
    a position in the object space, it only a shift
    from the automatically calculated mass center.

10
Physicalize BB
  • Linear Speed Dampening
  • 0.0 means no dampening on linear speed
    (translations),
  • 1.0 means reduction to 30 each second,
  • 0.1 means 90, etc.
  • Could be used as sort of air resistance.
  • Too low object could accelerate unrealisticly.
  • Rot Speed Dampening
  • 0.0 means no dampening on rotation speed
  • 1.0 means reduction to 30 each second,
  • 0.1 means 90, etc.
  • Could be used as sort of air resistance.
  • Too low object could accelerate unrealisticly.

11
Physicalize BB
  • Surface Name this parameter lets you give a name
    to the physics surface created for your object,
    or allow you to specify an already created
    surface.
  • This parameter is empty at first (when you attach
    the "Physicallize" building block to an object),
    but if you edit it again, you should see that a
    string has been automatically created, based on
    the mesh's name.
  • Once an object is physicallized (at run-time), it
    creates a physics surface (topology structure),
    which is stored internally and associated with a
    string value (the one provided by this
    parameter). This physics surface can thus be used
    by any other object whose topology matches this
    object.

12
Physicalize BB
  • Surface Name (cont.)
  • Physics surfaces are the only physics information
    that stay in memory after Restoring Initial
    Conditions (Reset). Thus they can be used even
    after the object is deleted. That's why, when you
    expand the dialog parameter box of a physics
    surface parameter (use the little rectangle on
    the top-left), you get a list of all existing
    physics surfaces.
  • From this list you can destroy physics surfaces
    (it's the only way to constrain the physics
    manager to take into consideration a new object's
    topology which name would be the same as an
    existing one). You can also choose to save this
    physics surface in the composition or not
    (allowing the physics manager not to recalculate
    the topology of your object if it's a complex one
    for example). And you can also see how much
    KBytes it takes to keep each physics surfaces in
    memory, or how much it would take to save them
    into the file (except the compression rate).

13
Physicalize BB
  • Convex the meshes specified here are considered
    as convex, and if they are not, the physics
    engine will only consider their convex hull to
    create the physics object's topology.
  • If the "Convex Count" setting is bigger than 1,
    you can compose the topology of your object from
    several convex meshes. Since convex collisions
    computations are cheaper that concave collisions,
    this method can be useful to create concave
    objects from convex ones.
  • To do so, all your convex objects must share the
    same position for their local referential. Which
    means, from 3D Studio Max (or any other 3d
    modelling tool), you should first create one
    single concave object, and then cut it into
    convex meshes, this way all the exported convex
    meshes will share the same position (and
    orientation) for their local referential.

14
Physicalize BB
  • Concave the mesh is considered as concave,
    which means each of its faces are taken as
    individual convex meshes. The computation time to
    simulate such object is larger than for a convex
    object, so keep the number of concave objects
    used in your level as low as possible.
  • Typically, one concave object is used for the
    static world (walls, floors, stairs .. etc), and
    moving objects are often convex.
  • Ball Radius m when you want your object to be
    simulate as a ball, this parameter lets you
    specify its radius (in meters).
  • Convex Count the number of convex elements used
    to compose the physics surface of the physics
    object.
  • Concave Count the number of concave elements
    used to compose the physics surface of the
    physics object.

15
Physicalize BB
  • Use Ball the number of ball elements used to
    compose the physics surface of the physics object
    (for the moment, you can use only 1 ball, and if
    you do so, you must use 0 convex objects and 0
    concave ones.)
  • Auto Mass Center if checked, the object's mass
    center will be calculated automatically, and the
    "Shift Mass Center" parameter will be avoid
    (note letting the computer calculate the mass
    center automatically is not time consuming since
    this is done by default).
  • Reconstruct Surface if checked, the surface
    (topology info for physics engine) will be
    calculated each time you "physicallize" the
    object. Thus, if a surface with the same name
    than your specified "Surface Name" has already
    been created, it will be destroyed and replaced
    by the new topology you specified.
  • Use Convex Hull if checked, the algorithm
    generates an additional convex hull around the
    object. For moveable objects this hull can
    increase performance to the same level as convex
    objects. For huge landscapes this optimization
    makes no sense at all, as all interesting objects
    are penetrating the convex hull all the time.

16
Physicalize BB Notes
  • Once an object is made part of the physics world
    (ie "Physicallized"), it can no longer be moved
    by standard building blocks (like "Set Position",
    "Rotate" or Translate), unless they are being
    beamed (See "Beam Physics Object") or "motion
    controlled" (See "Motion Controller").
  • Moving concave objects is not recommended, but if
    you ever need to use moving concave objects, set
    "Use Convex Hull" to true (object is still
    concave, but an additionnal convex hull is
    computed around the object to speed collision
    detection).
  • Hiding a physics object has no influence on the
    physics simulation. Even if it is not visible,
    the object will still react the same (falling,
    colliding, etc). It won't be deleted from the
    physics simulation.
  • Remember that sliding motion between two physics
    objects depends on both of their materials.

17
Physicalize BB Notes
  • Only the first 8 characters of "Collision Group"
    will be used.
  • If even after attaching the "Physicallize"
    building block, and editing it again (which
    should create and automatic string) no string is
    used to define the object's physics surface (see
    "Surface Name" parameter), the object will have
    no collision surface (thus no collision
    interaction), and a 1 meter radius ball will be
    used to simulate its inertia.
  • The object's physics surface is also used to
    calculate the mass center and the rotation
    inertia of an object. Therefore, the topology
    defined by the convex meshes or the concave one
    not only influences the collision between the
    object and the physics environment, it also
    modulates the way a physics object reacts in the
    air or in a buoyancy volume.
  • See Also "UnPhysicallize", "Change Physics
    Properties".

18
Complete by Wednesday Physics Tutorial
  • 13. Constraint Systems (p.37)
  • 14. Spring Constraints
  • Springs.cmo
  • Springs Final.cmo
  • 15. Hinge Constraints
  • Fridge.cmo
  • Fridge Final.cmo
  • 16. Dynamics
  • 17. Applying an Impulse (Force)
  • Pilling.cmo
  • Pilling Impulse - Final.cmo

19
Constraint Systems
  • Degrees of Freedom (DOF)
  • Hinge constraints
  • Set Physics Hinge BB
  • Ball and Socket constraint
  • Set Physics Ball Joint BB
  • Slider constraint, Point to Plane constraint,
    generic constraints
  • Set Physics Constraint BB
  • Spring constraint
  • Set Physics Spring BB

20
Applying Forces to Objects
  • Linear impulse
  • magnitude, direction, point of application, and
    duration
  • Physics Impulse BB
  • Angular impulse (torque)
  • magnitude, axis of rotation, point of
    application, duration
  • Physics Torque BB

21
Physics Tutorial
  • 18. Controlling Motion (p.54)
  • Ice.cmo
  • Ice Final.cmo
  • 19. Removing Physics Objects from the physics
    environment
  • Pilling.cmo
  • 20. Moving Physics Objects without applying
    forces
  • Beaming.cmo (? Missing)
  • 21. Dynamic Physics Properties
  • snowboard.cmo
  • snowboard Final.cmo
  • snowboard Final2.cmo

22
Motion Control
  • Motion Controller BB
  • Entity to Follow the physics object on which the
    "Motion Controller" is applied will try to have
    the same position and orientation as this entity

23
Moving a Physics Object
  • Physics Impulse BB

24
Beam me up, Scotty
  • Beam Physics Object BB
  • Beams a physics object to a new position or
    orientation

25
Removing a physics object
  • UnPhysicalize BB

26
Physics Tutorial
  • 22. Sample Compositions
  • Physics Motor
  • Hinge Motor.cmo
  • Phantom, Buoyancy, Force Field
  • Buoyancy.cmo
  • duck.cmo
  • Physics Car (raycasting)
  • baobab café US.cmo
  • raycast car sample.cmo
  • cararena.cmo
  • car raycast array.nmo
  • car pickup array.nmo
  • tractor_trailer.cmo
Write a Comment
User Comments (0)
About PowerShow.com