3D –graphics and animation Shading and Surface Characteristics
Harri Airaksinen
3D –graphics and animation Shading and Surface Characteristics
Harri Airaksinen
Shading and surface normals
Shading = the moment in the rendering process when visible surfaces are assigned a shading value
Shading is depend on object surface and lights
Calculating the surface reflection is done by using surface normals
Common surface shading techniques include :
faceted
smooth
specular shading
Faceted Shading (polygonal shading, tai constant value faceted shading )
Simplest and fastest – one shading value located in the middle of the polygon, direction is surface normal. Value tells how much light is received at the center of the polygon only. (how light it is)
take into account parameters of ambient light only (some diffuse)
do not handle complex surface characteristics such as texture and transparency well or not at all
continuous shading value; blends throughout the visible polygons on the surface -> idea: to average the surface normals of adjacent polygons, creating a smooth transition of shading between polygons :
sampling the amount of light reaching the surface normals in the center of polygons
creating a vertex normal, averages the values of the surface normals of adjacent polygons
blending the intensifies of the vertex normals in a polygon
No reflective surfaces and only surfaces with a matte finish.
take into account ambient and diffuse lighting parameters, and handle some of the complex surface characteristics well.
Mirror –like shading
calculates the shading at every point on the surface of a polygon done by interpolating the vertex normals, and shading every point on the surface of the polygon by computing the relation between the angle of its normal and the angle of the incident light
can handle ambient, diffuse, and specular lighting, and detailed surface characteristics extremely well
Surface Shader
Material editor tool for simulating materials
The shaders includes:
reflectivity
color
texture
transparency
Material Editor and 3D Studio Max
Double-click Drag&Drop
Surface libraries or material databases
Differences between applications
Surface Layers
by adding layers and compounding
their effects to determine the final
look of the surface
Makes it possible to build complex
surface materials
Image mapping
2D image and mapping it on the surface of a three-dimensional object by
projecting or
wrapping
Very efficiently simulate not only the texture of a three-dimensional surface, but also other surface attributes such as reflectivity, transparency, and roughness
Image mapping
Images maps can modulate the surface characteristics by linking the brightness or color of a pixel in the image map to the characteristics of the point in the surface where that pixel is mapped -> the brightness of a pixel in an image map can control the reflectivity of the point on the surface where the pixel is mapped, or its color, or its transparency.
Creating the Map
2D -images that can be mapped onto 3D -surfaces:
painted images
photographic images
abstract patterns (rule-based)
Input devices:
recording a live image with a digital camera
scanning an existing photograph
painting with a flatbed
laser digital scanner
image libraries (software vendors, net …)
Own image maps and 3D Studio Max
Double_click Drag & Drop
Projection Methods
How the picture/
pattern is projected
over the 3D object? Modifier
UV-mapping
Projection Methods
Most useful projection methods include:
The flat projection method (planar) applies maps onto surfaces in a flat way - identical results as long as the three-dimensional surface is parallel to the projection plane
The cubical projection method (box) is a variation of the flat projection method that repeats the map on each of the six sides of a cube - effective with cubes but only as long as one of the planes of the cube is parallel to the projection plane
The cylindrical projection method applies maps onto surfaces by wrapping the sides of the map around the shape until the two ends of the map meet behind the object – bottom & top problem
The spherical projection applies a rectangular map by wrapping it around a surface until the opposite sides meet, and then pinching it at the top and bottom and stretching it until the entire object is covered
Projection Methods- wrapping -
Textures to be projected onto 3D objects in a straight way, but also be stretched until the four sides of the map are pressed against each other
Positioning the Map- local coordination -
Not use XY –coordination, but surface local coordination system, U, V, W
U = horizontal, V = Vertical
Offset control how the picture is
located on the surface, example.
0.5. and 0.5 locate the picture in half way
in both directionn
Positioning the Map
Map Blending =
mixing images Using tiling: 3 times U- and V- axels. Tiling
Image map as a mask- Blending with matting techniques -
Using ALPHA –image to mask holes to object surface
Alpha –channel use:
a CREYSCALE image file a that is linked to an image map
saved with an image file in the form of a fourth channel in a RGB image
determine degree of blending of the image map with a surface based on
the intensity of brightness values of the pixels file used=alpha channels
Surface Reflectivity
The basic three types of surface reflectivity are:
ambient
diffuse
specular
Surface reflectivity types:
Matte surfaces can be simulated by using a combination of ambient and diffuse reflections.
Metallic surfaces can be simulated with ambient and specular reflections.
Plastic surfaces are typically simulated with a combination of ambient, diffuse, and specular reflections
Comments