eel 5771-001 introduction to computer graphics ppt10: radiosity, surface detail and textures soumith...

56
EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Upload: clinton-atkinson

Post on 18-Jan-2016

245 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

EEL 5771-001Introduction to Computer Graphics

PPT10: Radiosity, Surface detail and Textures

Soumith Boggarapu

U48582155

Page 2: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Contents

Radiosity Environmental Mapping Surface Detail Texture Mapping Bump Mapping Frame Mapping Non-Photorealistic Rendering

Page 3: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Radiosity Radiosity is a method of rendering based on an detailed analysis of

light reflections off diffuse surfaces. The images that result from a radiosity renderer are characterized by soft gradual shadows

Radiosity computes the intensity reflected from each small surface region ( differential area ) equally in all directions (including the eye). This intensity includes energy emitted by the surface itself and reflected energy from other objects

Page 4: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Radiant intensity is the radiant flux emitted, reflected, transmitted or received, per unit solid angle

Radiant flux or Radiant power is the radiant energy emitted, reflected, transmitted or received, per unit time

As in thermal heat transfer, the basic radiosity method for computer image generation makes the assumption that surfaces are diffuse emitters and reflectors of energy, emitting and reflecting energy uniformly over their entire area

It also assumes that an equilibrium solution can be reached; that all of the energy in an environment is accounted for, through absorption and reflection

Page 5: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Basic Definitions

Radiosity: (B) Energy per unit area per unit time Emission: (E) Energy per unit area per unit time that the surface

emits itself (e. g., light source) Reflectivity: (r) The fraction of light which is reflected from a

surface. (0 <= r <=1) Form- Factor: (F) The fraction of the light leaving one surface which

arrives to another. (0<=F<=1)

Page 6: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Radiosity Equation

The "radiosity equation" describes the amount of energy which can be emitted from a surface, as the sum of the energy inherent in the surface (a light source, for example) and the energy which strikes the surface, being emitted from some other surface

The energy which leaves a surface (surface "j") and strikes another surface (surface "i") is attenuated by two factors: The "form factor" between surfaces "i" and "j", which accounts for the

physical relationship between the two surfaces The reflectivity of surface "i", which will absorb a certain percentage of

light energy which strikes the surface

Page 7: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

The relationship between a single differential area’s radiosity and the radiosities of the rest of the environment:

Page 8: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Discrete Radiosity Equation

We can’t operate in continuous space. We need a finite problem! We divide the surfaces into small discrete areas called patches. We

assume that radiosity and emission do no vary across the patch area

The radiosity of a patch is then:

Or, more conveniently:

Page 9: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

The Reciprocity Relationship If we had equal sized emitters and receivers, the fraction of energy

emitted by one and received by the other would be identical to the fraction of energy going the other way

Thus, the formfactors from Ai to Aj and from Aj to Ai are related by the ratios of their areas:

Hence:

The radiosity equation is now:

Page 10: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

The Formfactor The Formfactor is defined as the fraction of energy leaving one

surface that reaches another surface The Formfactor is purely a function of geometric relationship

between patches and thus does not depend on viewer position or surface reflectivity attributes

Between differential areas:

Page 11: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Nusselt’s Analog Differentiation of the basic form factor equation is difficult even for

simple surfaces. Nusselt developed a geometric analog which allows the simple and accurate calculation of the form factor between a surface and a point on a second surface

The "Nusselt analog" involves placing a hemispherical projection body, with unit radius, at a point on a surface. The second surface is spherically projected onto the projection body, then cylindrically projected onto the base of the hemisphere

The form factor is, then, the area projected on the base of the hemisphere divided by the area of the base of the hemisphere

Page 12: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

The quantity can also be computed by the fraction of the base of the hemisphere covered by the projection:

Page 13: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

The Hemi Cube The "hemicube" form factor calculation method involves placing

the center of a cube at a point on a surface, and using the upper half of the cube as a projection body as defined by the "Nusselt analog”

Any surface can be used to project the patches onto, without changing the Formfactor

Page 14: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

This illustration demonstrates the calculation of form factors between a particular surface on the wall of a room and several surfaces of objects in the room

For greater accuracy, a large surface would typically be broken into a set of small surfaces before any form factor calculation is performed

Hemicube Example

Page 15: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Problems with Hemicube

Because we compute only the inner integral serious inaccuracies can occur if the size of the patch is large relative to the distance

Because the hemisphere is divided into discrete solid angles, a number of aliasing problems may occur

Page 16: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Progressive Radiosity The "progressive" radiosity solution is an incremental method,

yielding intermediate results at much lower computation and storage costs

Each iteration of the algorithm requires the calculation of form factors between a point on a single surface and all other surfaces, rather than all N-squared form factors

Page 17: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

This slide illustrates the iterative nature of the progressive method. The composite image shows that as the number of iterations increase, the accuracy of the intensity solution (and, hence, the resulting image) also increases

Of particular interest is the contribution of the color of the walls of the room to the overall color of the room in the right-most section of the composite image

Page 18: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Overall Process of Radiosity

Page 19: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Pros and Cons

Page 20: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Environmental Mapping

In computer graphics, environment mapping, or reflection mapping, is an efficient image-based lighting technique for approximating the appearance of a reflective surface by means of a precomputed texture image

The texture is used to store the image of the distant environment surrounding the rendered object

The reflection mapping approach is more efficient than the classical ray tracing approach of computing the exact reflection by tracing a ray and following its optical path

Page 21: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Environmental mapping is cheap attempt at modeling reflections. It makes surfaces look metallic

Environmental mapping on a sphere

Page 22: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Types of Environment mapsCubic Mapping: Cube Mapping is a method of environment mapping that uses the six faces of a cube as the map shape The map resides on the surfaces of a cube around the object

• Typically, align the faces of the cube with the coordinate axes To generate the map:

• For each face of the cube, render the world from the center of the object with the cube face as the image plane

• Rendering can be arbitrarily complex (it’s off-line) To use the map:

• Index the R ray into the correct cube face

• Compute texture coordinates

Page 23: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

An example of Cubic Mapping

Page 24: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Sphere Mapping: Sphere mapping or spherical environment mapping is a type of reflection mapping that approximates reflective surfaces by considering the environment to be an infinitely far-away spherical wall The map lives on a sphere To generate the map:

• Render a spherical panorama from the designed center point To use the map:

• Use the orientation of the R ray to index directly into the sphere

Page 25: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

An example of Sphere Mapping

Page 26: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Surface Detail

Quantitative characterization of surface appearance is an important but difficult task

Surfaces of real world objects are detailed landscapes, with complex geometry and local optical properties

Surface appearance is strongly affected by the direction from which it is viewed and illuminated

For recognition, the overall structure of the object is important, but fine-scale details can assist the recognition problem greatly

We develop models of surface texture and demonstrate their use in recognition tasks. We also describe a texture camera for capturing fine-scale surface details

Page 27: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Surface Detail Applications Incorporate details in the scene Modeling with polygons is impractical Map an image (texture/pattern) on the surface(Catmull, 1974); Texture map Models patterns, rough surfaces, 3D effects Solid textures and Bump mapping Displace normal to create shading effects Environment mapping Reactions of environment on shiny surfaces Displacement mapping Perturb the position of some pixels

Page 28: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Adding Realism

Objects rendered using Phong reflection model and Gouraud or Phong interpolated shading often appear rather ‘plastic’ and ‘floating in air’

Addition of shadows helps to plant the objects on a ground surface In this presentation we look at how texture effects can be added to

give more realistic looking surface appearance

Page 29: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Adding Surface Detail

The most obvious solution is not the best Breaking the scene into smaller and smaller polygonal objects

increases the detail But it is very hard to model and very time-consuming to render Preferred solution is texture mapping Typically a 2D image ‘painted’ onto objects

Page 30: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Example:

Suppose we have a 2D image..

and a 3D box

we can paint the image on a face of the box

Page 31: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Texture Mapping

Texture Mapping is the application of a specific pattern to a smooth surface such that the surface remains smooth even after the addition of the pattern. It is also known as patterns or color detail

Texture pattern is defined in an orthogonal co-ordinate system (u, v) in texture space. The surface is defined in a second orthogonal co-ordinate system (x, y, z) representing in parametric space

Texture mapping is the mapping of any image into multidimensional space. It is essentially done in 2 ways, namely, one part mapping and two part mapping

Page 32: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

An example of Texture Mapping

Page 33: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

How do we anti-alias textures?

Page 34: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Applications of Texture Mapping

Modulation Textures Illumination Mapping Bump Mapping Environmental Mapping Image based rendering Non-photorealistic rendering

Page 35: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Example: Combining texture maps

Page 36: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Bump Mapping Bump mapping is a technique in computer graphics for

simulating bumps and wrinkles on the surface of an object. It is the adding roughness to the surface. This is achieved by perturbing the surface normals of the object and using the perturbed normal during lighting calculations

It changes the geometry of the surface. It simulates bumps and wrinkles on the surface of an object. It results in a bumpy surface though the underlying surface does not change

Bump mapping is faster and takes up lesser resources compared to displacement mapping for the same level of detail

Page 37: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

The method of perturbing the surface normal, ultimately realises rough-textured surfaces

Perturbation can generally be described either analytically or as a lookup table. If smoother functions give more regular features, random functions give rough surface. The only caveat here is that the roughening becomes apparent only when the shading model is applied

Page 38: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

The bump mapping concept was first applied to depict the following rough textured objects using computer graphics: Surface of an orange Granite stone texture Granulated effects Outer layer of a tyre

A limitation with bump mapping is that the actual surface remains unchanged because of which the silhouettes and shadows remain unchanged, noticeable in larger displacements. This limitation can be overcome by using displacement mapping

Page 39: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Non-Photorealistic Rendering Non-photorealistic rendering (NPR) is an area of Computer

Graphics that focuses on enabling a wide variety of expressive styles for digital art

NPR is inspired by artistic styles such as painting, technical illustration and animated cartoons

Page 40: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Techniques of NPR Stipple Rendering: Stippling is the creation of a pattern simulating

varying degrees of solidity or shading by using small dots. Such a pattern may occur in nature and these effects are frequently emulated by artists

Stipple drawings are made up of points that combine to give the illusion of a “continuous tone“ model

In classical half-toning, dots are either black or white, whereas more stylized impressions can be achieved by allowing points to accept shades of grey

Page 41: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

In stippling the polygonal objects, we assume an illumination model using achromatic light and material be evaluated on a per-vertex or per fragment basis during rendering

For every fragment a grayscale shade is generated that can be accessed in the fragment shader program

3D Stipple Textures

Page 42: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Dot patterns and Hatching: In a drawing or painting, the dots are made of pigment of a single

color, applied with a pen or brush; the denser the dots, the darker the apparent shade or lighter, if the pigment is lighter than the surface. This is similar to but distinct from pointillism, which uses dots of different colors to simulate blended colors

The other common method is hatching, which uses lines instead of dots. Stippling has traditionally been favored over hatching in biological and medical illustration

Since it is less likely than hatching to interfere visually with the structures being illustrated, and also since it allows the artist to vary the density of shading more subtly to depict curved or irregular surfaces

Page 43: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Cross Hatching: Cross hatching is a fun way of adding cartoon like detail and shading

to a scene. It details a scene by adding lines right-angles to create a mesh like appearance. While most often used in hand drawings or paintings, it can be used as a computer graphics effect

For cross hatching, we'll need a 2D texture that will tell us what fragment is being rendered and a luminace value to help determine whether or not our current fragment lies on a particular line. This will also make it easy to draw more lines in areas that need more shading

Page 44: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Pen and Ink illustration: Pen-and-ink is an extremely limited medium, allowing only individual monochromatic strokes of the pen. However, beautiful pen-and-ink illustrations incorporating a wealth of textures, tones, and styles can be created

Indeed, because of their simplicity and economy, there are a lot of applications and advantages of this illustration technique

A pen and ink illustration also has an outline of boundaries or interiors. This generally depends on the viewing direction and angle. Outlines are accented in order to facilitate shadowing and relief of a particular non photorealistic image depiction in pen and ink

Page 45: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

In order to render parametric surfaces, one needs to place strokes in the isoparameter lines, choose density for the desired tone and adjust the stroke width

An illustration of Pen and Ink technique

Page 46: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Blueprint rendering technique: It extends the edge enhancement technique occluded parts to accentuate the hidden edges also. Therefore, vivid and expressive depictions of complex objects are possible with visual perception of spatial relationship

Sketchy drawing rendering technique: This allows for us to depict vagueness and essential for communicating ideas and presenting a primary incomplete state

Page 47: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Rendering Mosaics: Image-based modeling and rendering techniques have recently received much attention as a powerful alternative to traditional geometry-based techniques for image synthesis. Instead of geometric primitives, a collection of sample images are used to render novel views

Mosaic is the art of creating images with an assemblage of small pieces of colored glass, stone, or other materials. It is a technique of decorative art or interior decoration. Most mosaics are made of small, flat, roughly-square, pieces of stone or glass of different colors, known as tessera

A novel 3D plenoptic function, which we call concentric mosaics are used, in which they constrain camera motion to planar concentric circles, and create concentric mosaics by composing slit images taken at different locations along each circle

Page 48: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Concentric mosaics are a set of manifold mosaics constructed from slit images taken by cameras rotating on concentric circles. Unlike conventional panoramas, a manifold mosaic is composed of images taken by a camera at different viewpoints (or by a set of cameras)

An experimental setup of concentric mosaics

Page 49: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Given a collection of concentric mosaics, we can render any novel ray in the capture plane since concentric mosaics have captured most rays in the plane

The rendering process below, the ray PVj is not captured at the novel view point P, but at a different point Vj that is located on the concentric mosaic CMi. Because the circular region is a free space, the ray captured on the plane at P is the same as that obtained at Vj. Similarly for another concentric mosaic

Page 50: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Three examples of concentric mosaics

Rendering with concentric mosaic The rendering is therefore very efficient because the concentric

mosaics are indexed properly for efficient retrieval of each line

Page 51: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Rotoscoping

Rotoscoping is an animation technique in which animators trace over footage, frame by frame, for use in live-action and animated films

Originally, recorded live-action film images were projected onto a frosted glass panel and re-drawn by an animator. This projection equipment is called a rotoscope

Although this device was eventually replaced by computers, the process is still referred to as rotoscoping

Page 52: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Rotoscope output can have slight deviations from the true line that differs from frame to frame, which when animated cause the animated line to shake unnaturally, or "boil“

Rotoscoping (often abbreviated as "roto") has often been used as a tool for visual effects in live-action movies

Rotoscoping has also been used to allow a special visual effect (such as a glow, for example) to be guided by the matte or rotoscoped line

Page 53: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Applications of NPR Smart Depiction Systems: These systems automatically generates

compelling images of a 3D scene’s related dynamics following the traditional design principles found in comic books and storyboards

Example:

Page 54: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155

Technical Illustration: This is broadly characterized into matte shading, edge lines etc. They do not represent the realities as such. There is a level of abstraction where intricate details are abstracted and accented for 3D properties and unwanted details are eliminated

Example:

Page 56: EEL 5771-001 Introduction to Computer Graphics PPT10: Radiosity, Surface detail and Textures Soumith Boggarapu U48582155