4.1 3D computer graphics - PowerPoint PPT Presentation

1 / 38
About This Presentation
Title:

4.1 3D computer graphics

Description:

??????????????????????? ???????? 3D. computer graphics ?????????????????? ... Cel-shading is often used to mimic the style of a comic book or cartoon. ... – PowerPoint PPT presentation

Number of Views:354
Avg rating:3.0/5.0
Slides: 39
Provided by: Same9
Category:

less

Transcript and Presenter's Notes

Title: 4.1 3D computer graphics


1
Chapter 4 3D Graphics
4.1 3D computer graphics
???????????????????????????????????
??????????????????????? ???????? 3D computer
graphics ?????????????????? ??????????????????????
?????????????? ? ????????????????????????????????
???? ???????
2
3D computer graphics are different from
2D computer graphics in that a three-dimensional
representation of geometric data is stored in
the computer for the purposes of performing
calculations and rendering 2D images. Sometimes
these images are later displayed in a
pre-rendered form, and sometimes they are
rendered in real-time. However, 3D computer
graphics rely on many of the same algorithms
as 2D computer graphics.
3
4.2 Creation of 3D computer graphics The
process of creating 3D computer graphics can be
sequentially divided into three basic phases
- Content creation (3D modeling,
texturing, animation) - Scene layout setup
- Rendering
4
  • Content creation (modeling)
  • The modeling stage could be described as
    shaping individual objects that are later used in
    the scene. There exist a number of modeling
    techniques, including, but not limited to the
    following
  • constructive solid geometry
  • polygonal modeling
  • subdivision surfaces
  • implicit surfaces

5
Constructive Solid Geometry(CSG) is a
technique used in solid modeling. CSG is often,
but not always, a procedural modeling technique
used in 3D computer graphics and CAD.
Constructive solid geometry allows a modeler to
create a complex surface or object by
using Boolean operators to combine objects.
6
The simplest solid objects used for the
representation are called primitives. Typically
they are the objects of simple shape cuboids,
cylinders, prisms, pyramids, spheres, cones. The
set of allowable primitives is limited by each
software package.
7
Operations In modeling packages, basic
geometric objects such as the cube or 'box',
sphere or ellipse, and a number of other shapes
that can be described using a mathematical
formula, are commonly known as primitives.
These objects can typically be described
by a procedure which accepts some number of
parameters for example, a sphere may be
described by the coordinates of its center
point, along with a radius value.
8
These primitives can be combined into
compound objects using operations like
these Operations in constructive solid geometry
Boolean union The merger of two
objects into one.
9
Boolean difference The subtraction of
one object from another.
10
Boolean intersection The portion common
to both objects.
11
Applications of CSG
12
Polygonal modeling is an approach for
modeling objects by representing or approximating
their surfaces using polygons. Polygonal modeling
is well suited to scanline rendering and is
therefore the method of choice for real-time
computer graphics
13
The basic object used in mesh modeling is a
vertex, a point in three dimensional space. Two
vertices connected by a straight line become an
edge. Three vertices, connected to the each other
by three edges, define a triangle, which is the
simplest polygon in Euclidean space. More complex
polygons can be created out of multiple
triangles, or as a single object with more than 3
vertices.
14
Four sided polygons (generally referred to
as quads) and triangles are the most common
shapes used in polygonal modeling. A group of
polygons, connected to each other by shared
vertices, is generally referred to as an element.
Each of the polygons making up an element is
called a face.
15
(No Transcript)
16
One of the more popular methods of
constructing meshes is box modeling, which uses
two simple tools The subdivide tool
splits faces and edges into smaller pieces by
adding new vertices. For example, a square would
be subdivided by adding one vertex in the center
and one on each edge, creating four smaller
squares.
17
The extrude tool is applied to a face or a
group of faces. It creates a new face of the same
size and shape which is connected to each of the
existing edges by a face. Thus, performing the
extrude operation on a square face would create a
cube connected to the surface at the location of
the face.
18
A subdivision surface, in the field of 3D
computer graphics, is a method of representing a
smooth surface via the specification of a coarser
piecewise linear polygon mesh. The smooth surface
can be calculated from the coarse mesh as the
limit of an iterative process of subdividing each
polygonal face into smaller faces that better
approximate the smooth surface.
19
A subdivision surface
20
An implicit surface, In mathematics and
computer graphics, an implicit surface is defined
as an isosurfacea level setof a function
f R3 ? R In other words, it is the
set of points in the 3d-space that satisfy the
equation f(x,y,z) constant
21
Scene layout setup Scene setup involves
arranging virtual objects, lights, cameras and
other entities on a scene which will later be
used to produce a still image or an animation. If
used for animation, this phase usually makes use
of a technique called "keyframing", which
facilitates creation of complicated movement in
the scene.
22
With the aid of keyframing, instead of
having to fix an object's position, rotation,
or scaling for each frame in an animation, one
needs only to set up some key frames between
which states in every frame are interpolated.
Lighting is an important aspect of scene
setup. As is the case in real-world scene
arrangement, lighting is a significant
contributing factor to the resulting aesthetic
and visual quality of the finished work.
23
Rendering Rendering is the final process of
creating the actual 2D image or animation from
the prepared scene. This can be compared to
taking a photo or filming the scene after the
setup is finished in real life. Rendering for
interactive media, such as games and simulations,
is calculated and displayed in real time, at
rates of approximately 20 to 120 frames per
second. Animations for non-interactive media,
such as video and film, are rendered much more
slowly.
24
Non-real time rendering enables the
leveraging of limited processing power in order
to obtain higher image quality. Several
different, and often specialized, rendering
methods have been developed. These range from
the distinctly non-realistic wireframe rendering
through polygon-based rendering, to more
advanced techniques such as scanline rendering,
ray tracing, or radiosity. In general, different
methods are better suited for either
photo-realistic rendering, or real-time
rendering.
25
A rendered image can be understood in
terms of a number of visible features. Some
relate directly to particular algorithms and
techniques, while others are produced together.
shading how the color and brightness of
a surface varies with lighting
texture-mapping a method of applying
detail to surfaces bump-mapping a method of
simulating small-scale bumpiness on
surfaces reflection mirror-like or highly
glossy reflection
26
Reflection and shading models Popular
reflection rendering techniques in 3D computer
graphics include Flat shading A technique that
shades each polygon of an object based on the
polygon's "normal" and the position and intensity
of a light source. Gouraud shading Invented by
H. Gouraud in 1971, a fast and resource-conscious
vertex shading technique used to simulate
smoothly shaded surfaces.
27
Texture mapping A technique for simulating a
large amount of surface detail by mapping images
(textures) onto polygons. Phong shading
Invented by Bui Tuong Phong, used to simulate
specular highlights and smooth shaded surfaces.
Bump mapping Invented by Jim Blinn, a
normal-perturbation technique used to simulate
wrinkled surfaces. Cel shading A technique
used to imitate the look of hand-drawn animation.
28
Flat shading Flat shading is lighting
technique used in 3D computer graphics. It shades
each polygon of an object based on the angle
between the polygon's surface normal and the
direction of the light source, their respective
colors and the intensity of the light source. It
is usually used for high speed rendering where
more advanced shading techniques are too
computationally expensive.
29
The disadvantage of flat shading is that
it gives low-polygon models a faceted look.
Sometimes this look can be advantageous though,
such as in modeling boxy objects. Artists
sometimes use flat shading to look at the
polygons of a solid model they are creating. More
advanced and realistic lighting and shading
techniques include Gouraud shading and Phong
shading.
30
Gouraud shading is a method used in
computer graphics to simulate the differing
effects of light and color across the surface of
an object. In practice, Gouraud shading is used
to achieve smooth lighting on low-polygon
surfaces without the heavy computational
requirements of calculating lighting for each
pixel. Gouraud first published the technique in
1971. Gouraud shading is much less
processor-intensive than Phong shading, but does
not calculate all desirable lighting effects as
accurately.
31
Gouraud-shaded sphere - note the inaccuracies
towards the edges of the polygons.
32
Texture mapping is a method, invented by
Ed Catmull, of adding detail, surface texture, or
colour to a computer-generated graphic or 3D
model. A texture map is applied (mapped) to the
surface of a shape. This process is akin to
applying gift wrapping paper to a plain white
box.
33
In the right example, a texture map of the
Earth's coloration is applied to a sphere to
create the illusion of color detail that would
take very many additional polygons to realise
otherwise. This kind of coloration is the most
common application of texture mapping.
34
Phong shading is an interpolation method
in 3D computer graphics, using interpolation of
surface normals in rasterizing polygons, to get
better resolution of specular reflections such as
those generated by the Phong reflection model.
Phong shading is also commonly used to refer
to the reflection model or to the combination of
the reflection model and the interpolation
method. Phong shading provides a better
approximation to a point-by-point application of
an underlying reflection model by assuming a
smoothly varying surface normal vector.
35
Bump mapping is a computer graphics
technique where at each pixel, a perturbation to
the surface normal of the object being rendered
is looked up in a heightmap and applied before
the illumination calculation is done (see, for
instance, Phong shading). The result is a richer,
more detailed surface representation that more
closely resembles the details inherent in the
natural world. Normal mapping is the most
commonly used bump mapping technique, but there
are other alternatives, such as Parallax mapping.
36
A sphere without bump mapping.
The bump map that is applied to the image below.
This sphere is geometrically the same as the
first, but has a bump map applied. This changes
how it reacts to shading, giving it the
appearance of a bumpy texture resembling that of
an orange.
37
Cel shading animation also called
"cel-shading" or "toon shading" is a type of
non-photorealistic rendering designed to make
computer graphics appear to be hand-drawn.
Cel-shading is often used to mimic the style of a
comic book or cartoon. It is a somewhat recent
addition to computer graphics, most commonly
turning up in console video games. Though the end
result of cel-shading has a very simplistic feel
like that of hand-drawn animation, the process is
complex. The name comes from the clear sheets of
acetate, called cels, that are painted on for use
in traditional 2D animation.
38
Object with a basic cel-shader (AKA "toon
shader") and border detection.
Write a Comment
User Comments (0)
About PowerShow.com