Modelado jerarquico

Solo disponible en BuenasTareas
  • Páginas : 9 (2136 palabras )
  • Descarga(s) : 0
  • Publicado : 15 de mayo de 2011
Leer documento completo
Vista previa del texto
Lecture 7

Hierarchical Modeling

Outline
       

The OpenGL Transformation Pipeline Object Transformations Hierarchical Modeling Implementing Hierarchies

The 3D Graphics Pipeline
 
Modeling Transformations Viewing Transformation Trivial Rejection Illumination Projection Transformation Clipping Perspective Division Viewport Transformation Rasterization Display

 

  

Primitives are processed in a series of steps Each step forwards its result onto the next step It is a useful abstraction of projective rendering and the way OpenGL works Seldom are any two versions drawn or implemented the same way

Modeling Transformations
 
Modeling Transformations Viewing Transformation Trivial Rejection Illumination Projection Transformation Clipping PerspectiveDivision Viewport Transformation Rasterization Display

 

 

Modeling (or object) transformations orient our objects within world space All objects, light sources, and the camera are placed in world space Models can be built up hierarchically
  The topic of this lecture

Viewing Transformation
 
Modeling Transformations Viewing Transformation Trivial Rejection Illumination ProjectionTransformation Clipping Perspective Division Viewport Transformation Rasterization Display

 

 

Maps points from world space into camera space (also called eye space) This is a coordinate transformation into the frame from where we are viewing the scene What OpenGL function to you know that easily specifies the viewing transformation?

gluLookAt()
 

OpenGL provides a very helpfulutility function that implements the look-at viewing specification:
gluLookAt ( eyex, eyey, eyez, // eye point atx, aty, atz, // lookat point upx, upy, upz ); // up vector

 

These parameters are expressed in world coordinates

Trivial Rejection
 
Modeling Transformations Viewing Transformation Trivial Rejection Illumination Projection Transformation Clipping Perspective DivisionViewport Transformation Rasterization Display

 

 

Trivial rejection or occlusion culling eliminates all objects that are not visible, i.e., which are hidden by other primitives A simple form of occlusion culling is to cull back-facing triangles, called back-face culling It gets more complicated for translucent objects and complicated, large scenes   Typically, “trivial rejection” is farfrom trivial

Illumination
 
Modeling Transformations Viewing Transformation Trivial Rejection Illumination Projection Transformation Clipping Perspective Division Viewport Transformation Rasterization Display

 

 

Next we compute the illumination at all visible vertices Vertex colors are determined by their material properties and the lights in the scene The illumination model (e.g.,Phong illumination or another BRDF) is used to compute the color at each vertex

11/3/2004

Lecture 7: Slide 8

Projection Transformation
 
Modeling Transformations Viewing Transformation Trivial Rejection Illumination Projection Transformation Clipping Perspective Division Viewport Transformation Rasterization Display

 

 

 

We specify a viewing frustum for our camera anddiscard all the objects outside the frustum Triangles that are on the border need to be clipped The projection transformation takes us from camera space to clip space   Note: We keep the z-coordinates around and stay in 3D What OpenGL functions specify a perspective projection transformation?

Perspective Transformations
 

OpenGL provides a function to set up this perspectivetransformation:
glFrustum(left, right, bottom, top, near, far);

 

There is also a simpler OpenGL utility function:
gluPerspective(fov, aspect, near, far);

  fov = vertical field of view in degrees   aspect = image width / height at near depth

Clipping & Perspective Division
 
Modeling Transformations Viewing Transformation Projection Transformation Clipping Perspective Division...
tracking img