Single Single- -Thread NVE Thread NVE Multiple Subsystems, - - PDF document

single single thread nve thread nve multiple subsystems
SMART_READER_LITE
LIVE PREVIEW

Single Single- -Thread NVE Thread NVE Multiple Subsystems, - - PDF document

Special Course on Networked Virtual February 13, 2004 Environments Single Single- -Thread NVE Thread NVE Multiple Subsystems, Multiple Threads Multiple Subsystems, Multiple Threads Input Input Initialization Initialization Subsystem


slide-1
SLIDE 1

Special Course on Networked Virtual Environments February 13, 2004 Jouni Smed 1

Single Single-

  • Thread NVE

Thread NVE

Compute State Changes Compute State Changes from Inputs from Inputs Read Network Read Network Compute State Changes Compute State Changes from Net Reads from Net Reads Computational Computational Modelling Modelling Post State Changes Post State Changes to Network to Network Generate New Generate New Picture Picture Read Input Read Input Devices Devices Initialization Initialization

Event Loop Event Loop

Multiple Subsystems, Multiple Threads Multiple Subsystems, Multiple Threads

Post State Post State Changes Changes Net Write Net Write Subsystem Subsystem Generate Generate New Picture New Picture Display Display Subsystem Subsystem Read Network Read Network Compute State Compute State Changes from Changes from Net Reads Net Reads Net Read Net Read Subsystem Subsystem Read Input Read Input Devices Devices Compute State Compute State Changes from Changes from Inputs Inputs Input Input Subsystem Subsystem Modelling Modelling Subsystem Subsystem

Shared Shared Memory Memory

Computational Computational Modelling Modelling

Real Real-

  • Time Rendering

Time Rendering

  • Key problem: limitations in the performance of graphics

Key problem: limitations in the performance of graphics hardware hardware

  • frames per second

frames per second

  • polygons per second

polygons per second

  • Polygon

Polygon culling culling

  • Level

Level-

  • of
  • f-
  • detail

detail processing processing

Polygon Culling Polygon Culling

  • Reduce the number of processed polygons

Reduce the number of processed polygons

  • determine which polygons do not need to be drawn

determine which polygons do not need to be drawn

  • A wealth of research and methods exists

A wealth of research and methods exists

  • Assumes that the underlying 3D model remains quite static

Assumes that the underlying 3D model remains quite static

  • changes in the model

changes in the model ⇒ ⇒ changes in the culling data structures changes in the culling data structures

Draw all polygons Draw all polygons Culling Culling Draw visible polygons Draw visible polygons Time Time

? ?

Culling Tree Culling Tree

Room 1,1; Room 1,1; BV BV

Virtual World Virtual World Bounding Volume (BV) Bounding Volume (BV) Floor 1; BV Floor 1; BV Floor 2; BV Floor 2; BV Floor 3; BV Floor 3; BV Room 1,2; Room 1,2; BV BV Room 1,1; Room 1,1; BV BV View View Volume Volume

Potentially Visible Potentially Visible Sets (PVSs) Sets (PVSs) of

  • f Polygons

Polygons

Room 1 Room 1 Room 2 Room 2 Room 3 Room 3 y y = 1 = 1 y y = 2 = 2 x x = 1 = 1 y y = 1 = 1 x x = 1 = 1 Room Room 2 2 Room 3 Room 3 Room 1 Room 1 Binary space partitioning Binary space partitioning tree tree PVS PVS PVS PVS PVS PVS

slide-2
SLIDE 2

Special Course on Networked Virtual Environments February 13, 2004 Jouni Smed 2

Levels of Detail (LOD) Levels of Detail (LOD)

  • Why to draw a large number of

Why to draw a large number of polygons if they cover only few polygons if they cover only few pixels? pixels?

  • Level

Level-

  • of
  • f-
  • detail

detail decision: how much decision: how much to draw to draw

Distance to the object Distance to the object

Viewer Viewer

Complete Set Complete Set

  • f Polygons
  • f Polygons

Medium Set Medium Set

  • f Polygons
  • f Polygons

Minimum Set Minimum Set

  • f Polygons
  • f Polygons

Real Real-

  • Time Collision Detection and Response

Time Collision Detection and Response

  • Interacting

Interacting with with the VE the VE

  • touching, grasping, standing,…

touching, grasping, standing,…

  • Take some action in response to the collision

Take some action in response to the collision

  • Is there an intersection with the polygons of an object

Is there an intersection with the polygons of an object and the polygons of any other object? and the polygons of any other object?

  • test bounding boxes

test bounding boxes

  • utilize hierarchical data structures

utilize hierarchical data structures

  • Where are the precise contact points?

Where are the precise contact points?

Real Real-

  • Time Collision Detection Solutions

Time Collision Detection Solutions

  • Approaches to collision detection

Approaches to collision detection

  • geometric reasoning

geometric reasoning

  • bounding volume hierarchy

bounding volume hierarchy

  • analytical methods

analytical methods

  • hybrid

hybrid

  • Fast

Fast, , approximate approximate collision collision detection detection

  • wnship:
  • wnship: static

static object

  • bject collisions

collisions

  • wnship:
  • wnship: moving

moving object

  • bject collisions

collisions

  • Fast

Fast, , accurate accurate collision collision detection detection

Fast, Approximate Collision Detection Fast, Approximate Collision Detection

  • Important to recognize that a collision has occurred

Important to recognize that a collision has occurred

  • The precise location of the collision is unimportant

The precise location of the collision is unimportant

  • Example: NPSNET

Example: NPSNET

  • moving objects can collide with each other and with fixed, stati

moving objects can collide with each other and with fixed, static c

  • bjects
  • bjects
  • upon collision over a certain speed

upon collision over a certain speed ⇒ ⇒ the moving object dies the moving object dies

  • no sophisticated physics

no sophisticated physics

  • Ownship = the local player in the VE

Ownship = the local player in the VE

1. 1.

Moving object (ownship) against static objects Moving object (ownship) against static objects

2. 2.

Moving object (ownship) against moving objects (other players) Moving object (ownship) against moving objects (other players)

  • Up to the ownship to report its collisions and its death

Up to the ownship to report its collisions and its death

Ownship: Static Ownship: Static Object Collisions Object Collisions

  • Occurs when an object has moved

Occurs when an object has moved and its position is updated and its position is updated

  • Reduce the set of static objects

Reduce the set of static objects that must be considered that must be considered 1.

  • 1. Is the

Is the ownship

  • wnship below the a

below the a threshold elevation? threshold elevation? 2.

  • 2. Calculate 2D distance to all

Calculate 2D distance to all

  • bjects in the grid square
  • bjects in the grid square

3.

  • 3. Is the

Is the ownship’s

  • wnship’s ground

ground elevation less than the height of elevation less than the height of the static object? the static object?

  • Issue a detonation PDU or an

Issue a detonation PDU or an entity state PDU entity state PDU

Ownship: Moving Ownship: Moving Object Collisions Object Collisions

  • The

The ownship

  • wnship did not

did not collide collide with with any static any static object

  • bject
  • Reduce the collision comparison

Reduce the collision comparison space space 1.

  • 1. Check current and

Check current and neighbouring neighbouring squares squares 2.

  • 2. Calculate 3D distances to objects

Calculate 3D distances to objects 3.

  • 3. Cast a ray from the

Cast a ray from the ownship’s

  • wnship’s
  • rigin to the moving
  • rigin to the moving object’s
  • bject’s
  • rigin
  • rigin
  • The host managing moving

The host managing moving

  • bject also performs collision
  • bject also performs collision

detection and issues detection and issues PDUs PDUs

slide-3
SLIDE 3

Special Course on Networked Virtual Environments February 13, 2004 Jouni Smed 3

Fast, Accurate Collision Detection Fast, Accurate Collision Detection

  • Sweep

Sweep-

  • and

and-

  • prune

prune algorithm algorithm

  • An axially aligned 3D bounding

An axially aligned 3D bounding box for each object box for each object

  • Sort the bounding boxes

Sort the bounding boxes

  • Are the bounding boxes

Are the bounding boxes

  • verlapping?
  • verlapping?
  • for 3D

for 3D bounding bounding boxes to boxes to collide, their collide, their projections must projections must

  • verlap
  • verlap
  • Are the the convex

Are the the convex hulls hulls

  • verlapping?
  • verlapping?
  • Compute the actual area of

Compute the actual area of collision collision

Problems of Collision Problems of Collision Detection in NVEs Detection in NVEs

  • Who determines collision in

Who determines collision in an an NVE? NVE?

  • The object that has collided

The object that has collided

  • DIS

DIS does not require that the hosts use does not require that the hosts use the same collision detection the same collision detection algorithm algorithm

  • what if one

what if one decides decides to die, to die, whilst another whilst another decides that there was no decides that there was no collision collision

  • fair play requires a standard for collision detection

fair play requires a standard for collision detection

  • What about collisions

What about collisions that happen that happen

  • in between

in between time time steps, or steps, or

  • for dead

for dead-

  • reckoned

reckoned objects?

  • bjects?

Collisions in between Collisions in between Time Steps Time Steps

  • The objects are moving too

The objects are moving too fast fast

  • The time steps between

The time steps between frames are too large frames are too large

  • Requires

Requires additional additional computation computation

Collisions for Dead Collisions for Dead-

  • Reckoned

Reckoned Objects Objects

  • The

The ownship

  • wnship may determine collision with

may determine collision with a dead a dead-

  • reckoned

reckoned

  • bject and issue a packet
  • bject and issue a packet
  • The object collided with is at

The object collided with is at a slightly a slightly different different actual position actual position

  • no collision

no collision

  • collision with different results

collision with different results

  • Mechanism for establishing an agreement on which

Mechanism for establishing an agreement on which the objects the objects reach reach an acceptable conclusion an acceptable conclusion

  • Recognize arriving packets that indicate mutual collision

Recognize arriving packets that indicate mutual collision

  • the object that missed the collision

the object that missed the collision must also realize must also realize it it

  • problem

problem between the time of real collision and the learning between the time of real collision and the learning time time

  • how to correct the past?

how to correct the past?

Computational Resource Management Computational Resource Management

  • How to allocate processor time

How to allocate processor time for the for the processes processes

  • do we leave it to the operating

do we leave it to the operating system? system?

  • A blocked thread

A blocked thread should yield should yield the processor to the processor to the threads in the threads in waiting waiting

  • Subsystems in separate

Subsystems in separate threads threads

  • input

input subsystem subsystem

  • net

net read subsystem read subsystem

  • display

display subsystem subsystem

  • net

net write subsystem write subsystem

  • modelling

modelling subsystem subsystem

Post State Post State Changes Changes Generate Generate New Picture New Picture Read Network Read Network Compute State Compute State Changes from Changes from Net Reads Net Reads Read Input Read Input Devices Devices Compute State Compute State Changes from Changes from Inputs Inputs Computational Computational Modeling Modeling Shared Shared Memory Memory