Visualisation,Animanition and Virtuality - PowerPoint PPT Presentation

1 / 48
About This Presentation
Title:

Visualisation,Animanition and Virtuality

Description:

Forward Kinematics. Particle Systems. Playing God !!! The ... Inverse Kinematics (IK) Non-redundant Linkages - Analytical solutions. Redundant Linkages ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:1.0/5.0
Slides: 49
Provided by: bobh46
Category:

less

Transcript and Presenter's Notes

Title: Visualisation,Animanition and Virtuality


1
Visualisation,Animanition and Virtuality
  • The Physics and Cognition of VR

2
Hierarchy of Models
Behaviour
Bio-Mechanics
Physics
Geometry
3
Basic Physics Modelling
  • Fundamental Laws
  • Gravity
  • Friction
  • Collision Response
  • Forward Kinematics
  • Particle Systems
  • Playing God !!!

4
The Fundamental Laws
  • Mass (m)
  • Mass number of atomic units (not weight)
  • Measured in Kilograms
  • Forces act on a mass Newtons -gt weight
  • Time (t)
  • In a virtual environment is related to frame rate
    not real time
  • If system slows time slows

5
  • Position (s)
  • X,y,z co-ords in 3D space
  • An object is positioned by its centre of mass

For complex masses centre less obvious
6
Bounding shapes make easier computation
  • To calculate centre of mass of object can use a
    mass for each vertex (n vertices)
  • X value sum of x pos mass (from 1 to n)
  • divided by sum of masses
  • Y value sum of y pos mass (from 1 to n)
  • divided by sum of masses

7
  • Velocity (v)
  • Velocity ds/dt
  • X pos x pos x velocity (pixels per frame)
  • Virtual velocity pixels/second(for a set fps)
    since we are redrawing using a frame rate
  • New position old position velocity time

x0 Time t0
x1 x0v0(t2-t1) Time t1
8
  • Acceleration (a)
  • Rate of change of velocity with time

vel
vel
vel
Time -gt
Time -gt
Time -gt
Constant velocity(a 0) Acceleration a
constant Non-constant accel a f(t)
9
  • Conservation of momentum
  • If a ball bounces of a wall and returns at same
    velocity inelastic collision momentum
    conserved
  • Momentum transfer
  • Usually some energy is absorbed in the form of
    heat and vibration momentum is lost ball
    returns at lower velocity.
  • Ignored in VR or game simulations

10
Simple Bounce Physics
(vy,-vx)
(-vy,-vx)
(vy,vx)
(-vy,vx)
11
Newtons First Law
  • An object at rest remains at rest
  • An object in motion remains in motion (ie at
    constant velocity) until an exterior force acts
    upon the object

12
Modelling Gravity effeects
  • Gravity is a result of a distortion of space by a
    large body , but is experienced as a special
    force unique to earth.
  • Two cases to consider
  • Two or more objects with same relative mass
  • One object has much greater mass than other
  • F Gm1m2/r2
  • Where G is 6.6710-11 Nm/kg2
  • And m1, m2 are masses, r is the distance between
    centres

13
Modelling Projectile Trajectories
Vix V cosq Viy V sinq
g 9.8 m/s2
T Viy sinq/g
Xhit Vix Viy /g
Vi
q
14
Trajectories

Fire a projectile with mass m, at velocity v,
where does it land?
y
q
x
15
Friction
  • Friction causes deceleration
  • Assumed to be a constant deceleration
  • Friction on a flat surface is modelled by
    applying a virtual friction
  • Each frame the velocity is reduced by a constant
    factor to match to the desired friction (Vnew
    Vold friction)

16
Friction
  • Usual modelled as frictional force.
  • If you try to push a mass in a direction parallel
    to the plane, you will encounter frictional force.

Friction
Push
17
Modelling Friction
  • Modelling Friction on a flat surface requires a
    constant negative velocity be applied to all
    objects that is proportional to the required
    friction.
  • VnewVold-Friction.
  • In which case it is necessary to ensure that
    velocity stays positive.

18
Friction on an Inclined Plane
  • Friction and Gravity work in tandem.

-x
y
q
x
-y
19
Friction on an Inclined Plane
  • The plane has coefficenets ms and mk for static
    and kinetic cases.
  • The equilibrium case is when the sum of the
    forces acting on the body is zero.

20
Friction on an Inclined Plane Finding the
Critical Angle
  • Firstly we define an xy coordinate system on the
    inclined plane, with x parallel to the plane, and
    the positive part of x in the downward sliding
    direction.
  • For the x-axis we know the force of gravity
    pushing the block is mg(sin q).
  • The force due to friction is hms.
  • The negative sign is because the force acts in
    the opposite direction.

21
  • Friction on an inclined plane
  • Different coefficient of friction for moving and
    static

?s Static ?k Kinetic(moving)
?
?
22
Other Physics to consider
  • Object-to-object collision (of irregular shaped
    objects)
  • Kinematics
  • Particulates

23
Kinematic Chains
  • Solid links connected at movable joints
  • Fixed end base
  • Movable end tip or end effector
  • One degree of freedom (DOF) per joint
  • Open chain one fixed end, one movable end
  • Closed chain both ends fixed

24
Forward and Inverse Kinematics
25
Kinematic Redundancy
  • End-effector has 6 DoFs
  • - (x, y, z) position
  • - ( , , ) orientation
  • Non-redundant linkage has lt 6 joints (DoFs)
  • Redundant linkage has gt 6 joints (DoFs)
  • - Human arm has 7 DoFs
  • Shoulder 3
  • Elbow 1
  • Forearm 1
  • Wrist 2
  • - Redundancy enables multiple solutions

26
Inverse Kinematics (IK)
  • Non-redundant Linkages
  • - Analytical solutions
  • Redundant Linkages
  • - Many techniques
  • Pseudo-inverse (Jacobian)
  • Gradient
  • Others
  • IK Commonly Found in Animation Packages
  • - 3D Studio Max

27
Iterative solution
  • Start at end effector
  • Move each joint so that end gets closer to target
  • The angle of rotation for each joint is found by
    taking the dot product of the vectors from the
    joint to the current point and from the joint to
    the desired end point. Then taking the arcsin of
    this dot product.
  • To find the sign of this angle (ie which
    direction to turn), take the cross product of
    these vectors and checking the sign of the Z
    element of the vector.

28
Interaction with virtual Body
  • Limitations mean reliance on metaphors for
  • object manipulation (grasping and moving)
  • locomotion (movement)
  • Limitations in haptics mean that restraint on the
    virtual environment exists

29
Object Manipulation
  • Hand posture may not be tracked - makes grasping
    difficult
  • Must establish a point at which union is deemed
    to have taken place
  • Moved by repositioning in the scene graph
  • Robinett and Holloway 1992

30
Object Manuipulation
World
World
Body B
Object O
Body B
Object O
Hand H
Hand H
Object P
Releasing
Object P
Grasping
31
Transformations employed in object manipulation
  • Calculate relative transformation from hand to
    object MR
  • MR (MB.MH)-1.MO.MP
  • MB Transformation from body to world co-ords
  • MH Transformation from hand to body co-ords
  • MO Transformation from Object O to world co-ords
  • MP Transformation from Object P to Object O
    co-ords
  • After manipulation new local transformation of
    Object Mp is
  • Mp MO-1.MB.MH .MR

32
Locomotion
  • Tracker has a limited range
  • Must use locomotion metaphor to move greater
    distances
  • Locomotion is on an even plane , virtual terrain
    may not be even
  • Collision detection can be employed to raise or
    lower the participant accordingly

33
Directions of locomotion
Fly in direction of aim Fly in direction of
pointing Fly in direction of gaze Fly in
direction of torso
34
Object Pair Collision Detection
  • Vital component of interaction
  • Describe Exhaustive Test for when two object
    intersect (process hungry)
  • Try to aviod doing exhaustive test igf possible

35
Exhaustive Test
  • Assume all objects as collection of triangles
    (polygons)
  • Object 1 consists of m triangles
  • Object 2 consists of n triangles
  • Use triangle intersection test to test all
    possible pairs of of intersections
  • This requires n.m triangle-triangle tests

36
Triangle Intersection Test
  • Moller 1997 comparison of triangles A and B
  • They do not intersect if all vertices in A lie to
    one side of plane of B and V.V
  • Otherwise plane of A intersects plane of B on L
  • Find line intersection of L with A (LA) and L
    with B (LB)
  • A and B intersect only if LA and LB overlap

LB
B
A
L
LA
37
Basic Rejection Tests
  • Simplest tests based on distance
  • Each scene object has a bounding sphere. Two
    objects cannot overlap if distance between two
    centres is gt than sum of the radii
  • Better test id the separating plane test. If a
    plane can be drawn such that all points of one
    object lie on one side and all points of the
    other on the reverse, cannot collide. Key ids to
    find a good separating plane
  • Bounding Box range test

38
General Collision Detection
  • Detecting collision between a set of n objects
    generates n2 possible pairs of objects requiring
    testing for overlap
  • Use spatial partitionong to discard as may pairs
    as possible and use object pair collision tests
    on remaining pairs
  • Uniform Space Subdivision

39
Space Subdivision
40
Artificial Intelligence in Virtual Worlds
  • AI techniques can be used to control behaviour in
    irtual Environment
  • Knowledge instruction Behaviour
  • AI agents or cognitive characters can decide on
    its own behaviour during the course of a
    simulation (or Game)
  • The behaviour is designed to deal with
    interaction with components of the VE

41
Main kinds of interaction
  • Interaction with physical world
  • Steering and moving objects
  • Collision avoidance
  • Learned behaviour
  • Interaction with other agents(computer or user
    controlled) in the VE
  • Rule-based
  • Domain specific

42
  • A cognitive character has its own view of the
    world. An internal model

1
Cactus
2
43
Hierarchy of Models
Behaviour
Bio-Mechanics
Physics
Geometry
44
Domain Knowledge and Character instruction
  • A cognitive character must have a means of
    representing its view of the world. E.g.
  • Proximity of objects
  • Goals
  • Threats
  • Position of self
  • It must also behave according to its perception.
    Character instruction

45
Types of behaviour
  • Deterministic or predefined behaviour is
    performed independently of domain knowledge.
  • Fall off chair, bump into fixed objects, etc.
  • When a character uses domain knowledge to
    determine its own behaviour this is called
    nondeterministic. Optimum response lies between
    random and pre-defined.
  • Goal-Setting

46
Goal-setting
  • Goals are high level directions e.g. go to a
    point, avoid missile etc.
  • Character can perform actions which either have
    desirable effects or undesirable effects with
    regard to attaining goals.
  • If character is given actions which produce
    desirable effects it can search for the action or
    series of actions that most helps it achieve the
    goal

47
Knowledge aquisition
  • In order to select the most appropriate action
    the character must be able to sense the state of
    the world. Sensing.
  • May also need to know world dynamics. E.g. Door
    opens
  • Can be given world dynamics or learn world
    dynamics

48
True world Model
  • The computer application will have a a
    representation of the world. The real model.
  • A character can have its own world view as the
    true model. Not done because
  • Inefficient and difficult to achieve
  • Unrealistic (e.g. should not be able to see round
    corners)
  • Other characters should have different model
Write a Comment
User Comments (0)
About PowerShow.com