Rendering and Radiosity Introduction to Design Media Lecture 4 John Lee
Overview Rendering is the process that creates an image from a model How is it done? How has it been developed? What are the issues that control success and the quality of the outcome? Is it similar in systems other than Blender?
The rendering pipeline Focus here on the "scan conversion" stage: painting pixels on the screen
Some history Many rendering techniques are historically very recent There's a very good overview at http://www.cs.wpi.edu/~matt/courses/cs563/talks/history.html Roots planted in 1970s, but much development during 1980s Extreme demands on computational resources Importance of specialised hardware (frame buffers etc., e.g. Silicon Graphics) Systems often available only to researchers or highbudget film-makers Now we can do these things on the desktop; but we are working at the edge of what's possible
Techniques Range of options reflected in various places in different systems: 1. Wire frame 2. Hidden line 3. Flat shading 4. Smooth shading 5. Hardware render 6. Radiosity 7. mental ray, YafRay and other renderers we'll look at these in turn
Wire frame Presentation of vectors in 3-space Relates to boundary representation of 3D model (Contrast with e.g. constructive solid geometry)
Hidden line Especially critical in older vector-based CAD systems Computationally quite expensive for complex models Available in Maya using Vector render
Flat shading Quite sophisticated; geometrically advanced Includes many shading features, including lighting, but only plain colour surfaces (no realisation of texture maps) Each polygon in the model shaded according to a single computation based on its surface normal
Flat shading Quite sophisticated; geometrically advanced Includes many shading features, including lighting, but only plain colour surfaces (no realisation of texture maps) Each polygon in the model shaded according to a single computation based on its surface normal
Flat shading Quite sophisticated; geometrically advanced Includes many shading features, including lighting, but only plain colour surfaces (no realisation of texture maps) Each polygon in the model shaded according to a single computation based on its surface normal
Flat shading Quite sophisticated; geometrically advanced Includes many shading features, including lighting, but only plain colour surfaces (no realisation of texture maps) Each polygon in the model shaded according to a single computation based on its surface normal Each polygon in the image of this metallic goblet has uniform shading across its surface:
Smooth (Gouraud) shading First advance on flat shading: Takes colour calculations for shared normals at vertices, then interpolates colour across polygon surfaces Good smoothing of curved surfaces Good representation of nonspecular reflection Can be quite sensitive to parameters of materials etc. Note in this image: (a) the disappearance of the edges of the polygons; (b) the uniform colour of the surface below the goblet interpolation between dark at the top and dark at the bottom makes it simply dark right across
Phong shading Interpolates normals across surfaces, then does individual colour calculations Much more accurate for specular reflection and highlights Now there is differentiated shading across the base surface, as well as better highlights inside the bowl
As material properties In Blender, Maya, etc., these shading types are often treated as attributes of surface material types, i.e: 1. Anisotropic Surfaces that have grooves etc. 2. Lambert Surfaces that reflect simply according to Lambert's Cosine Law (angle of incidence = angle of reflection) 3. Blinn Surfaces that give soft highlight reflections resembling those discussed by Blinn 4. Phong Surfaces that give bright specular reflections, as originally developed by Phong (These are only the most basic aspects of the types, which are in practice often much more complex.)
The full story More than you probably want to know about how these local illumination techniques are actually computed can be found by following appropriate links starting from here...
The full story More than you probably want to know about how these local illumination techniques are actually computed can be found by following appropriate links starting from here... But don t bother looking if this scares you:
The full story More than you probably want to know about how these local illumination techniques are actually computed can be found by following appropriate links starting from here... But don t bother looking if this scares you:
Ray-tracing Shadows and transparency are a problem for the above shading techniques, but addressed well by raytracing There s a good introductory overview here And here a java demo of the basic principle Old but good technique nowadays much optimised (at the expense of memory) A simple Form Z raytraced rendering. Note the typical hard shadows, and the curious reappearance of polygon-edge artifacts (due to the coarse modelling of this object)
Examples from Maya A couple of more elaborate Maya renders; the same can be done in Blender
Radiosity A radically new departure for rendering c. 1984 Generates special form of the model: the radiosity solution Models incident and reflected light (luminance and illuminance) very accurately Can then be used as basis for rendering using techniques above View-independent Good for dynamics in relation to a static model, e.g. disembodied flythroughs and walkarounds In this Form Z (RadioZity) image, the rendering is raytraced, based on a radiosity solution with a fairly large number of patches: the patches of the solution can be seen on the lower surface, and the top edge of the goblet. There is now much better realisation of reflected light below the goblet and on its undersurface, as well as extreme highlighting inside it.
More on radiosity Changes to model or lighting require new radiosity solution, hence bad for some aspects of games and moving machinery Below, the object rendered as glass: raytrace on left, radiosity-based raytrace on right Excellent overview material here And some nice images here (Lots of nasty maths in between ) A nice series of images effectively overviewing the material so far can be seen here which, like many of the links above, is part of the excellent SIGGRAPH computer graphics education resource available here. Details on Blender and radiosity here: http://wiki.blender.org/index.php/doc:manual/lighting/ Radiosity/Rendering
Other renderers: mental ray, YafRay, etc. Maya, e.g. doesn't use radiosity as an explicit option, but it's included as a stage of mental ray rendering mental ray is a generic, proprietary, high-end rendering system now included in a number of other products, e.g. SoftImage, 3dS Max, etc. (http://www.mentalimages.com/) Blender can use this, but is integrated with Yafray: http://wiki.blender.org/index.php/doc:manual/ Render/YafRay Based on techniques for global illumination (an elaboration of radiosity) Huge number of complicated parameters experimentation is the only realistic approach!
Surface effects Much of the power of modelling systems comes from surface treatments, such as texture and bump mapping (originally invented by Blinn: here is a classic paper in which Blinn introduces surface texture mapping and environment mapping) Allows simulation of 3D effects with no additional 3D modelling Especially useful when "surface" styles can include transparency On the left, a solid grid casting shadow on a surface; on the right a flat surface with a transparency-mapped image of a similar grid (so there are only two objects in this model):
Caustics Maya with mental ray can render accurate caustics: Caustics are formed when light reflected from or transmitted through a specular surface strikes a diffuse surface. An example is the caustic formed as light shines through a glass of wine onto a table. (As recently as the late 1990s, caustics were seen as a rather obscure research topic ) Right, examples similar to those shown rendered with Maya Software above, this time with mental ray: preview caustics and production caustics.
Caustics don t always work! Full physical realism is hard to achieve: in these examples, the light energy is unfortunately too low:
but if you get it right they do Caustics allow proper rendering of the effects of glass in lenses, etc.: here the same scene is rendered, first using a simple render, then mental ray with production caustics The same sorts of effects can be achieved with YafRay: http://blenderartists.org/forum/showthread?t=29453
Almost finally Rendering, of course, need not be of models of physical objects. Abstract objects can produce great results... http://www.sciencemag.org/cgi/content/short/313/5794/1729
Compromise! Computer graphics is the art of compromise and trade-off, to achieve the most desirable effect within the limitations of available resources (time and memory) especially when doing animation Remember that the most expensive high-end techniques don't always produce the most attractive results Remember to be sophisticated about the use of textures and the minimisation of modelling Blender is, of course, just one of many modelling and rendering systems that are out there. See, for example, some comparisons here, and the Evermotion site... (Remember that it's also possible to take Blender models and render them in other systems, e.g. Pixar Renderman)