virtual reality modeling system architecture modeling& vr toolkits

67
Virtual Reality Modeling Virtual Reality Modeling

Upload: melvin-chandler

Post on 12-Jan-2016

230 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Virtual Reality ModelingVirtual Reality Modeling

Page 2: Virtual Reality Modeling System architecture Modeling& VR Toolkits

System architecture

ModelingModeling&&

VR ToolkitsVR Toolkits

Page 3: Virtual Reality Modeling System architecture Modeling& VR Toolkits

The VR modeling cycle

Page 4: Virtual Reality Modeling System architecture Modeling& VR Toolkits

The VR geometric modeling: The VR geometric modeling:

Object surface shape: polygonal meshes (vast majority); splines (for curved surfaces);

Object appearance:Lighting (shading) texture mapping

Page 5: Virtual Reality Modeling System architecture Modeling& VR Toolkits

The surface polygonal (triangle) meshThe surface polygonal (triangle) mesh

Shared vertexShared vertex

Non-shared vertexNon-shared vertex

(X(X00,Y,Y00,Z,Z00))

(X(X11,Y,Y11,Z,Z11))

(X(X22,Y,Y22,Z,Z22))

(X(X33,Y,Y33,Z,Z33))

(X(X44,Y,Y44,Z,Z44))

(X(X55,Y,Y55,Z,Z55))

Triangle meshes are preferred since they are memoryand computationally efficient (shared vertices)

Page 6: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Object spline-based shape: Object spline-based shape: Another way of representing virtual objects; Functions are of higher degree than linear functions describing a polygon – use less storage and provide increased surface smoothness. Parametric splines are represented by points x(t), y(t), z(t), t=[0,1] and a, b, c are constant coefficients.

Page 7: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Object spline-based shape: Object spline-based shape:

Parametric surfaces are extension of parametric splines with point coordinates given by x(s,t), y(s,t), z(s,t), with s=[0,1] and t=[0,1].

β-Splines are controlled indirectly through four control points (more inphysical modeling section)

Page 8: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Object polygonal shape: Object polygonal shape: Can be programmed from scratch using OpenGL or other toolkit editor; it is tedious and requires skill; Can be obtained from CAD files; Can be created using a 3-D digitizer (stylus), or a 3-D scanner (tracker, cameras and laser); Can be purchased from existing online databases (Viewpoint database). Files have vertex location and connectivity information, but are static.

Page 9: Virtual Reality Modeling System architecture Modeling& VR Toolkits

CAD-file based models: Done using AutoCAD; Each moving part a separate file; Files need to be converted to formats compatible with VR toolkits; Advantage – use of preexisting models in manufacturing applications.

Geometric ModelingGeometric Modeling

Page 10: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Geometric ModelingGeometric Modeling

Venus de Milo created Venus de Milo created using the HyperSpace using the HyperSpace 3D digitizer, 4200 textured 3D digitizer, 4200 textured polygons using NuGraphpolygons using NuGraphtoolkit toolkit

Page 11: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Polhemus 3-D scanners: Polhemus 3-D scanners: Eliminate direct contact with object. uses two cameras, a laser, and magnetic trackers (if movable objects are scanned) Scanning resolution 0.5 mm at 200 mm range; Scanning speed is 50 lines/sec; Range is 75-680 mm scanner-object range.

Page 12: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Geometric ModelingGeometric Modeling

Polhemus FastScan 3D scanner (can scan objects up to 3 m long).Polhemus FastScan 3D scanner (can scan objects up to 3 m long).

Page 13: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Conversion of scanner data: Conversion of scanner data: Scanners produce a dense “cloud” of vertices (x,y,z). Using such packages as Wrap (www.geomagic.com) the point data is transformed into surface data (including editing and decimation)

Point cloudPoint cloudfrom scannerfrom scanner

Polygonal mesh Polygonal mesh after decimationafter decimation

Page 14: Virtual Reality Modeling System architecture Modeling& VR Toolkits

PolygonalPolygonal surfacesurface

NURBS surface NURBS surface NURBS (non-uniformNURBS (non-uniformrational rational β-splines) patchesβ-splines) patches

Page 15: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Higher resolution model > 20,000 polygons.

Low res. Model – 600 polygons

Geometric Modeling – using online databasesGeometric Modeling – using online databases

Page 16: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Object Visual Appearance Object Visual Appearance

Scene illumination (local or global); Texture mapping; Multi-textures Use of textures to do illumination in the rasterizing

stage of the pipeline

Page 17: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Scene illumination Scene illumination Local methods (Flat shaded, Gouraud shaded, Phong shaded) treat objects in isolation. They are computationally faster than global illumination methods;

Global illumination treats the influence of one object on another object’s appearance. It is more demanding from a computation point of view but produces more realistic scenes.

Page 18: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Phong shading modelPhong shading model

Flat shading modelFlat shading model

Ip = Ib – (Ib- Ia) xb-xp

xb-xa

Gouraud shading modelGouraud shading model

Local illumination methodsLocal illumination methods

Page 19: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Flat shaded Flat shaded Utah Teapot Utah Teapot

Phong shaded Phong shaded Utah Teapot Utah Teapot

Page 20: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Global scene illumination Global scene illumination The inter-reflections and shadows cast by objects on each other.

Page 21: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Radiosity illumination Radiosity illumination Results in a more realistic looking scene

Without radiosity With radiosity

Page 22: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Texture mapping Texture mapping It is done in the rasterizer phase of the graphics

pipeline, by mapping assigning texture space

coordinates to polygon vertices (or splines),

then mapping these to pixel coordinates; Texture increase scene realism; Texture provide better 3-D spatial cues (they are

perspective transformed); They reduce the number of polygons in the scene –

increased frame rate (example – tree models).

Page 23: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Textured room image for increased realismTextured room image for increased realism

Page 24: Virtual Reality Modeling System architecture Modeling& VR Toolkits

How to create textures: How to create textures: Models are available on line in texture

“libraries” of cars, people, construction materials, etc.

Custom textures from scanned photographs or Using an interactive paint program to create bitmaps

Page 25: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Texture mappingTexture mapping

Object surfaceObject surface

Texture spaceTexture space

Screen spaceScreen space

256x256 texture

[0,1]

[0,1]

Page 26: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Image Texture: Image Texture: It “glues” an image to a polygon. Size of texture is restricted by graphics accelerators

to 2m 2n or 2m 2m square. The lower limit for

OpenGL is 64 64 texels. If the size of the polygon is much larger than the size

of the texture then the hardware has to perform

Magnification; If there are much fewer pixels than texels – minification; Both techniques use bilinear interpolation to assign colors

to pixels.

Page 27: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Texture minification: Texture minification:

Texture

Pixel

Uses various “filters” to approximate the color of the pixel: nearest neighbor (to texel closest to the pixel center is selected, bilinear interpolation, etc.)

Page 28: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Tree,higher resolution model45,992 polygons.

VR Geometric ModelingVR Geometric Modeling

Tree represented as a texture1 polygon, 1246x1280 pixels(www.imagecels.com).

Page 29: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Multi-texturing: Multi-texturing: Several texels can be overlaid on one pixel; A texture blending cascade is made up of a series of texture stages

(from “Real Time Rendering”)

Interpolated Interpolated vertex valuesvertex values

Texture Texture

value 0 value 0

Stage 0 Stage 1 Stage 2

Texture Texture

value 1 value 1

Texture Texture

value 2 value 2

Polygon/Polygon/

Image buffer Image buffer

Page 30: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Allow more complex texturesAllow more complex textures

Bump Bump mapsmaps

TransparencyTransparency texturetexture

Normal Normal texturetexture

BackgroundBackground texturetexture

Reflectivity Reflectivity texturetexture

Page 31: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Multi-texturing for bump mapping: Multi-texturing for bump mapping: Lighting effects caused by irregularities on object

surface are simulated through “bump mapping”; This encodes surface irregularities as textures; No change in model geometry. No added

computations at the geometry stage; Done as part of the per-pixel shading operations

of the NSR

Page 32: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Bump mapping per-pixel shading Bump mapping per-pixel shading

Bump Bump texturetexture

Normal Normal texturetexture

Multi- Multi- texturetexture

Page 33: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Multi-texturing for lighting: Multi-texturing for lighting: Several texels can be overlaid on one pixel; One application in more realistic lighting; Polygonal lighting is real-time but requires lots of

polygons (triangles) for realistic appearance

Vertex lighting of low polygoncount surface – lights are diffuse –tessellated.

Vertex lighting of high polygoncount surface – lights have realisticappearance. High computation load

(from NVIDIA technical brief)

Page 34: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Multi-texturing (texture blending): Multi-texturing (texture blending): Realistic-looking lighting can be done with

2-D textures called “light maps”; Not applicable to real-time (need to be recomputed

when object moves)

Standard lighting map 2-D texture

Light map texture overlaid on top of wall texture. Realistic and low polygon count. Not real-time!

(from NVIDIA technical brief)

Page 35: Virtual Reality Modeling System architecture Modeling& VR Toolkits

NVIDIA Shading Rasterizer: NVIDIA Shading Rasterizer: NVIDIA proposed to combine the dynamics of Polygon-based

shading with the realism of light maps; Vertex info used in shading: position, texture, normal; Let’s assign same info to pixels and do shading at pixel level!

Lighting by interpolation of vertex information Realistic and real-time!

(from NVIDIA technical brief)

Lighting in Geometry Stage Lighting with Shading Rasterizer

Page 36: Virtual Reality Modeling System architecture Modeling& VR Toolkits

KINEMATICS MODELING: KINEMATICS MODELING:

Homogeneous transformation matrices; Object position; Transformation invariants; Object hierarchies; Viewing the 3-D world.

Page 37: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Homogeneous Transformations: Homogeneous Transformations: Homogeneous system of coordinates is a

right-hand Cartesian system of coordinates with

orthonormal unit vector triads; Such (i,j,k) triads have the property that their

norms |i|= |j| = |k| = 1 and their dot product is

i • j = i • k = j • k = 0; Homogeneous transformation matrices relate two

such systems through a 4 4 matrix.

Page 38: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Homogeneous Transformations: Homogeneous Transformations: Have the general format:

T A B = [ ] R3x3 P3x1

0 0 0 1

where R3x3 is the rotation submatrix expressing the orientation

of the system of coordinates B vs system of coordinates A;

P3x1 is the position vector of the origin of system B

vs. the origin of system of coordinates A.

Page 39: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Homogeneous Transformations:Homogeneous Transformations:

Have many advantages: treat object translation and rotation mathematically

in the same way; are easily invertible;

T B A = ( T A B ) -1 =[ ] RT -RT P

0 0 0 1

Page 40: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Object Position/Orientation (static): Object Position/Orientation (static): given by homogeneous transformation matrix

that relates the object system of coordinates to

world system of coordinates.

T W 1 = [ ]iw1 jw1 kw1 P1

0 0 0 1

where iw1 , jw1 , kw1 are

3 1 vectors projecting the object unit vectors into word system of coordinates

Page 41: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Object Position/Orientation (moving): Object Position/Orientation (moving): If the virtual object moves, then the

transformation matrix becomes a function of time

T W 1 (t) = [ ]iw1 (t) jw1(t) kw1(t) P1 (t)0 0 0 1

The position of an object vertex Vi in word coordinates versus its position in object coordinates

Vi(W) (t) = T W 1 (t) Vi

(object)

Page 42: Virtual Reality Modeling System architecture Modeling& VR Toolkits

If the virtual object translates, all vertices translate

VVii(W)(W) (t)(t) = = VVi i

(object)(object) [[ ]]1 0 0 p1 0 0 p1x 1x (t)(t)

0 1 0 p0 1 0 p1y 1y (t)(t)

0 0 1 p0 0 1 p1z 1z (t)(t)

0 0 0 10 0 0 1

Page 43: Virtual Reality Modeling System architecture Modeling& VR Toolkits

If the virtual object translates back to its initial position, all its vertices translate by an equal but negative amount.

VVii(W)(W) (t)(t) = = VVi i

(object)(object) [[ ]]1 0 0 -p1 0 0 -p1x 1x (t)(t)

0 1 0 -p0 1 0 -p1y 1y (t)(t)

0 0 1 -p0 0 1 -p1z 1z (t)(t)

0 0 0 10 0 0 1

Page 44: Virtual Reality Modeling System architecture Modeling& VR Toolkits

If the virtual object needs to be scaled, it is translated back, scaled, then translated to a new position

VVii(W)(W) (t)(t) = = T T W W 2 2 T T W W 1 1VVi i

(object)(object) [[ ]]ssxx 0 0 0 0 0 0

0 s0 syy 0 0 0 0

0 0 s0 0 sz z 0 0

0 0 0 1 0 0 0 1

Page 45: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Tracking a virtual hand:

Source system of coordinatesSource system of coordinates

Receiver system of coordinatesReceiver system of coordinates

World system of coordinatesWorld system of coordinates

Object system of coordinatesObject system of coordinates

T T worldworldsourcesource

T T worldworldobjectobject

T T sourcesourcereceiverreceiver

Page 46: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Transformations concatenation: Transformations concatenation: Transformation matrices can be compounded to

obtain the resulting motion. Example – simulating

a virtual hand.

If the object is grasped, then its position does notchange vs. the hand. Thus the movement of the grasped object in word coordinates is:

T T W W hand hand (t) = (t) = T T W W source source T T source source receiver receiver (t)(t)

T T W W object object (t) = (t) = T T W W source source T T source source receiver receiver (t) (t) T T receiverreceiver object object

Page 47: Virtual Reality Modeling System architecture Modeling& VR Toolkits

VR Kinematics ModelingVR Kinematics Modeling

Page 48: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Object Hierarchies: Object Hierarchies: Allows models to be partitioned into a hierarchy,

and become dynamic; Segments are either parents (higher level object)

or children (lower level objects). The motion of a parent is replicated by its

children but not the other way around. Example – the virtual human and the virtual

hand; At the top of the hierarchy is the “world global

transformation” that determines the view to the scene.

Page 49: Virtual Reality Modeling System architecture Modeling& VR Toolkits

VR Kinematics ModelingVR Kinematics Modeling

a) b)

Model hierarchy: a) static model (Viewpoint Datalabs); b) segmented model.

Page 50: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Object hierarchy for a Virtual Hand: Object hierarchy for a Virtual Hand: Transformation matrices can be compounded to obtain the motion of the fingertip versus the world coordinates.

T T W W palm palm (t) (t) is given by the glove tracker

T T palmpalm 1 1 (t), (t), T T 11 2 2 (t), (t), T T 22 3 3 (t) (t) are given by the sensors on the glove

T T global global fingertip fingertip (t) = (t) = T T global global WW(t) (t) T T W W source source T T source source palm palm (t) (t)

T T palmpalm 1 1 (t)(t)T T 11 2 2 (t) (t) T T 22 3 3 (t) (t) T T 33 fingertip fingertip

Page 51: Virtual Reality Modeling System architecture Modeling& VR Toolkits

T T global global fingertip fingertip (t)(t)

T T W W palm palm (t)(t)

T T 33 fingertip fingertip

T T 22 3 3 (t)(t)

T T 11 2 2 (t),(t),

T T palmpalm 1 1 (t)(t)

World system of coordinatesWorld system of coordinates

Camera system of coordinatesCamera system of coordinates

Receiver system Receiver system of coordinatesof coordinates

Source system of coordinatesSource system of coordinates

T T global global fingertip fingertip (t) = (t) = T T global global WW(t) (t) T T W W source source T T source source palm palm (t) (t)

T T palmpalm 1 1 (t)(t)T T 11 2 2 (t) (t) T T 22 3 3 (t) (t) T T 33 fingertip fingertip

T T global global WW(t)(t)

T T W W sourcesource

zz

xx

yy

Page 52: Virtual Reality Modeling System architecture Modeling& VR Toolkits

VViicarcar

T T global global car car

World system of coordinatesWorld system of coordinates

Camera system of coordinatesCamera system of coordinates

T T global global vertex( vertex(ii)) = = T T global global WW T T W W carcar

T T global global WW

T T W W carcar

zzxx

yy

Page 53: Virtual Reality Modeling System architecture Modeling& VR Toolkits

VR Kinematics Modeling: VR Kinematics Modeling:

Homogeneous transformation matrices; Object position; Transformation invariants; Object hierarchies; Viewing the 3-D worldViewing the 3-D world.

Page 54: Virtual Reality Modeling System architecture Modeling& VR Toolkits

VR Modeling

ApplicationApplication GeometryGeometry RasterizerRasterizer

The Graphics Rendering Pipeline (revisited)The Graphics Rendering Pipeline (revisited)

Model & ViewModel & ViewTransformationTransformation

LightingLighting ProjectionProjection ClippingClippingScreen Screen

MappingMapping

The Geometry Functional Sub-StagesThe Geometry Functional Sub-Stages

Page 55: Virtual Reality Modeling System architecture Modeling& VR Toolkits

VR Modeling

ApplicationApplication GeometryGeometry RasterizerRasterizer

The Rendering PipelineThe Rendering Pipeline

Model & ViewModel & ViewTransformationTransformation

LightingLighting ProjectionProjection ClippingClippingScreen Screen

MappingMapping

The Geometry Functional Sub-StagesThe Geometry Functional Sub-Stages

Page 56: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Model and Viewing Transformations: Model and Viewing Transformations: Model transforms link object coordinates to world

coordinates. By changing the model transform, the same

object can appear several times in the scene.

We call these instances.

World system or coordinateWorld system or coordinate

Virtual ballVirtual ball

Instance 2 of Virtual ballInstance 2 of Virtual ball

Instance 5Instance 5

[[ ]]1 0 0 p1 0 0 p1x 1x (t)(t)

0 1 0 p0 1 0 p1y 1y (t)(t)

0 0 1 p0 0 1 p1z 1z (t)(t)

0 0 0 10 0 0 1

[[ ]]1 0 0 p1 0 0 p5x 5x (t)(t)

0 1 0 p0 1 0 p5y 5y (t)(t)

0 0 1 p0 0 1 p5z 5z (t)(t)

0 0 0 10 0 0 1

Page 57: Virtual Reality Modeling System architecture Modeling& VR Toolkits

T T camera camera fingertip 2 fingertip 2 (t)(t)

Camera system of coordinatesCamera system of coordinates

zz

xx

yy

T T camera camera fingertip 1 fingertip 1 (t)(t)

The View Transform matrix captures the position and orientation of the virtual camera in the virtual world; It maps world coordinates to camera space (also called “eye space”); The camera is located at the origin of the camera coordinate system, looking in the negative Z axis, with Y pointing upwards, and X to the right.

Page 58: Virtual Reality Modeling System architecture Modeling& VR Toolkits

xx

Camera “fly-by”Camera “fly-by”

zz

yy

User interactively changes theUser interactively changes theviewing transformviewing transform by changing by changing the position and aim of the virtualthe position and aim of the virtualcamera = “fly-by.”camera = “fly-by.”

T T camera camera tree tree (t)(t)

Page 59: Virtual Reality Modeling System architecture Modeling& VR Toolkits

VR Modeling

ApplicationApplication GeometryGeometry RasterizerRasterizer

The Rendering PipelineThe Rendering Pipeline

Model & ViewModel & ViewTransformationTransformation

LightingLighting ProjectionProjection ClippingClippingScreen Screen

MappingMapping

The Geometry Functional Sub-StagesThe Geometry Functional Sub-Stages

Page 60: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Projection Transformations: Projection Transformations: Models what portion (volume) of the virtual world the camera actually sees. There are two kinds of projections, parallel projection and perspective projection VR uses perspective.

Parallel projectionParallel projectionPerspective projectionPerspective projection

projection planeprojection plane

projection reference pointprojection reference point

Page 61: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Perspective Projection Transformation: Perspective Projection Transformation: If the projection reference point is at the origin of the system of coordinates, and the projection plane is at –d,

Then the (non invertible) perspective projection transformation matrix is:

projection planeprojection plane

projection reference pointprojection reference point -d-d

XX ZZ

YY T T projectionprojection= = [ ][ ]1 0 0 0 1 0 0 0 0 1 0 00 1 0 00 0 1 0 0 0 1 0 0 0 -1/d 00 0 -1/d 0

Page 62: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Second Perspective Projection Transformation: Second Perspective Projection Transformation: The portion of the virtual world seen by the camera at a given time is limited by front and back “clipping planes”.

These are at z=n and z= f. Only what is within the viewing cone (also called fulcrum) is sent down the rendering pipe.

clipping planeclipping plane (l,t,f)(l,t,f)

projection reference pointprojection reference point

(r,b,n)(r,b,n)

XX ZZ

YY

Page 63: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Canonical Mapping: Canonical Mapping: The second projection transform maps the viewing volume to a unit cube with extreme points at (-1,-1,-1) and (1,1,1). This is called the canonical view volume.

XX

(l,t,f)(l,t,f)

(r,b,n)(r,b,n) ZZ

YY

YY

XX

ZZ

T’ T’ projectionprojection= = [ ][ ]2n/(r-l) 0 -(r+l)/(r-l) 0 2n/(r-l) 0 -(r+l)/(r-l) 0 0 2n/(t-b) -(t+b)/(t-b) 00 2n/(t-b) -(t+b)/(t-b) 00 0 (f+n)/(f-n) -2fn/(f-n) 0 0 (f+n)/(f-n) -2fn/(f-n) 0 0 1 00 0 1 0

Page 64: Virtual Reality Modeling System architecture Modeling& VR Toolkits

VR Modeling

ApplicationApplication GeometryGeometry RasterizerRasterizer

The Rendering PipelineThe Rendering Pipeline

Model & ViewModel & ViewTransformationTransformation

LightingLighting ProjectionProjection ClippingClippingScreen Screen

MappingMapping

The Geometry Functional Sub-StagesThe Geometry Functional Sub-Stages

Page 65: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Clipping Transformation: Clipping Transformation: Since the fulcrum maps to the unit cube, only objects inside it will be rendered. Some objects are partly inside the unit cube (ex. the line and the rectangle). Then they need to be “clipped”. The vertex VV1 1 is replaced by new one at the intersection between the line and the viewing cone, etc.

ZZ

XX

Unit cubeUnit cube

ZZ

XX

VV11

VV22

VV33

VV11

VV22

VV33

Scene clippingScene clipping

Page 66: Virtual Reality Modeling System architecture Modeling& VR Toolkits

VR Modeling

ApplicationApplication GeometryGeometry RasterizerRasterizer

The Rendering PipelineThe Rendering Pipeline

Model & ViewModel & ViewTransformationTransformation

LightingLighting ProjectionProjection ClippingClippingScreen Screen

MappingMapping

The Geometry Functional Sub-StagesThe Geometry Functional Sub-Stages

Page 67: Virtual Reality Modeling System architecture Modeling& VR Toolkits

Screen Mapping (Viewport Transformation): Screen Mapping (Viewport Transformation): The scene is rendered into a window with corners (x1,y1), (x2,y2)

Screen mapping is a translation followed by a scaling that affects the x and y coordinates of the primitives (objects), but not their z coordinates. Screen coordinates plus z [-1,1] are passed to the

rasterizer stage of the pipeline.

ZZ

XX

VV11

VV22

VV33

Screen mappingScreen mapping

(x1,y1)(x1,y1)

(x2,y2)(x2,y2)