3D graphics - PowerPoint PPT Presentation

About This Presentation
Title:

3D graphics

Description:

Texture ... no texture, fog, transparency. no clipping from multiple objects ... illumination and Gourand shading plus shadows, texture, etc. ...100x to 400x ... – PowerPoint PPT presentation

Number of Views:12
Avg rating:3.0/5.0
Slides: 18
Provided by: stan7
Category:
Tags: graphics | texture

less

Transcript and Presenter's Notes

Title: 3D graphics


1
3D graphics
  • For client processors its the big gorilla of
    compute requirements.
  • Image creation/ reconstruction/ 2 and 3D
    projection/ animation/ visualization
  • Must be interactive for image creation and
    smoothly(visually) manage motion and update
    dynamics

2
3D graphics
  • Some basic requirements
  • smooth motion 15 frames/sec
  • frame size 1260 x 1024 down to 512 x 512
  • pixel 24b (3 colors, RGB) 8b color control
    sometimes double buffered and z buffered (3D) up
    to 96b total.
  • frame size x pixel size frame buffer
  • frame buffer also used to refresh video _at_ 30 or
    60 Hz

3
Operations, simple 2D type
  • Limited primitives polygon, line, circle,
    ellipse
  • ops scale, translate, overlay and clip
  • typical op is S op D D op is replace, or, xor,
    and applied to blocks of pixels
  • computations linear, y mx b, or quadratic
    x2 y2 R2 mostly on index valuesneeds say
    16b, sometimes 32b FP computation

4
Clipping
  • Requires finding point at which line (edge)
    intersects plane or another line then filling
    included spacesneed to find intersect line
  • Computation of the form t N x D P/ D

5
Video controllers and VRAM
  • Video controller is responsible for CRT refresh
    usually 30 or 60 Hz.
  • Must access the frame buffer for data, can be a
    significant memory bandwidth limit the larger
    the DRAM the worse the problem
  • Solution is VRAM two ported DRAM, one is a
    serial port which reads out all pixels in a scan
    line in one cycle then buffers and forwards it.

6
2D transformations
  • Translate (move), Scale (change size) and
    Rotatecan be viewed as a matrix, M operating on
    a point, P(x,y)
  • M is a 3 x 3 matrix expressing T, S and R
    parameters Reducible to 4 mpy and 4 adds per
    point.

7
3D transformations
  • Need now to transform object to a new coordinate
    systemthen do scaling, rotationthen retransform
    to viewers plane
  • M now a 4 x 4 matrix applied several times
  • Maybe 25 multiplies and 18 adds per point
  • Note not all points need transformation, only
    vertices

8
Triangles and polygons
  • Gather pixels into objects with shared edges then
    deal only with transforming the vertices and the
    normal surface vector.
  • Maybe 100 pixels per triangle or polygon fine
    resolution might use 10 pixels/ object
  • Object may consist of 10,000 triangles, 30k
    vertices not 1M pixels

9
Shading/ lighting
  • Diffuse ambient light creates no shading...
    Simplest
  • Illumination can vary by angle between N (normal
    to the polygon) and L (the source)
  • Source of illumination can be a point or a region
    (expressed as cosn g). The larger the n the
    narrower the beam
  • Compute N and L across polygon face

10
Shading
  • Can interpolate shade across a polygon
  • Gourand shading interpolates shade across edges,
    reduces effect of intensity change.
  • Phong shading (and illumination) interpolates
    surface normal vector across polygons then
    interpolates illumination.

11
Texture
  • Surface of object polygons perturbed by applying
    bump map add map values to polygon values.

12
Shadows and beyond
  • Can be computationally intensive, project each
    polygon on light source find projection on other
    polygons
  • 3D shadows, transparency, fog and atmospherics
    all complicate the computation.

13
Compute requirements
  • Assume a very simple image.
  • 10k triangles with 100 pixels/ triangles
  • 1024x1024 RGB display updated 10 frames/sec
  • diffuse ambient illumination
  • shading, no shadows
  • no texture, fog, transparency
  • no clipping from multiple objects

14
Compute requirements
  • Transform/ rotate takes 25 multiplies 18
    adds/vertex 10k x 3 30k vertices
  • Computing viewers projection of the object
    surface (which triangles are in view) takes 18
    multiplies 14 adds / vertex
  • Simple lighting 12 mpy 5 adds/vertex
  • Clipping 3 divides/ vertix
  • Plus

15
Compute requirements
  • Net about 2M multiplies 1.4M adds/frame
  • About 30 Mflops depending on image clipping adds
    1M divides/sec
  • Plus about 50 Maps to the frame buffer.
  • Refined images (10 pixels/polygon) plus Phong
    illumination and Gourand shading plus shadows,
    texture, etc. 100x to 400x
  • WHEW

16
Designing for multimedia
  • Must support very high bandwidth arithmetic
  • pipelined integer and fp
  • optimized for 8, 16 and 32b operands
  • instructions set support for sub word concurrency
  • divide and sqrt can be important as well as trig
    functions.

17
Designing for multimedia
  • Must support very high bandwidth memory
  • structured memory access VRAM
  • VRAM on chip?
  • structured L1 D cache
  • large L2 maybe also structured or bypassed as
    with vector processor.
Write a Comment
User Comments (0)
About PowerShow.com