34
3D GRAPHICS BASICS

3 d graphics basics

Embed Size (px)

DESCRIPTION

3D graphics

Citation preview

Page 1: 3 d graphics basics

3D GRAPHICS BASICS

Page 2: 3 d graphics basics

3D view

Human eyes see object defiantly

Page 3: 3 d graphics basics

3D shadow

3D projection is in 2 D

Page 4: 3 d graphics basics

Coordinate system

Are the measured frame of reference within which geometry is defined, manipulated and viewed

In this system, a point serves as the origin, and three lines (axes) that pass through this point and are orthogonal to each other (at right angles 90 degrees)

Page 5: 3 d graphics basics

Types

1D coordinate system 2D coordinate system 3D coordinate system

Page 6: 3 d graphics basics

1D coordinate system

Direction and magnitude along a single axis, with reference to origin

Location are defined by a single coordinate

Page 7: 3 d graphics basics

We can define points, segments, lines rays

Can have multiple origins (frame of reference) and transform coordinates among them

Page 8: 3 d graphics basics
Page 9: 3 d graphics basics

2D coordinate system

Direction and magnitude along two axes, with reference to an origin

Location are defined by x, y coordinate

Page 10: 3 d graphics basics

We can define points, segments, lines rays, curves, polygons (any other planar geometry)

Can have multiple origins (frame of reference) and transform coordinates among them

Page 11: 3 d graphics basics
Page 12: 3 d graphics basics

3D coordinate system

3D Cartesian coordinate system Direction and magnitude along three

axes, with reference to an origin Location are defined by x, y, z coordinate

Page 13: 3 d graphics basics

We can define points, segments, lines rays, curves, polygons (any other planar geometry) and cubes, cones, spheres, etc. (volume in space)

Can have multiple origins (frame of reference) and transform coordinates among them

Page 14: 3 d graphics basics
Page 15: 3 d graphics basics

Rules

right hand rules etc. These rules determine orientation of axes

and direction of rotations Thumb = pos x Index up = pos y Middle out = pos z

Page 16: 3 d graphics basics

Most world and objects axes tend to be right handed

Left hand axes often are used for cmaeras

Page 17: 3 d graphics basics
Page 18: 3 d graphics basics

Rotation

Grasp axis with right hand with thumb oriented in positive direction, fingers will then curl in direction of positive rotation for that axis

Page 19: 3 d graphics basics

Right handed Cartesian coordinate system describes the relationship of the x, y, z in the following manner

X is positive to the right of the origin and negative to the left

Y is positive to the above of the origin and negative to the below

Z is positive behind the origin and negative beyond

Page 20: 3 d graphics basics

Z up typically used by designers Y up typically used by animators

Page 21: 3 d graphics basics

Application data will be transformed among the various coordinate systems depending on whats to be accomplished

Individual coordinate systems often are hierarchically linked within the scene

Page 22: 3 d graphics basics

Use OPP to make the object of the 3d points

Class 3d-class { public:

Float x; Float y; Float z;

}

Page 23: 3 d graphics basics

3D modeling

Modeling is the process of describing an object or scene so that we can construct an image of it

Angle, location, size etc.. Polygon strips or meshes

Meshes provide a more economical description than multiple individual polygons  (wireframe model

100 individual triangles, each have 3 vertices, would require 100 x3 vertex definitions

Triangle strips require n + 2 vertex definitions, n is number of triangles in strip. For 100 needs 102 unique vertex definitions

Page 24: 3 d graphics basics

Meshes also provide continuity across surfaces which is important for shading calculations

Page 25: 3 d graphics basics
Page 26: 3 d graphics basics

With cured surfaces the accuracy of the approximation is directly proportional to the number of polygons used in the representation

More polygons yield a better approximation

But more polygons also exact greater computational overhead..

Page 27: 3 d graphics basics

Rendering

The process of computing a 2d image using a combination of a 3 D database, scene characteristics and viewing transformations

Various Alog. According to the need of applications

Page 28: 3 d graphics basics

Dissolution

The subdivision of an entity or surface into one or more non-overlapping primitives

Typically, renderers decompose surfaces into triangles as part of the rendering

Page 29: 3 d graphics basics
Page 30: 3 d graphics basics
Page 31: 3 d graphics basics

Sampling

The process of selecting a representative but finite number of values along a continuous function sufficient to render a reasonable approximations of the function for the task at hand

Page 32: 3 d graphics basics

Level of detail

To improve rendering efficiency when dynamically viewing a scene, more or less detailed versions of a model may be swapped in and out of the scene database depending on the importance of the object in current view

Page 33: 3 d graphics basics

Surfce normal

A vector perpendicular to a surface and outward facing

SN are used to determine visibility and also in the calculation of shading values

Page 34: 3 d graphics basics