3D Graphics - PowerPoint PPT Presentation

1 / 59
About This Presentation
Title:

3D Graphics

Description:

3D Graphics is characterised more by the 3D nature of the Models (input into ... the objects material properties such as: shininess/gloss (more on this next week) ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 60
Provided by: Joh6198
Category:
Tags: gloss | graphics

less

Transcript and Presenter's Notes

Title: 3D Graphics


1
3D Graphics
  • 3D Graphics Pipeline
  • Modelling
  • TUTORIAL3D Graphics with POVRay

2
(No Transcript)
3
Three-dimensional Graphics
  • 3D Graphics is characterised more by the 3D
    nature of the Models (input into rendering)
    rather than the final display (output) modeling
    world
  • In most cases, our output devices are limited to
    2D, so we need to utilise techniques to render
    these objects with the illusion of the third
    dimension of depth

4
Three Dimensional Concepts
  • 3D viewing positions
  • projection
  • depth cueing
  • visible line and visible surface identification
  • surface rendering
  • three-dimensional views/ stereoscopic views

5
3D GRAPHICS PIPELINE
WORLD/SCENE/OBJECT/CONCEPT
Modelling coordinates - world coordinate system,
- object coordinate system
3D MODELLING
VIEWING
3D CLIPPING
Camera coordinates
PROJECTION
Screen/Window coordinates
RASTERIZATION
Device coordinates
2D PIXELMAP DISPLAY
6
Modelling
Implicit
3D Modelling
Polygonal
Volumetric
Parametric
7
Viewing and Projection
3d models
camera setup
viewport
8
Camera Positioning
Different views of a 3D model
9
Projection
Representing three dimensions on two dimensional
media by Projection
10
Albrecht Dürer (1471-1528).
11
Vermeer
12
Depth Cues
Shadows as depth cues
Perspective and Depth of Field
Highlight/Shadow
13
Surface Rendering
Light and shadow colour of diferent parts of an
object suggest its three -dimensional nature
14
Rasterization
Although the images are flattened to 2D, there is
some depth knowledge required on how to order them
15
Modelling
16
Goals
  • Technical Goals
  • Storage on digital memory
  • Aim for a concise, unambiguous description of
    concept
  • In graphics, optimise model for visual output
  • Aesthetic Goals
  • Look appealing
  • Look Real? (maybe)
  • Look the way we want it to

17
Modelling Objects
  • Basic requirements The shape of an object
  • Additionally we may require
  • Topology (interconnections, normals)
  • Material Properties
  • Colour
  • Shininess
  • Transparency
  • Behavioural Information
  • e.g. Density, Importance,
  • Modeling decisions based heavily on the target
    application the rendering system

18
Rendering
  • What do rendering systems require?
  • Consider
  • Speed Do we require Real-time, Interactive or
    Offline rendering
  • Space limitations
  • Re-use?
  • Rendering limitations (software/hardware)

19
Wire frame rendering
Largely, only edge/surface data is required
20
Filled Polygons
Colour/Weight/Name is required for each region
21
Basic Shading
22
Shading
The vectors N, L, V, R need to be stored or
evaluated
We need to know material colour, texture and
finish
23
Phong Shading
24
Reflectance Models
How different materials reflect incoming light
determined by roughness or finish
Basic Shading (Perfect Diffuse)
Perfect Mirror
Phong Highlight
Diffuse
25
Advanced Illumination
  • Offline methods employ more detailed simulations
    of light transfer
  • Some of these now possible in real-time due to
    high-end graphics hardware

26
Ray tracing
27
Ray Tracing
The colours of light reflected from one point are
also dependent on indirect light bouncing off
other objects in the scene.
28
Texture Mapping
29
Texture Mapping
l
n


v
r
Lighting calculations as per usual but with
material properties (or colour values) varying
across the polygon.
30
Bump Mapping
31
Bump Mapping
A real bump distorts the directions of the
normals (this effects calculations of light
reflectance)
Fake bumps created by distorting the normals
although the geometry is still flat.
A bump-map texture applied to a flat polygon.
32
Radiosity
33
Modelling Shape
  • Boundary Representation Surface Models
  • Spatial Partitioning Volume Models
  • Mathematical Models
  • Discrete Models

34
Surface Representations
  • Polygon Mesh a.k.a. Wire frame

35
Mathematical Models
  • Parametric/Implicit
  • Evaluators

Implicit
Parametric
36
Discretization
300 polygons
120 polygons
1000 polygons
48 polygons
In most cases, mathematical models need to be
converted to discrete representations before we
use them in scenes. We need to find an
appropriate resolution for this.
37
Volumetric Modules
Constructive Solid Geometry
38
Volumetric Models
  • Voxels (Volume elements/Volumetric pixels)

39
Modelling Scenes
Modelling complex scenes made up many objects is
a two step process of modelling individual
objects and then placing these in the scene
(using transforms)
40
Object Transformations
scaling
translation
rotation
41
Scene Graphs
TRINITY
Individual object geometries are first modelled.
These are then linked using positional/orientation
al relationships (transforms)
42
A Scene Graph
Body
Hood Trunk Front Bumper Rear Bumper Left Door
Left Door Glass Right Door Right Door
Glass Left Front Wheel Right Front Wheel Left
Rear Wheel Right Rear Wheel
There can be multiple levels of transforms e.g.
the door glass is linked to the door which is
linked to the body
43
Sources of Visual Data
  • Automated Acquisition
  • Scanning
  • Digital Cameras (Images and Video)
  • Mathematical Models
  • Mathematical curves and shapes
  • Procedural Modelling
  • Experimental Data
  • Hand-coded Models (OR Hand Coded Scenes made up
    of Models that have been acquired from elsewhere)
  • More on acquisition and Mathematical Modelling
    later

44
3D Studio Max
45
Sources of 3D Data
  • 3D Scanners
  • Digitizers

46
3D scanner data usually very detailed often
requires some downsampling (simplification)
47
Level of Detail
7,809 tris
488 tris
975 tris
1,951 tris
3,905 tris
Select the right number of polygons/triangles for
a specific purpose (e.g. for distant views,
low-end machines use less triangles)
48
POVRay
  • Basic Tutorial

49
POVRay
  • A popular free High-quality tool for 3D graphics
  • Available for Windows, Mac, Linux
  • Get it at http//www.povray.org
  • Scenes are stored in a simple text file with a
    .POV extension

50
Optional Libraries
  • A number of pre-defined high-level functions are
    provided in the optional libraries.
  • These are included as required using the include
    directive
  • e.g.
  • include colors.inc
  • include shapes.inc
  • include textures.inc

51
Vectors
  • Colours, Positions and Directions are represented
    using vectors e.g.
  • rgb lt1, 1, 1gt
  • rgbf lt0, 0, 1, 0.5gt
  • translate lt0, 1, 1gt
  • colors.inc includes some named colors e.g.
    Blue, White, Red. If you want to use this in your
    model, insert the following at the start of the
    file
  • include colors.inc

52
Comments
  • Comments can be included in a similar way to java
    script e.g.
  • texture
  • pigment //this is a single line comment
  • color Blue
  • / this is a multi-line comment
  • Still a comment
  • Last line of comment /

53
Camera Positioning
  • The following is a simple set-up you can use for
    now
  • camera
  • Perspective
  • location lt0, 0, -10gt
  • direction lt0, 0, 1gt
  • up lt0, 1, 0gt
  • There are other options you can use for modelling
    a camera. e.g. instead of a direction, you can
    specify a target point (or look_at point) that
    the camera always points to.
  • We will discuss camera modelling in more detail
    in later lectures

54
Light Source
  • For any object to be rendered visible, we require
    at least one light source or emissive object
  • light_source
  • lt5, 5, 5gt // position
  • rgb lt1, 1, 1gt //colour

55
Simple Objects
  • A few basic shapes are provided in the shapes.inc
    library e.g. the sphere is declared with a vector
    specifying the location of its center and a
    radius
  • sphere lt0, 0, 0gt, 2
  • Material properties and transformations can also
    be included within the object description e.g.
  • sphere
  • lt0, 0, 0gt, 2
  • pigment rgb lt1, 0, 0gt
  • rotate lt4, 0, 0gt

r
c
56
Simple Objects Planes
  • Infinite planes are defined by a normal direction
    and a distance from the origin e.g.
  • plane
  • lt1, 1, 0gt, 2
  • pigment Blue

n
d
57
Simple Objects Cuboids
  • Boxes are defined by a the positions of two
    opposite corners e.g.
  • box
  • lt-1,-1,-1gt, lt1, 1, 1gt
  • rotate 30lt0, 1, 0gt
  • pigment White

58
Texture pigment
  • Objects material properties are defined in the
    texture command which can be inserted into the
    object declaration
  • The first part of the texture specifies the
    object colour
  • texture
  • pigment
  • rgb lt1, 0, 0gt
  • POVRay allows you to take a shortcut and leave
    out the texture part if you wish to just
    declare a simple pigment
  • At the very least you need to specify a pigment
    for each object you declare

59
Texture finish
  • The finish command specifies the objects material
    properties such as shininess/gloss (more on this
    next week)
  • texture
  • pigment
  • Red
  • finish
  • reflection 0.5
  • brilliance
Write a Comment
User Comments (0)
About PowerShow.com