eel 5771-001 introduction to computer graphics ppt10: radiosity, surface detail and textures soumith...
TRANSCRIPT
EEL 5771-001Introduction 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
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
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
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)
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
The relationship between a single differential area’s radiosity and the radiosities of the rest of the environment:
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:
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:
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:
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
The quantity can also be computed by the fraction of the base of the hemisphere covered by the projection:
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
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
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
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
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
Overall Process of Radiosity
Pros and Cons
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
Environmental mapping is cheap attempt at modeling reflections. It makes surfaces look metallic
Environmental mapping on a sphere
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
An example of Cubic Mapping
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
An example of Sphere Mapping
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
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
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
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
Example:
Suppose we have a 2D image..
and a 3D box
we can paint the image on a face of the box
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
An example of Texture Mapping
How do we anti-alias textures?
Applications of Texture Mapping
Modulation Textures Illumination Mapping Bump Mapping Environmental Mapping Image based rendering Non-photorealistic rendering
Example: Combining texture maps
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
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:
References
https://en.wikipedia.org/wiki/Rotoscoping
http://www.graphicon.ru/oldgr/library/siggraph/99/papers/shum/shum.pdf
http://www.sciencedirect.com/science/article/pii/S0923596506000749
https://en.wikipedia.org/wiki/Radiosity_(computer_graphics)
https://www.cl.cam.ac.uk/teaching/0910/RSL/Richardt.pdf