mental ray - architectural shaders

Size: px
Start display at page:

Download "mental ray - architectural shaders"

Transcription

1 mental ray - architectural shaders Document version Sept 11, 2006

2 Copyright Information Copyright c mental images GmbH, Berlin, Germany. All rights reserved. This document is protected under copyright law. The contents of this document may not be translated, copied or duplicated in any form, in whole or in part, without the express written permission of mental images GmbH. The information contained in this document is subject to change without notice. mental images GmbH and its employees shall not be responsible for incidental or consequential damages resulting from the use of this material or liable for technical or editorial omissions made herein. mental images R, incremental images TM, mental ray R, mental matter R, mental ray Phenomenon R, mental ray Phenomena TM, Phenomenon TM, Phenomena TM, Phenomenon Creator TM, Phenomenon Editor TM, Photon Map TM, mental ray Relay TM Library, Relay TM Library, SPM R, Shape-by-Shading TM, Internet Rendering Platform TM, irp TM, Reality R, Reality Server R, Reality Player TM, Reality Designer TM, iray R, imatter R, and neuray TM are trademarks or, in some countries, registered trademarks of mental images GmbH, Berlin, Germany. All other product names mentioned in this document may be trademarks or registered trademarks of their respective companies and are hereby acknowledged.

3 Table of Contents 1 Architectural shader library - introduction About the library mia material - material for architectural and design visualisation Introduction What is the mia material? Structure of this Document Fundamentals Physics and the Display A Note on Gamma Tone Mapping Use Final Gathering and Global Illumination Use Physically Correct Lights Features The Shading Model Conservation of Energy BRDF - how Reflectivity Depends on Angle Reflectivity Features Transparency Features Solid vs. Thin-Walled Cutout Opacity Special Effects Built in Ambient Occlusion Performance Features Material Parameters Diffuse Reflections Basic Features Performance Features Refractions Translucency Anisotropy BRDF Special Effects Built in Ambient Occlusion Advanced Rendering Options Reflection Optimization Settings

4 vi Table of Contents Refraction Optimization Settings Options Interpolation Special Maps Tips and Tricks Final Gathering Performance Quick Guide to some Common Materials General Rules of Thumb for Glossy Wood, Flooring, etc Ceramics Stone Materials Glass Colored Glass Water and Liquids The Ocean and Water Surfaces Metals Brushed Metals Sun and Sky Introduction Units Important note on fast SSS and Sun&Sky Common parameters Sun parameters Sky parameters Utility shaders Round corners Tone mapping / Exposure Advanced topics mia material API Obtaining sub-components of the rendering Defining characteristics of light sources mia material api.h Sample shader source

5 Chapter 1 Architectural shader library - introduction 1.1 About the library The mental ray architectural library contains a set of shaders designed for architectural and design visualization. The most important are the mia material, an easy to use all-around material, and the Physical Sun and Sky shaders, but the library also contains minor tools like shaders to create render-time rounded corners, and more. In standalone mental ray the shaders are added by including the mi declaration file and linking to the library; link "architectural.dll" include "architectural.mi" The library strictly requires mental ray version 3.5 or newer and will not function on earlier releases of mental ray.

6

7 Chapter 2 mia material - material for architectural and design visualisation 2.1 Introduction What is the mia material? The mental ray mia material is a monolithic material shader that is designed to support most materials used by architectural and product design renderings. It supports most hardsurface materials such as metal, wood and glass. It is especially tuned for fast glossy reflections and refractions (replacing the DGS material) and high-quality glass (replacing the dielectric material). The major features are: Easy to use - yet flexible. Controls arranged logically in a most used first fashion. Templates - for getting faster to reality. Physically accurate - the material is energy conserving, making shaders that breaks the laws of physics impossible. Glossy performance - advanced performance boosts including interpolation, emulated glossiness, and importance sampling. Tweakable BRDF 1 - user can define how reflectivity depends on angle. Transparency - Solid or thin materials - transparent objects such as glass can be treated as either solid (refracting, built out of multiple faces) or thin (nonrefracting, can use single faces). 1 Bidirectional Reflectance Distribution Function

8 4 2 mia material - material for architectural and design visualisation Round corners - shader can simulate fillets to allow sharp edges to still catch the light in a realistic fashion. Indirect Illumination control - set the final gather accuracy or indirect illumination level on a per-material basis. Oren-Nayar diffuse - allows powdery surfaces such as clay. Built in Ambient Occlusion - for contact shadows and enhancing small details. All-in-one shader - photon and shadow shader built in. Waxed floors, frosted glass and brushed metals all fast and easy to set up Structure of this Document This document is divided into sections of Fundamentals (beginning on page 4) which explain the main features of the material, the Parameters section (page 15) that goes through all the parameters one by one, and a Tips & Tricks (page 36) with some advice for users. 2.2 Fundamentals Physics and the Display The mia material primarily attempts to be physically accurate hence it has an output with a high dynamic range. How visually pleasing the material looks depends on how the mapping of colors inside the renderer to colors displayed on the screen is done. When working with the mia material it is highly encouraged to make sure one is operating through a tone mapper/exposure control or at the very least are using gamma correction A Note on Gamma Describing all the details about gamma correction is beyond the scope of this document and this is just a brief overview. The color space of a normal off-the-shelf computer screen is not linear. The color with RGB value is not twice as bright as a color with RGB value as one would expect. This is not a bug because due to the fact that our eyes see light in a non linear way, the former color is actually perceived to be about twice as bright as the latter. This makes the color space of a normal computer screen roughly perceptually uniform. This is a good thing,

9 2.2 Fundamentals 5 and is actually the main reason 24 bit color (with only 8 bits discrete levels - for each of the red, green and blue components) looks as good as it does to our eyes. The problem is that physically correct computer graphics operate in a true linear color space where a value represents actual light energy. If one simply maps the range of colors output to the renderer naively to the range of each RGB color component it is incorrect. The solution is to introduce a mapping of some sort. One of these methods is called gamma correction. Most computer screens have a gamma of about 2.2 2, but most software default to a gamma of 1.0, which makes everything (especially midtones) look too dark, and light will not add up correctly. Using gamma of 2.2 is the theoretically correct value, making the physically linear light inside the renderer appear in a correct linear manner on screen. However, since the response of photographic film isn t linear either, users have found this theoretically correct value looks too bright and washed out, and a very common compromise is to render to a gamma of 1.8, making things look more photographic, i.e. as if the image had been shot on photographic film and then developed Tone Mapping Another method to map the physical energies inside the renderer to visually pleasing pixel values is known as tone mapping. This can be done either by rendering to a floating point file format and using external software, or use some plugin to the renderer to do it on-the-fly. A very simple tone mapping shader is included in the library named mia exposure simple and is documented on page Use Final Gathering and Global Illumination The material is designed to be used in a realistic lighting environment, i.e. using full direct and indirect illumination. In mental ray there are two basic methods to generate indirect light: Final Gathering and Global Illumination. For best results at least one of these methods should be used. At the very least one should enable Final Gathering, or use Final Gathering combined with Global Illumination (photons) for quality results. Performance tips for using Final Gather and Global Illumination can be found on page 36 of this document. If you are using an environment for your reflections, make sure the same environment (or a blurred copy of it) is used to light the scene through Final Gathering. 2 This is also known as the srgb color space

10 6 2 mia material - material for architectural and design visualisation Use Physically Correct Lights Traditional computer graphics light sources live in a cartoon universe where the intensity of the light doesn t change with the distance. The real world doesn t agree with that simplification. Light decays when leaving a light source due to the fact that light rays diverge from their source and the density of the light rays change over distance. This decay of a point light source is 1/d 2, i.e. light intensity is proportional to the inverse of the square of the distance to the source. One of the reasons for this traditional oversimplification is actually the fact that in the early days of computer graphics tone mapping was not used and problems of colors blowing out to white in the most undesirable ways 3 was rampant. However, as long as only Final Gathering (FG) is used as indirect illumination method, such traditional simplifications still work. Even light sources with no decay still create reasonable renderings! This is because FG is only concerned with the transport of light from one surface to the next, not with the transport of light from the light source to the surface. It s when working with Global Illumination (GI) (i.e. with photons) the troubles arise. When GI is enabled, light sources shoot photons. It is imperative for the mia material (or any other mental ray material) to work properly for the energy of these photons to match the direct light cast by that same light! And since photons model light in a physical manner, decay is built in. Hence, when using GI: Light sources must be emitting photons at the correct energy The direct light must decay in a physically correct way to match the decay of the photons. Therefore it is important to make sure the light shader and the photon emission shader of the lights work well together. 2.3 Features The Shading Model From a usage perspective, the shading model consists of three components: Diffuse - diffuse channel /including Oren Nayar roughness ). 3 Raw clipping in srgb color space is very displeasing to the eye, especially if one color channel clips earlier than the others. Tone mapping generally solves this by soft clipping in a more suitable color space than srgb.

11 2.3 Features 7 Reflections - glossy anisotropic reflections (and highlights). Refractions - glossy anisotropic transparency (and translucency). The mia material shading model Direct and indirect light from the scene both cause diffuse reflections as well as translucency effects. Direct light sources also cause traditional highlights (specular highlights). Raytracing is used to create reflective and refractive effects, and advanced importance-driven multi-sampling is used to create glossy reflections and refractions. The rendering speed of the glossy reflections/refractions can further be enhanced by interpolation as well as emulated reflections with the help of Final Gathering Conservation of Energy One of the most important features of the material is that it is automatically energy conserving. This means that it makes sure that diffuse + reflection + refraction <= 1, i.e. that no energy is magically created and the incoming light energy is properly distributed to the diffuse, reflection and refraction components in a way that maintains the first law of thermodynamics 4. In practice, this means for example that when adding more reflectivity, the energy must be taken from somewhere, and hence the diffuse level and the transparency will be automatically reduced accordingly. Similarly, when adding transparency, this will happen at the cost of the diffuse level. 4 The first law of thermodynamics is that no one talks about thermodynamics ;)

12 8 2 mia material - material for architectural and design visualisation The rules are as follows: Transparency takes energy from Diffuse, i.e. diffuse at all. at 100% transparency, there will be no Reflectivity takes energy from both Diffuse and Transparency, i.e. there will be neither diffuse nor transparency. a 100% reflectivy Translucency is a type of transparency, and refr trans w defines the percentage of transparency vs. translucency. From left to right: Reflectivities 0.0, 0.4, 0.8 and 1.0 From left to right: Transparencies 0.0, 0.4, 0.8 and 1.0 It also means that the level of highlights is linked to the glossiness of a surface. A high refl gloss value causes a narrower but very intense highlight, and a lower value causes a wider but less intense highlight. This is because the energy is now spread out and dissipated over a larger solid angle BRDF - how Reflectivity Depends on Angle In the real world, the reflectivity of a surface is often view angle dependent. A fancy term for this is BRDF (Bidirectional Reflectance Distribution Function), i.e. a way to define how much a material reflects when seen from various angles.

13 2.3 Features 9 The reflectivity of the wooden floor depends on the view angle Many materials exhibit this behaviour. Glass, water and other dielectric materials with fresnel effects (where the angular dependency is guided strictly by the Index of Refraction) are the most obvious examples, but other layered materials such as lacquered wood, plastic, etc. display similar characteristics. The mia material allows this effect both to be defined by the Index of Refraction, and also allows an explicit setting for the two reflectivity values for: 0 degree faces (surfaces directly facing the camera) 90 degree faces (surfaces 90 degrees to the camera) See the BRFD section on page 24 for more details Reflectivity Features The final surface relectivity is in reality caused by the sum of three components: The Diffuse effect The actual reflections Specular highlights that simulate the reflection of light sources Diffuse, Reflections and Highlights

14 10 2 mia material - material for architectural and design visualisation In the real world highlights are just (glossy) reflections of the light sources. In computer graphics it s more efficient to treat these separately. However, to maintain physical accuracy the material automatically keeps highlight intensity, glossiness, anisotropy etc. in sync with the intensity, glossiness and anisotropy of reflections, hence there are no separate controls for these as both are driven by the reflectivity settings Transparency Features The material supports full glossy anisotropic transparency, as well as includes a translucent component, descibed more in detail on page 21. Translucency Solid vs. Thin-Walled The transparency/translucency can treat objects either as solid or thin walled. If all objects were treated as solids at all times, every single window pane in an architectural model would have to be modelled as two faces; an entry surface (that refracts the light slightly in one direction), and immediately following it an exit surface (where the light would be refracted back into the original direction). Not only is this additional modelling work, it is a waste of rendering power to model a refraction that has very little net effect on the image. Hence the material allows modelling the entire window pane as one single flat plane, foregoing any actual refraction of light.

15 2.3 Features 11 Solid vs. Thin-walled transparency and translucency In the above image the helicopter canopy, the window pane, the translucent curtain and the right sphere all use thin walled transparency or translucency, whereas the glass goblet, the plastic horse and the left sphere all use solid transparency or translucency Cutout Opacity Beyond the physical transparency (which models an actual property of the material) there is a completely separate non-physical cutout opacity channel to allow billboard objects such as trees, or to cut out things like a chainlink fence with an opacity mask Special Effects Built in Ambient Occlusion Ambient Occlusion (henceforth referred to as AO ) is a method spearheaded by the film industry to emulate the look of true global illumination by using shaders that calculate how occluded (i.e. blocked) an area is from receiving incoming light.

16 12 2 mia material - material for architectural and design visualisation Used alone, an AO shader 5 creates a grayscale output that is dark in areas to which light cannot reach and bright in areas where it can: An example of AO applied to a scene As seen in the above image, one of the main results of AO is dark in crevices and areas where light is blocked by other surfaces and it is bright in areas that are exposed to the environment. One important aspect of AO is that one can tune the distance within which it looks for occluding geometry. 5 Like the separate mental ray mib amb occlusion shader

17 2.3 Features 13 AO looked up within a shorter radius Using a radius creates only a localized AO effect; only surfaces that are within the given radius are actually considered occluders (which is also massively faster to render). The practical result is that the AO gives us nice contact shadow effects and makes small crevices visible. There are two ways to utilize the built in AO in the mia material: Traditional AO for adding an omnipresent ambient light that is then attenuated by the AO to create details. Use AO for detail enhancement together with existing indirect lighting methods (such as Final Gathering or photons). The latter method is especially interesting when using a highly smoothed indirect illumination solution (i.e. a very high photon radius, or an extremely low final gather density) which could otherwise lose small details. By applying the AO with short rays these details can be brought back.

18 14 2 mia material - material for architectural and design visualisation Performance Features Finally the mia material contains a large set of built in functions for top performance, including but not limited to: Advanced importance sampling with ray rejection thresholds Adaptive glossy sample count Interpolated glossy reflection/refraction with detail enhancements Ultra fast emulated glossy reflections (refl hl only mode) Possibility to ignore internal reflections for glass objects Allowing a choice between traditional transparent shadows (suitable for e.g. a window pane) and refractive caustics (suitable for solid glass objects) on a per material basis.

19 2.4 Material Parameters Material Parameters Diffuse diffuse weight sets the desired level (and diffuse the color) of the diffuse reflectivity. Since the material is energy conserving, the actual diffuse level used depends on the reflectivity and transparency as discussed above. The diffuse component uses the Oren-Nayar shading model. When diffuse roughness is 0.0 this is identical to classical Lambertian shading, but with higher values the surface gets a a more powdery look: Roughness 0.0 (left), 0.5 (middle) and 1.0 (right) Reflections Basic Features The reflectivity and refl color together define level of reflections as well as the intensity of the traditional highlight (also known as specular highlight ). This value is the maximum value - the actual value also depends on the angle of the surface and come from the BRDF curve. This curve (described in more detail on page 24) allows one to define a brdf 0 degree refl (for surfaces facing the view) and brdf 90 degree refl (for surfaces perpendicular to the view).

20 16 2 mia material - material for architectural and design visualisation No reflectivity (left), angle dependent (center), constant (right) The left cup shows no reflectivity at all and a purely diffuse material. The center cup shows a brdf 0 degree refl of 0.1 and a brdf 90 degree refl of 1.0. The right cup has a both a brdf 0 degree refl and brdf 90 degree refl of 0.9, i.e. constant reflectiviy across the surface. Note how the high reflectivity automatically subtracts from the white diffuse color. If this didn t happen, the material would become unrealistically over-bright, and would break the laws of physics 6. The refl gloss parameter defines the surface glossiness, ranging from 1.0 (a perfect mirror) to 0.0 (a diffusely reflective surface): 6 See page 7

21 2.4 Material Parameters 17 Glossiness of 1.0 (left), 0.5 (center) and 0.25 (right) The refl samples parameters defines the maximum 7 number of samples (rays) are shot to create the glossy reflections. Higher values renders slower but create a smoother result. Lower values render faster but create a grainier result. Generally 32 is enough for most cases. There are two special cases: Since a refl gloss value of 1.0 equals a perfect mirror it is meaningless to shoot multiple rays for this case, hence only one reflection ray is shot. If the refl samples value is set to 0, the reflections will be perfect mirror (and only one ray shot) regardless of the actual value of refl gloss. This can be used to boost performance for surfaces with very weak reflections. The highlight still obeys the glossiness value. Metallic objects actually influence the color of their reflection whereas other materials do not. For example, a gold bar will have gold colored reflections, whereas a red glass orb does not have red reflections. This is supported through the refl is metal option. When off, the refl color parameter defines the color and reflectivity parameter (together with the BRDF settings) the intensity and colors of reflections. When on, the diffuse parameter defines the color of reflections, and reflectivity parameter sets the weight between diffuse reflections and glossy (metallic) reflections. 7 The actual number is adaptive and depends on reflectivity, ray importance, and many other factors.

22 18 2 mia material - material for architectural and design visualisation No metal reflections (left), Metal reflections (center), Metal mixed with diffuse (right) The left image shows non-metallic reflections (refl is metal is off). One can see reflections clearly contain the color of the objects they reflect and are not influenced by the color of the materials. The center image uses metallic reflections (refl is metal is on). Now the color of reflections are influenced by the color of the object. The right image shows a variant of this with the reflectivity at 0.5, creating a 50:50 mix between colored reflections and diffuse reflections Performance Features Glossy reflections need to trace multiple rays to yield a smooth result, which can become a performance issue. For this reason there are a couple of special features designed to enhance their performance. The first of those features is the interpolation. By turning refl interpolate) on, a smoothing algorithm allows rays to be re-used and smoothed 8. The result is faster and smoother glossy reflections at the expense of accuracy. Interpolation is explained in more detail on page 31. For highly reflective surfaces it is clear that true reflection rays are needed. However, for less reflective surfaces (where it is less obvious that the surface is really reflecting anything) there exists a performance-enhancing shortcut, the refl hl only switch. When refl hl only is on, no actual reflection rays are traced. Instead only the highlights are shown, as well as soft reflections emulated with the help of using Final Gathering 9. 8 The technique works best on flat surfaces 9 If Final Gathering is not enabled, this mode simply shows the highlights and attempts no emulation of reflections.

23 2.4 Material Parameters 19 The refl hl only mode takes no additional render time compared to a non-glossy (diffuse) surface, yet can yield surprisingly convincing results. While it may not be completely convincing for hero objects in a scene it can work very well for less essential scene elements. It tends to work best on materials with weak reflections or extremely glossy (blurred) reflections: The left two cups use real reflections, those on the right use refl hl only While the two cups on the left are undoubtedly more convincing than those on the right, the fact that the right hand cups have no additional render time compared to a completely nonreflective surface makes this mode very interesting. The emulated reflections still pull in a directional color bleed such that the bottom side of the cup is influenced by the color of the wooden floor just as if it was truly reflective Refractions The transparency parameter defines the level of refractions and refr color defines the color. While this color can be used to create colored glass, there is a slightly more accurate method to do this described on page 37. Due to the materials energy conserving nature (see page 7) the value set in the transparency parameter is the maximum value - the actual value depends on the reflectivity as well as the BRDF curve. The refr ior) defines the Index of Refraction, which is a measurement of how much a ray of light bends when entering a material. Which direction light bends depends on if it is entering or exiting the object. The mia material use the direction of the surface normal as the primary cue for figuring out whether it is entering or exiting. It is therefore important to model transparent refractive objects with the surface normal pointing in the proper direction. The IOR can also be used to define the BRDF curve, which is what happens in the class of transparent materials known as dielectric materials, and is illustrated here:

24 20 2 mia material - material for architectural and design visualisation Index of refraction 1.0 (left), 1.2 (center) and 1.5 (right) Note how the leftmost cup looks completely unrealistic and is almost invisible. Because an IOR of 1.0 (which equals that of air) is impossible, we get no change in reflectivity across the material and hence perceive no edges or change of any kind. Whereas the middle and rightmost cups have a realistic change in reflectivity guided by the IOR. One is however not forced to base the reflectivity on the IOR but can instead use the BRDF mode to set it manually: Different types of transparency The left cup again acquires it s curve from the index of refraction. The center cup has a manually defined curve, which has been set to a brdf 90 degree refl of 1.0 and a brdf 0 degree refl of 0.2, which looks a bit more like metallized glass. The rightmost cup uses the same BRDF curve, but instead is set to thin walled transparency (see page 10).

25 2.4 Material Parameters 21 Clearly, this method is the better way to make non-refractive objects compared to simply setting refr ior) to 1.0 as we tried above. As with reflections, the refr gloss parameter defines how sharp or blurry the refractions/transparency are, ranging from a 1.0 (a completely clear transparency) to 0.0 (an extremely diffuse transparency): A refr gloss of 1.0 (left), 0.5 (center) and 0.25 (right) Just as with the glossy reflections, the glossy transparency has a refr interpolate) switch, allowing faster, smoother, but less accurate glossy transparency. Interpolation is described on page Translucency Translucency is handled as a special case of transparency, i.e. to use translucency there must first exist some level of transparency, and the refr trans w parameter decides how much of this is used as transparency and how much is translucency:

26 22 2 mia material - material for architectural and design visualisation A transparency of 0.75 and a refr trans w of 0.0 (left), 0.5 (center) and 1.0 (right) If refr trans w is 0.0, all of the transparency is used for transaparency. If refr trans w is 0.5, half of the transparency is used for transparency and half is used for translucency. If refr trans w is 1.0, all of the transparency is used for translucency and there is no actual transparency. The translucency is primarily intended to be used in thin walled mode (as in the example above) to model things like curtains, rice paper, or such effects. In thin walled mode it simply allows the shading of the reverse side of the object to bleed through. The shader also operates in Solid mode, but the implementation of translucency in the mia material is a simplification concerned solely with the transport of light from the back of an object to it s front faces and is not true SSS (sub surface scattering). An SSS-like effect can be generated by using glossy transparency coupled with translucency but it is neither as fast nor as powerful as the dedicated SSS shaders.

27 2.4 Material Parameters 23 Solid translucency w. refr trans w of 0.0 (left), 0.5 (center) and 1.0 (right) Anisotropy Anisotropic reflections and refractions can be created using the anisotropy parameter. The parameter sets the ratio between the width and the height of the highlights, hence when anisotropy is 1.0 there is no anisotropy, i.e. the effect is disabled. For other values of anisotropy (above and below 1.0 are both valid) the shape of the highlight (as well as the appearance of reflections) change. anisotropy values of 1.0 (left), 4.0 (center) and 8.0 (right) The anisotropy can be rotated by using the anisotropy rotation parameter. The value 0.0 is unrotated, and the value 1.0 is one full revolution (i.e. 360 degrees). This is to aid using a

28 24 2 mia material - material for architectural and design visualisation texture map to steer the angle: anisotropy rotation values of 0.0 (left), 0.25 (center) and textured (right) Note: When using a textured anisotropy rotation it is important that this texture is not anti-aliased (filtered). Otherwise the anti-aliased pixels will cause local vortices in the anisotropy that appear as seam artifacts. If the anisotropy channel parameter is -1 the base rotation follows the local object coordinate system. Otherwise, the space which defines the stretch directions of the highlights are derived from the texture space set by anisotropy channel 10. See also brushed metal on page 46 in the tips section BRDF As explained in the introduction on page 8 the materials reflectivity is ultimately guided by the incident angle from which it is viewed. 10 Note that deriving the anisotropy from texture space only creates one space per triangle and may cause visible seams between triangles.

29 2.4 Material Parameters 25 0 degree (green) and 90 degree (red) view angles There are two modes to define this BRDF curve: The first mode is by IOR, i.e. when brdf fresnel is on. How the reflectivity depends on the angle is then solely guided by the materials IOR. This is known as fresnel reflections and is the behaviour of most dielectric materials such as water, glass, etc. The second mode is the manual mode, when brdf fresnel is off. In this mode the brdf 0 degree refl parameter defines the reflectivity for surfaces directly facing the viewer (or incident ray), and brdf 90 degree refl defines the reflectivity of surfaces perpendicular to the viewer. The brdf curve parameter defines the falloff of this curve. This mode is used for most hybrid materials or for metals. Most material exhibit strong reflections at grazing angles and hence the brdf 90 degree refl parameter can generally be kept at 1.0 (and using the reflectivity parameter to guide the overall reflectivity instead). Metals tend to be fairly uniformly reflective and the brdf 0 degree refl value is high (0.8 to 1.0) but many other layered materials, such as linoleum, lacquered wood, etc. has lower brdf 0 degree refl values ( ). See the tips on page 36 for some guidelines Special Effects Built in Ambient Occlusion The built in Ambient Occlusion (henceforth shortened to AO ) can be used in two ways. Either it is used to enhance details and contact shadows in indirect illumination (in which case there must first exist some form of indirect illumination in the first place), or it is used together with a specified ambient light in a more traditional manner. Hence, if neither

30 26 2 mia material - material for architectural and design visualisation indirect light exists, nor any ambient light is specified, the AO will have no effect 11. The ao samples sets the number of samples (rays) shot for creating the AO. Higher value is smoother but slower, lower values faster but grainier. 16 is the default and 64 covers most situations. The ao distance parameter defines the radius within which occluding objects are found. Smaller values restrict the AO effect only to small crevices but are much faster to render. Larger values cover larger areas but render slower. The following images illustrate the raw AO contribution with two different distances: Larger distance Smaller distance As mentioned in the introduction on page 11 the AO can be used for detail enhancement of indirect illumination. This mode is enabled by turning on ao do details switch. This mode is used to apply short distance AO multiplying it with the existing indirect illumination (Final Gathering or GI/photons), bringing out small details. Study this helicopter almost exclusively lit by indirect light: Without AO With AO 11 Sometimes people use AO as a general multiplier to all diffuse light. This has the distinct drawback of affecting even brightly directly lit areas with AO shadows, which can look wrong. This use is not covered by the built in AO shader because it is trivially acheived by simply applying the mib amb occlusion shader to the diffuse color of the material and putting the materials original color into it s Bright parameter.

31 2.4 Material Parameters 27 Note how the helicopter does not feel grounded in the left image and the shadows under the landing skids are far too vague. The right image uses AO to punch out the details and the contact shadows. The ao dark parameter sets the darkness of the AO shadows. It is used as the multiplier value for completely occluded surfaces. In practice this means: A black color will make the AO effect very dark, a middle gray color will make the effect less noticeable (brighter) etc. The ao ambient parameter is used for doing more traditional AO, i.e. supplying the imagined ever present ambient light that is then attenuated by the AO effect to create shadows. While traditional AO is generally used when rendering without other indirect light, it can also be combined with existing indirect light. One needs to keep in mind that this magical ever present ambient light is inherently non-physical, but may perhaps help lighten some troublesome dark corners Advanced Rendering Options Reflection Optimization Settings These parameters define some performance boosting options for reflections. refl falloff dist allows limiting reflections to a certain distance, which both speeds up rendering as well as avoiding pulling in distant objects into extremely glossy reflections. If refl falloff color is enabled and used, reflections will fade to this color. If it is not enabled, reflections will fade to the environment color. The former tends to be more useful for indoor scenes, the latter for outdoor scenes. Full reflections (left), fading over 100mm (center) or 25mm (right)

32 28 2 mia material - material for architectural and design visualisation Each material can locally set a maximum trace depth using the refl depth parameter. When this trace depth is reached the material will behave as if the refl hl only switch was enabled, i.e. only show highlights and emulated reflections. If refl depth is zero, the global trace depth is used. refl cutoff is a threshold at which reflections are rejected (not traced). It s a relative value, i.e. the default of 0.01 means that rays that contribute less than 1% to the final pixel are ignored Refraction Optimization Settings The optimization settings for refractions (transparency) are nearly identical to those for reflections. The exception is that of refr falloff color which behaves differently. When refr falloff dist is used, and refr falloff color is not used, transparency rays will fade to black. This is like smoked glass or highly absorbent materials. Transparency will just completely stop at a certain distance. This has the same performance advantage as using the refl falloff dist for reflections, i.e. tracing shorter rays are much faster. However, when refr falloff color is used, it works differently. The material will then make physically correct absorption. Exactly at the distance given by refr falloff dist will the refractions have the color given by refr falloff color - but the rays are not limited in reach. At twice the distance, the influence of refr falloff color is double, at half the distance half, etc. No limit (left), fade to black (center), fade to blue (right) The leftmost cup has no fading. The center cup has refr falloff color off, and hence fades to black, which also includes the same performance benefits of limiting the trace distance as when used for reflections.

33 2.4 Material Parameters 29 The rightmost cup, however, fades to a blue color. This causes proper exponential attenuation in the material, such that the thicker the material, the deeper the color. See page 37 for a discussion about realistic colored glass. Note: To render proper shadows when using refr falloff dist one must use ray traced shadows, and the shadow mode must be set to segment. See the mental ray manual on shadow modes. refl depth and refl cutoff works identical to the reflection case described above Options The options contain several on/off switches that control some of the deepest details of the material: The thin walled decides if a material causes refractions (i.e. behaves as if it is made of a solid transparent substance) or not (i.e. behaves as if made of wafer-thin sheets of a transparent material). This topic is discussed in more detail on page 10. Solid (left) and Thin-walled (right) The do refractive caustics parameter defines how glass behaves when caustics are enabled. When not rendering caustics, the mia material uses a shadow shader to create transparent shadows. For objects such as window panes this is perfectly adequate, and actually creates a better result than using caustics since the direct light is allowed to pass (more or less) undisturbed through the glass into e.g. a room. Traditionally, enabling caustics in mental ray cause all materials to stop casting transparent shadows and instead start to generate refractive caustics. In most architectural scenes this is undesirable; one may very well want a glass decoration on a table to generate caustic effect,

34 30 2 mia material - material for architectural and design visualisation but still want the windows of the room to let in quite normal direct light. This switch makes this possible on the material level. Using transparent shadows Using refractive caustics The left image shows the result that happen when do refractive caustics is off, the right the result when it is on. Both modes can be freely mixed within the same rendering. Photons are automatically treated accordingly by the built in photon shader, shooting straight through as direct light in the former case, and being refracted as caustics in the latter. The backface cull switch enables a special mode which makes surfaces completely invisible to the camera when seen from the reverse side. This is useful to create magic walls in a room. If all walls are created as planes with the normal facing inwards, the backface cull switch allows the room to be rendered from outside. The camera will see into the room, but the walls will still exist and cast shadows, bounce photons, etc. while being magically see through when the camera steps outside. No Backface Culling Backface Culling on the walls The propagate alpha switch defines how transparent objects treats any alpha channel information in the background. When on, refractions and other transparency effects will propagate the alpha of the background through the transparent object. When off, transparent objects will have an opaque alpha. The no visible area hl parameter concerns the behaviour of visible area lights.

35 2.4 Material Parameters 31 Keep in mind that traditional highlights (i.e. specular effects) is a computer graphics trick in place of actually creating a glossy reflection of an actual visible light-emitting surface. However, mental ray area lights can be visible, and when they are visible they will reflect in any (glossy) reflective objects. If both the reflection of the visible area light and the highlight is rendered, the light is added twice, causing an unrealistic brightening effect. This switch (which defaults to on) causes visible area lights to loose their highlights and instead only appear as reflections 12. A final optimization switch (also on by default) is the skip inside refl checkbox. Most reflections on the insides of transparent objects are very faint, except in the special case that occurs at certain angles known as Total Internal Reflection (TIR). This switch saves rendering time by ignoring the weak reflections completely but retaining the TIR s. The indirect multiplier allows tweaking of how strongly the material responds to indirect light, and fg quality is a local multiplier for the number of final gather rays shot by the material. Both default to 1.0 which uses the global value. To aid in mapping textures to fg quality the additional fg quality w parameter exists. When zero, fg quality is the raw quality setting, but for a nonzero fg quality w the actual quality used is the product of the two values, with a minimum of 1.0. This means that with a color texture mapped to fg quality and fg quality w set to 5.0, black in the texture results in a quality of 1.0 (i.e. the number of final gather rays shot is the global default), and white in the texture in a quality of 5.0 (five times as many rays are shot) Interpolation Glossy reflections and refractions can be interpolated. become smoother. This means they render faster and Interpolation works by precalculating glossy reflection in a grid across the image. The number of samples (rays) taken at each point is govern by the refl samples or refr samples parameters just as in the non-interpolated case. The resolution of this grid is set by the intr grid density parameter. However, interpolation can cause artifacts. Since it is done on a low resolution grid, it can lose details. Since it blends neighbours of this low resolution grid it can cause over smoothing. For this reason it is primarily useful on flat surfaces. Wavy, highly detailed surfaces, or surfaces using bump maps will not work well with interpolation. Valid values for intr grid density parameter is: 0 = grid resolution is double that of the rendering 1 = grid resolution is same as that of the rendering 12 Naturally this does not apply to the refl hl only mode, since it doesn t actually reflect anything

36 32 2 mia material - material for architectural and design visualisation 2 = grid resolution is half of that of the rendering 3 = grid resolution is a third of that of the rendering. 4 = grid resolution is a fourth of that of the rendering. 5 = grid resolution is a fifth of that of the rendering. Within the grid data is stored and shared across the points. Lower grid resolutions is faster but lose more detail information. Both reflection and refraction has an intr refl samples parameter which defines how many stored grid points (in an N by N group around the currently rendered point) is looked up to smooth out the glossiness. The default is 2, and higher values will smear the glossiness more, but are hence prone to more overmoothing artifacts. No interpolation (left), looking up 2 points (center) and 4 points (right) The reflection of the left cup in the floor is not using interpolation, and one can perceive some grain (here intentionally exaggerated). The floor tiles under the other two cup uses a half resolution interpolation with 2 (center) and 4 (right) point lookup respectively. This image also illustrates one of the consequences of using interpolation: The foot of the left cup, which is near the floor, is reflected quite sharply, and only parts of the cup far from the floor are blurry. Whereas the interpolated reflections on the right cups have a certain base level of blurriness (due to the smoothing of interpolation) which makes even the closest parts somewhat blurry. In most scenes with weak glossy reflections this discrepancy will never be noticed, but in other cases this can make things like legs of tables and chairs feel unconnected with a glossy floor, if the reflectivity is high. To solve this the intr refl ddist parameter exists. It allows a second set of detail rays to be traced to create a clearer version of objects within that radius.

37 2.4 Material Parameters 33 No detail distance (left), 25mm detail distance (center) and 150mm detail distance (right) All three floor tiles use interpolation but the rightmost two use different distances for the detail distance. This also allows an interesting trick : Set the refl samples to 0, which renders reflections as if they were mirror-perfect but use the interpolation to introduce blur into this perfect reflection (and perhaps use the intr refl ddist to make nearby parts less blurry). This is an extremely fast way to obtain a glossy reflection. No detail distance (left), with detail distance (right) The above floor tiles are rendered with mirror reflections, and the blurriness comes solely from the interpolation. This renders as fast (or faster!) than pure mirror reflections, yet gives a satisfying illusion of true glossy reflections, especially when utilizing the intr refl ddist as on the right.

38 34 2 mia material - material for architectural and design visualisation Special Maps The mia material also supports the following special inputs: The bump accepts a shader that perturbs the normal for bump mapping. When no diffuse bump is off, the bumps apply to all shading components (diffuse, highlights, reflections, refractions... ). When it is on, bumps are applied to all component except the diffuse. This means bumps are seen in reflections, highlights, etc. but the diffuse shading shows no bumps. It is as if the materials diffuse surface is smooth, but covered by a bumpy lacquer coating. no diffuse bump is off (left) and on (right) The cutout opacity is used to apply an opacity map to completely remove parts of objects. A classic example is to map an image of a tree to a flat plane and use opacity to cut away the parts of the tree that are not there.

39 2.4 Material Parameters 35 Mapping the transparency (left) vs. cutout opacity (right) The additional color is an input to which one can apply any shader. The output of this shader is simply added on top of the shading done by the mia material and can be used both for self illumination type effects as well as adding whatever additional shading one may want. The material also supports standard displacement and environment shaders. environment is supplied, the global camera environment is used. If no

40 36 2 mia material - material for architectural and design visualisation 2.5 Tips and Tricks Final Gathering Performance The Final Gathering algorithm in mental ray 3.5 is vastly improved from earlier versions, especially in it s adaptivity. This means one can often use much lower ray counts and much lower densities than in previous versions of mental ray. Many stills can be rendered with such extreme settings as 50 rays and a density of if this causes over smoothing artifacts, one can use the built in AO (see page 25) to solve those problems. When using Final Gathering together with GI (photons), make sure the photon solution is fairly smooth by rendering with Final Gathering disabled first. If the photon solution is noisy, increase the photon search radius until it calms down, and then re-enable Final Gathering Quick Guide to some Common Materials Here are some quick rules-of-thumb for creating various materials. They each assume basic default settings as a starting point General Rules of Thumb for Glossy Wood, Flooring, etc. This is the kind of hybrid materials one run into in many architectural renderings; lacquered wood, linoleum, etc. For these materials brdf fresnel should be off (i.e. we define a custom BRDF curve). Start out with brdf 0 degree refl of 0.2 amd brdf 90 degree refl of 1.0 and apply some suitable texture map to the diffuse. Set reflectivity around 0.5 to 0.8. How glossy is the material? Is reflections very clear or very blurry? Are they Strong or Weak? For clear, fairly strong reflections, keep refl gloss at 1.0 For slightly blurry but strong reflections, set a lower refl gloss value. If performance becomes an issue try using refl interpolate). For slightly blurry but also very weak reflections one can often cheat by setting a lower refl gloss value (to get the broader highlights) but set refl samples value to 0. This shoots only one mirror ray for reflections - but if they are very weak, one can often not really tell. For medium blurry surfaces set an even lower refl gloss and maybe increase the refl samples. Again, for performance try refl interpolate).

41 2.5 Tips and Tricks 37 For extremely blurry surfaces or surfaces with very weak reflections, try using the refl hl only mode. A typical wooden floor could use refl gloss of 0.5, refl samples of 16, reflectivity of 0.75, a nice wood texture for diffuse, perhaps a slight bump map (try the no diffuse bump checkbox if bumpiness should appear only in the lacquer layer). A linoleum carpet could use the same but with a different texture and bump map, and probably with a slightly lower reflectivity. and refl gloss Ceramics Ceramic materials are glazed, i.e. covered in a thin layer of transparent material. They follow similar rules to the general materials mentioned above, but one should have brdf fresnel on and the refr ior) set at about 1.4 and reflectivity at 1.0. The diffuse should be set to a suitable texture or color, i.e. white for white bathroom tiles Stone Materials Stone is usually fairly matte, or has reflections that are so blurry they are nearly diffuse. The powdery character of stone is simulated with the diffuse roughness parameter - try 0.5 as a starting point. Porous stone such as bricks would have a higher value. Stone would have a very low refl gloss (lower than 0.25) and one can most likely use refl hl only to good effect for very good performance. Use a nice stone texture for diffuse, some kind of bump map, and perhaps a map that varies the refl gloss value. The reflectivity would be around with brdf fresnel off and brdf 0 degree refl at 0.2 and brdf 90 degree refl at Glass Glass is a dielectric, so brdf fresnel should definitely be on. The IOR of glass is around 1.5. Set diffuse weight to 0.0, reflectivity to 1.0 and transparency to 1.0. This is enough to create basic, completely clear refractive glass. If this glass is for a window pane, set thin walled to on. If this is a solid glass block, set thin walled to off and consider if caustics are necessary or not, and set do refractive caustics accordingly. Is the glass frosted? Set refr gloss to a suitable value. Tune the refr samples for good quality or use refr interpolate) for performance. 13.

42 38 2 mia material - material for architectural and design visualisation Colored Glass For clear glass the tips in the previous section work. But colored glass is a slightly different story. Many shaders set the transparency at the surface of the glass. And indeed this is what happens if one simply sets a refr color to some value, e.g. blue. For glass done with thin walled turned on this works perfectly. But for solid glass objects this is not an accurate representation of reality. Study the following example. It contains two glass blocks of very different size and a sphere with a spherical hole inside of it 14 plus a glass horse. With a blue refr color: Glass with color changes at the surface The problems are evident: The two glass blocks are of completely different thickness, yet they are exactly the same level of blue. The inner sphere is darker than the outer. Why does this happen? Consider a light ray that enters a glass object. If the color is at the surface, the ray will be colored somewhat as it enters the object, retain this color through the object, and receive a second coloration (attenuation) when it exits the object: 14 Created by inserting a second sphere with the normals flipped inside the outer sphere. Don t forget to flip normals of such surfaces or they will not render correctly!

43 2.5 Tips and Tricks 39 Diagram for glass with color changes at the surface In the illustration above the ray enters from the left, and at the entry surface it drops in level and gets slightly darker (bottom of graph schematically illustrates the level). It retains this color throughout the travel through the medium and drops in level again at the exit surface. For simple glass objects this is quite sufficient. For any glass using thin walled it is by definition the correct thing to do, but for any complex solid it is not. It is especially wrong for negative spaces inside the glass (like the sphere in our example) because the light rays have to travel through four surfaces instead of two (getting two extra steps of attenuation at the surface ) In real colored glass, light travels through the medium and is attenuated as it goes. In the mia material this is accomplished by enabling the refr falloff dist and use the refr falloff color and setting the refr color to white. This is the result:

44 40 2 mia material - material for architectural and design visualisation Glass with color changes within the medium The above result is clearly much more satisfactory; the thick glass block is much deeper blue than the thin one, and the hollow sphere now looks correct. In diagram form it looks as follows: d=refr falloff dist where attenuation is refr falloff color The ray enters the medium and during it s entire travel it is attenuated. The strength of the attenuation is such that precisely at the refr falloff dist (d in the figure) the attenuation will match that of refr falloff color (i.e. at this depth the attenuation is the same as was received immediately at the surface with the previous model). The falloff is exponential such that at double refr falloff dist the effect is that of refr falloff color squared, and so on.

45 2.5 Tips and Tricks 41 There is one minor trade off: To correctly render the shadows of a material using this method one must either use caustics or make sure mental ray is rendering shadows in segment shadow mode. Using caustics naturally gives the most correct looking shadows (the above image was not rendered with caustics), but will require that one has caustic photons enabled and a physical light source that shoots caustic photons. On the other hand, the mental ray segment shadows have a slightly lower performance than the more widely used simple shadow mode. But if it is not used, there shadow intensity will not take the attenuation through the media into account properly Water and Liquids Water, like glass, is a dielectric with the IOR of Hence, the same principles as for glass (above) applies for solid bodies of water which truly need to refract things... for example water running out of a tap. Colored beverages use the same principles as colored glass, etc. Water into Wine To create a beverage in a container as in the image above, it is important to understand how the mia material handles refraction through multiple surfaces vs. how the real world tackles the same issue. What is important for refraction is how the transition from one medium to another with a different IOR. Such a transition is known as an interface. 15 But it could potentially still look nice.

46 42 2 mia material - material for architectural and design visualisation For lemonade in a glass, imagine a ray of light travelling through the air (IOR = 1.0) enter the glass, and is refracted by the IOR of the glass (1.5). After travellign through the glass the ray leaves the glass and enters the liquid, i.e. it passes an interface from one medium of IOR 1.5 to another medium of IOR One way to model this in computer graphics is to make the glass one separate closed surface, with the normals pointing towards the inside of the glass and an IOR of 1.5, and a second, closed surface for the beverage, with the normals pointing inwards and an IOR of 1.33, and leaving a small air gap between the container and the liquid. While this works, there is one problem with this approach: When light goes from a higher IOR to a lower there is a chance of an effect known as Total Internal Reflection (TIR). This is the effect one sees when diving in a swimming pool and looking up - the objects above the surface can only be seen in a small circle straight above, anything below a certain angle only shows a reflection of the pool and things below the surface. The larger the difference in the IOR of the two media, the larger is the chance of TIR. So in our example, as the ray goes from glass (IOR=1.5) to air, there is a large chance of TIR. But in reality the ray would move from a medium of IOR=1.5 to one of IOR=1.33, which is a much smaller step with a much smaller chance of TIR. This will look different: Correct refraction (left) vs. the air gap method (right) The result on the left is the correct result, but how it is obtained? The solution to the problem is to rethink the modelling, and not think in terms of media, but in terms of interfaces. In our example, we have three different interfaces, where we can consider the IOR as the ratio between the IOR s of the outside and inside media: Air-Glass interface (IOR = 1.5/1.0 = 1.5) Air-Liquid interface (IOR = 1.33/1.0 = 1.33)

47 2.5 Tips and Tricks 43 Glass-Liquid interface (IOR=1.33/1.5=0.8) It is evident that in the most common case of an interface with air, the IOR to use is the IOR of the media (since the IOR of air is 1.0), whereas in an interface between two different media, the situation is different. To correctly model this scenario, we then need three surfaces, each with a separate mia material applied: The three interfaces for a liquid in a glass The Air-glass surface (blue), with normals pointing out of the glass, covering the area where air directly touches the glass, having an IOR of 1.5 The Air-liquid surface (green), with normals pointing out of the liquid, covering the area where air directly touches the liquid, having an IOR of 1.33 The Glass-liquid surface (red), with normals pointing out of the liquid, covering the area where the glass touches the liquid, having an IOR of 0.8 By setting a suitable refr falloff dist and refr falloff color for the two liquid materials (to get a colored liquid), the image on the left in the comparision above is the result The Ocean and Water Surfaces A water surface is a slightly different matter than a visibly transparent liquid. The ocean isn t blue - it is reflective. Not much of the light that goes down under the surface of the ocean gets anywhere of interest. A little bit of it is scattered back up again doing a little bit of very literal sub surface scattering. To make an ocean surface with the mia material do the following steps:

48 44 2 mia material - material for architectural and design visualisation Set diffuse weight to 0.0, reflectivity to 1.0 and transparency to 0.0 (yes, we do not use refraction at all!). Set the refr ior) to 1.33 and brdf fresnel to on. Apply some interesting wobbly shader to bump and our ocean is basically done! This ocean has only reflections guided by the IOR. But this might work fine - try it. Just make sure there is something there for it to reflect! Add a sky map, objects, or a just a blue gradient background. There must be something or it will be completely black. The Ocean isn t blue - the sky is For a more tropical look, try setting diffuse to some slight greenish/blueish color, set the diffuse weight to some fairly low number (0.1) and check the no diffuse bump checkbox. Now we have a base color in the water which emulates the little bit of scattering occurring in the top level of the ocean.

49 2.5 Tips and Tricks 45 Enjoy the tropics Metals Metals are very reflective, which means they need something to reflect. The best looking metals come from having a true HDRI environment, either from a spherically mapped HDRI photo 16, or something like the mental ray physical sky. To set up classic chrome, turn brdf fresnel off, set reflectivity to 1.0, brdf 0 degree refl to 0.9 and brdf 90 degree refl to 1.0. Set diffuse to white and check the refl is metal checkbox. This creates an almost completely reflective material. Tweak the refl gloss parameter for various levels of blurry reflections to taste. Also consider using the round corners effect, which tend to work very well on metallic objects. Metals also influence the color of their reflections. Since we enabled refl is metal this is already happening; try setting the diffuse to a gold color to create gold. Try various levels of refl gloss (with the help of refl interpolate) for performance, when necessary). One can also change the reflectivity which has a slightly different meaning when refl is metal is enabled; it blends between the reflections (colored by the diffuse) and normal diffuse shading. This allows a blend between the glossy reflections and the diffuse shading, both driven by the same color. For example, an aluminum material would need a bit of diffuse blended in, whereas chrome would not. 16 Many HDRI images are available online.

50 46 2 mia material - material for architectural and design visualisation Gold, silver and copper, perhaps? Brushed Metals Brushed metal is an interesting special case of metals. In some cases, creating a brushed metal only takes turning down the refl gloss to a level where one receives a very blurred reflection. This is sufficient when the brushing direction is random or the brushes are too small to be visible even as an aggregate effect. For materials that have a clear brushing direction and/or where the actual brush strokes are visible, creating a convincing look is a slightly more involved process. The tiny grooves in a brushed metal all work together to cause anisotropic reflections. This can be illustrated by the following schematic, which simulates the brush grooves by actually modelling many tiny adjacent cylinders, shaded with a simple Phong shader:

51 2.5 Tips and Tricks 47 Many small adjacent cylinders As one can see, the specular highlight in each of the cylinders work together to create an aggregate effect which is the anisotropic highlight. Also note that the highlight isn t continuous, it is actually broken up in small adjacent segments. I.e. the main visual cues that a material is brushed metal are: Anisotropic highlights that stretch out in a direction perpendicular to the brushing direction. A discontinous highlight with breaks in the brushing direction. Many attempts to simulate brushed metals have only looked at the first effect, the anisotropy. Another common mistake is to think that the highlight stretches in the brushing direction. Neither is true. Hence, to simulate brushed metals, we need to simulate these two visual cues. The first one is simple; use anisotropy and anisotropy rotation to make anisotropic highlights. The second can be done in several ways: With a bump map With a map that varies the anisotropy or refl gloss With a map that varies the refl color

52 48 2 mia material - material for architectural and design visualisation Each have advantages and disadvantages, but the one we will try here is the last one. The reason for choosing this method is that it works well together with interpolation. 1. Create a map for the brush streaks. There are many ways to do this, either by painting a map in a paint program, or by using a Noise map that has been stretched heavily in one direction. 2. The map should vary between middle-gray and white. Apply this map to the refl color in a scale suitable for the brushing. 3. Set diffuse to white (or the color of the metal) but set diffuse weight to 0.0 (or a small value). 4. Make sure refl is metal is enabled. 5. Set refl gloss to Set anisotropy to 0.1 or similar. Use anisotropy rotation to align the highlight properly with the map. If necessary use anisotropy channel to base it on the same texture space as the map. Brushed Metal

53 Chapter 3 Sun and Sky 3.1 Introduction The mental ray physical sun & sky shaders are designed to enable physically plausible daylight simulations and very accurate renderings of daylight scenarios. The mia physicalsun and mia physicalsky are intended to be used together, with the mia physicalsun shader applied to a directional light that represents the sun light, and the mia physicalsky shader used as the scenes camera environment shader. The environment shader should be used to illuminate the scene with the help of final gathering (which must be enabled) and bounced light from the sun can be handled either by final gather diffuse bounces, or via GI (photons). 3.2 Units The sun and sky work in true photometric units, but the output can be converted to something else with the rgb unit conversion parameter. If it is set to 1 1 1, both the values returned by the mental ray shader API functions mi sample light (for the sunlight) and mi compute avg radiance (for the skylight), when sent through the mi luminance function, can be considered (will numerically match) photometric values in lux. Since the intensity of the sun outside the atmosphere is calibrated to lux, this is very bright when seen compared to a more classical rendering where light intensities generally range from 0 to 1. The rgb unit conversion parameter is applied as a multiplier and should be set to a value below 1.0 (e.g ) to convert the raw lux value to something more manageable. For convenience, the special rgb unit conversion value of is internally set so that lux (approximately the amount of light on a sunny day) equals the classical light level

54 50 3 Sun and Sky of Important note on fast SSS and Sun&Sky To use the mental ray fast SSS shaders together with the high dynamic range indirect sun and skylight, it is very important to turn on the Indirect parameter so the SSS shader can scatter the skylight (which is considered indirect). It is equally important to turn off the Screen composit parameter (otherwise the output of the SSS shaders are clamped to a low dynamic range and will appear to render black). 3.4 Common parameters Some parameters exist both in the mia physicalsun and mia physicalsky and all do the same thing. For physical correctness, it is necessary to keep these parameter in sync with eachother in both the sun and sky. For example, a sun with a different haze value than the sky cannot be guaranteed to be physically plausible.

55 3.4 Common parameters 51 The most important common parameters are those that drive the entire shading- and colorization model: haze sets the amount of haze in the air. The range is from 0 (a completely clear day) to 15 (extremely overcast, or sandstorm in sahara). The haze influences the intensity and color of the sky and horizon, intensity and color of sunlight, softness of the suns shadows, softness of the glow around the sun, and the strength of the aerial perspective. Haze=0 Haze=3 Haze=8 Haze=15 redblueshift gives artistic control over the redness of the light. The default value of 0.0 is the physically correct value1, but can be changed with this parameter which ranges from -1.0 (extremely blue) to 1.0 (extremely red). Redness= Calculated for a 6500K whitepoint. Redness=+0.3

56 52 3 Sun and Sky saturation is also an artistic control, where 1.0 is the physically calculated saturation level. The parameter ranges from 0.0 (black and white) to 2.0 (extremely boosted saturation) 3.5 Sun parameters The mia physicalsun is responsible for the color and intensity of the sunlight, as well as emitting photons from the sun. The shader should be applied as light shader and photon emission shader on a directional light source (it does not work on any other light type). declare shader "mia_physicalsun" ( boolean "on" default on, scalar "multiplier" default 1.0, color "rgb_unit_conversion" default , scalar "haze" default 0.0, scalar "redblueshift" default 0.0, scalar "saturation" default 1.0, scalar "horizon_height" default 0.0, scalar "shadow_softness" default 1.0, integer "samples" default 8, vector "photon_bbox_min", vector "photon_bbox_max", boolean "automatic_photon_energy", boolean "y_is_up" ) version 5 apply light end declare As mentioned above, the mia physicalsun contains several of the common parameters that are exposed in the mia physicalsky as well (haze, redblueshift etc.). The value of these parameters for the mia physicalsun should match those in the mia physicalsky. The parameters specific to the mia physicalsun are as follows: samples is the number of shadow samples for the soft shadows. If it is set to 0, no soft shadows are generated. shadow softness is the softness for the soft shadows. A value of 1.0 is the value which matches the softness of real solar shadow most accurately. Lower values makes the shadows sharper and higher softer. When photon bbox min and photon bbox max are left set to 0,0,0 the photon bounding box will be calculated automatically by the shader. If these are set, they define

57 3.6 Sky parameters 53 a bounding box in the coordinate system of the light within which photons are aimed. This can be used to focus GI photons on a particular area-of-interest. For example, if one has modelled a huge city as a backdrop, but is only rendering the interior of a room, mental ray will by default shoot photons over the entire city and maybe only a few will find their way into the room. With the photon bbox max and photon bbox min parameters one can focus the photon emission of the mia physicalsun to only aim at the window in question, greatly speeding up and enhancing the quality of the interior rendering. automatic photon energy enables automatic photon energy calculation. When this is on, the light source does not need to have a valid energy value that matches that of the sun (it does, however, need a nonzero energy value or photon emission is disabled by mental ray). The correct energy and color of the photons will be automatically calculated. If this parameter is off, the photons will have the energy defined by the lights energy value. 3.6 Sky parameters The mia physicalsky shader is responsible for creating the color gradient that represent the atmospheric skydome, which is then used to light the scene with the help of final gathering. The mia physicalsky, when used as an environment shader, also show the sky to the camera and in reflections. mia physicalsky also creates a virtual ground plane that exists below the model. This makes it unnecessary to actually model geometry all the way to the horizon line - the virtual ground plane provides both the visuals and the bounce-light from such ground. declare shader "mia_physicalsky" ( boolean "on" default on, scalar "multiplier" default 1.0, color "rgb_unit_conversion" default , scalar "haze" default 0.0, scalar "redblueshift" default 0.0, scalar "saturation" default 1.0, scalar "horizon_height" default 0.0, scalar "horizon_blur" default 0.1, color "ground_color" default , color "night_color" default 0 0 0, vector light "sun_direction", "sun", # The following parameters are only useful # when the shader is used as environment scalar "sun_disk_intensity" default 1.0, scalar "sun_disk_scale" default 4.0, scalar "sun_glow_intensity" default 1.0,

58 54 3 Sun and Sky boolean "use_background", shader "background", # For the lens/volume shader mode scalar "visibility_distance", ) boolean "y_is_up", integer "flags" version 4 apply environment, texture, lens, volume end declare on turns the shader on or off. The default is on. multiplier is a scalar multiplier for the light output. The default is 1.0. rgb unit conversion allows setting the units, described in more detail above. The special value of matches lux (light level on a sunny day) to the output value 1, suitable for low dynamic range rendering. horizon height sets the level of the horizon. The default value of 0.0 puts the horizon at standard height. But since the horizon is infinitely far away this can cause trouble joining up with any finite geometry that is supposed to represent the ground. It can also cause issues rendering locations that are supposed to be at a high altitude, like mountain tops or the top of New York skyscrapers where the horizon really is visibly below the viewer. This parameter allows tuning the position of the horizon. Note that the horizon doesn t actually exist at any specific height in 3D space - it is a shading effect for rays that go below a certain angle. This parameter tweaks this angle. The total range available range is somewhat extreme, reaching from (the horizon is straight down ) to 10.0 (the horizon is at the zenith)! In practice, only much smaller values are actually useful, like for example -0.2 to push the horizon down just below the edge of a finite visible ground plane. Note: The horizon height affects not only the visual representation of the horizon in the mia physicalsky shader, but also the color of the mia physicalsun itself, i.e. the point where the sun sets will indeed change for a nonzero horizon height. horizon blur sets the blurriness with which the horizon is rendered. At 0.0 the horizon is completely sharp. Generally low values (lower than 0.5) are used, but the full range is up to 10.0 for a horizon which only consists of blur and no actual horizon at all.

59 3.6 Sky parameters 55 horizon height=0.0, horizon blur=0.0 horizon height=-0.3, horizon blur=0.2 ground color is the color of the virtual ground plane. Note that this is a diffuse reflectance value (i.e. albedo). The ground will appear as if it was a lambertian reflector with this diffuse color, lit by the sun and sky only, does not receive any shadows. Red ground Green ground Note in the above images how bounce-light from the ground tints the walls of the house. Also note that the virtual ground plane does not receive shadows. Many sky models neglect the influence from bounce light from the ground, assuming only the sky is illuminating the scene. To compare the output if the mia physicalsky with e.g. the IES sky model one must therefore set the ground color to black. night color is the minimum color of the sky - the sky will never become darker than this value. It can be useful for adding things like moon, stars, high altitude cirrus clouds that are lit long after sunset etc. As the sun sets and the sky darkens, the contribution from night color is unaffected and remains as the base light level. sun direction is the direction of the sun disk when specified manually. If the sun parameter is used, this parameter is ignored. sun is the way to automatically set the sun direction. It should be the tag of the light instance that contains the directional light that represents the sun - i.e. the same light that has the mia physicalsun shader. This will make the visible sun disk automatically follow the direction of the actual sunlight. Aerial Perspective is a term used by painters to convey how distant objects are perceived as hazier and tinted towards the blue end of the spectrum. mia physicalsky emulates this with the visibility distance parameter. When nonzero, it defines the 10% distance, i.e. the distance at which approximately 10% of haze is visible at a haze level of 0.0.

60 56 3 Sun and Sky To use this effect, the shader must be applied as either a lens or camera volume shader. y is up defines what constitutes up. Some OEM integrations of mental ray considers the Z axis up and hence this parameter should be off - others consider the Z axis up and in that case this parameter should be on. flags is for future expansion, testing and internal algorithm control. Should be set to zero. It is important to note that the mia physicalsky shader treats rays differently. Direct rays from the camera, as well as reflection and refraction rays see the entire effect, including the sun disk described below. But since the lighting already has a direct light that represents the sun (using the mia physicalsun shader) the sun disk is not visible to the finalgather rays2. These parameters do not affect the final gathering result, only the visible result, i.e. what the camera sees and what is seen in reflection and refraction: sun intensity and glow intensity is the intensity of the visible sun disk and it s glow, which can be used to tune the look of the sun. glow intensity=5 glow intensity=0.1 sun scale sets the size of the visible sun disk. The value 1.0 is the physically correct size, but due to the fact that people tend to misjudge the proper size of the sun in photographs, the default is the slightly more visually pleasing 4.0 sun scale=1 2 This sun scale=4 would otherwise cause noise in the final gathering solution and too much light added to the scene

61 3.6 Sky parameters 57 When use background is enabled but no background has been set, the background of the rendering will be transparent black, i.e. suitable for external compositing. If a background shader is supplied, the background of the rendering will come from that shader (for example a texture shader that looks up a background photograph of a real location or similar). In either case the mia physicalsky will still be visible in refractions and reflections.

62

63 Chapter 4 Utility shaders 4.1 Round corners CG has a tendency to look unrealistic because edges of objects are geometrically sharp, whereas all edges in the real world are slightly rounded, chamfered, worn or filleted in some manner. This rounded edge tends to catch the light and create highlights that make edges more visually appealing. The mia roundcorners shader can create an illusion of rounded edges at render time. This feature is primarily intended to speed up modelling, where things like a table top need not be created with actual filleted or chamfered edges. No round corners Round corners The shader perturbs the normal vector, and should be applied where bump maps are normally used, e.g. in the bump parameter if the mia material. The function is not a displacement, it is merely a shading effect (like bump mapping) and is best suited for straight edges and simple geometry, not advanced highly curved geometry.

THEA RENDER ADAPTIVE BSD ENGINE

THEA RENDER ADAPTIVE BSD ENGINE THEA RENDER ADAPTIVE BSD ENGINE ADAPTIVE (BSD) ENGINE Adaptive (BSD) is the name of the biased engine inside Thea Render. This engine is a biased one (this is why we use the abbreviation "BSD") as it uses

More information

Lighting and Shading

Lighting and Shading Lighting and Shading Today: Local Illumination Solving the rendering equation is too expensive First do local illumination Then hack in reflections and shadows Local Shading: Notation light intensity in,

More information

Property of: Entrada Interactive. PBR Workflow. Working within a PBR-based environment

Property of: Entrada Interactive. PBR Workflow. Working within a PBR-based environment Property of: Entrada Interactive PBR Workflow Working within a PBR-based environment Ryan Manning 8/24/2014 MISCREATED PBR WORKFLOW CryDocs on Physically Based Shading/Rendering: http://docs.cryengine.com/display/sdkdoc4/physically+based+rendering

More information

Texture Mapping. Images from 3D Creative Magazine

Texture Mapping. Images from 3D Creative Magazine Texture Mapping Images from 3D Creative Magazine Contents Introduction Definitions Light And Colour Surface Attributes Surface Attributes: Colour Surface Attributes: Shininess Surface Attributes: Specularity

More information

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models Computergrafik Thomas Buchberger, Matthias Zwicker Universität Bern Herbst 2008 Today Introduction Local shading models Light sources strategies Compute interaction of light with surfaces Requires simulation

More information

Mental Ray for BK5100

Mental Ray for BK5100 for BK5100 Practical guide: Global Illumination Interior and MIA Materials Tweety 1 Technisch Ontwerp en Informatica Lecture overview Final Gather Exterior Lighting and rendering an exterior scene using

More information

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models Computergrafik Matthias Zwicker Universität Bern Herbst 2009 Today Introduction Local shading models Light sources strategies Compute interaction of light with surfaces Requires simulation of physics Global

More information

Lighting & 3D Graphics. Images from 3D Creative Magazine

Lighting & 3D Graphics. Images from 3D Creative Magazine Lighting & 3D Graphics Images from 3D Creative Magazine Contents Introduction Definitions 3D Lighting Basics 3D Light Sources Lighting Controls & Effects Brightness & Colour Shadows Hotspot And Falloff

More information

Local Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Local Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller Local Illumination CMPT 361 Introduction to Computer Graphics Torsten Möller Graphics Pipeline Hardware Modelling Transform Visibility Illumination + Shading Perception, Interaction Color Texture/ Realism

More information

Iray Uber Shader Properties. Workshop Reference Guide

Iray Uber Shader Properties. Workshop Reference Guide Iray Uber Shader Properties Workshop Reference Guide Sabine Hajostek ( esha ) February 2017 Iray Uber Shader Reference Guide 2 Contents Contents... 3 Basic Information... 4 Shader Modes... 5 PBR Metallicity/Roughness

More information

Advanced Rendering CHAPTER. Render Window. Learning Objectives. Image Pane

Advanced Rendering CHAPTER. Render Window. Learning Objectives. Image Pane CHAPTER Advanced Rendering Learning Objectives After completing this chapter, you will be able to: Make advanced rendering settings. Set the resolution for a rendering. Save a rendering to an image file.

More information

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker CMSC427 Shading Intro Credit: slides from Dr. Zwicker 2 Today Shading Introduction Radiometry & BRDFs Local shading models Light sources Shading strategies Shading Compute interaction of light with surfaces

More information

Introduction to Visualization and Computer Graphics

Introduction to Visualization and Computer Graphics Introduction to Visualization and Computer Graphics DH2320, Fall 2015 Prof. Dr. Tino Weinkauf Introduction to Visualization and Computer Graphics Visibility Shading 3D Rendering Geometric Model Color Perspective

More information

AWE Surface 1.0 Documentation

AWE Surface 1.0 Documentation AWE Surface 1.0 Documentation AWE Surface is a new, robust, highly optimized, physically plausible shader for DAZ Studio and 3Delight employing physically based rendering (PBR) metalness / roughness workflow.

More information

Interior space in daylight Elsevier Inc. All rights reserved.

Interior space in daylight Elsevier Inc. All rights reserved. Interior space in daylight Bonus Chapter 1 Day Lighting an Interior Space 1.1 Introduction In this chapter, you will learn about lighting an interior scene while you work on the lighting for the living

More information

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects Basic Ray Tracing Rendering: Reality Eye acts as pinhole camera Photons from light hit objects Rendering: Reality Eye acts as pinhole camera Photons from light hit objects Rendering: Reality Eye acts as

More information

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 CSE 167: Introduction to Computer Graphics Lecture #6: Lights Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Announcements Thursday in class: midterm #1 Closed book Material

More information

Occlusion tutorial. Document version 1.0 April 27th, 2005

Occlusion tutorial. Document version 1.0 April 27th, 2005 Occlusion tutorial Document version 1.0 April 27th, 2005 Copyright Information c 1986, 2015 NVIDIA Corporation. All rights reserved. This document is protected under copyright law. The contents of this

More information

Caustics - Mental Ray

Caustics - Mental Ray Caustics - Mental Ray (Working with real caustic generation) In this tutorial we are going to go over some advanced lighting techniques for creating realistic caustic effects. Caustics are the bent reflections

More information

Virtual Reality for Human Computer Interaction

Virtual Reality for Human Computer Interaction Virtual Reality for Human Computer Interaction Appearance: Lighting Representation of Light and Color Do we need to represent all I! to represent a color C(I)? No we can approximate using a three-color

More information

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye Ray Tracing What was the rendering equation? Motivate & list the terms. Relate the rendering equation to forward ray tracing. Why is forward ray tracing not good for image formation? What is the difference

More information

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007 Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007 Programming For this assignment you will write a simple ray tracer. It will be written in C++ without

More information

Chapter 11. Caustics and Global Illumination

Chapter 11. Caustics and Global Illumination 11 and Global Illumination Chapter 11 Direct illumination occurs when a light source directly illuminates an object or objects in a scene. Indirect illumination occurs if light illuminates objects by reflection

More information

diffuse diffuse reflection refraction diffuse mapping diffuse reflection reflection filter mapping mapping reflection

diffuse diffuse reflection refraction diffuse mapping diffuse reflection reflection filter mapping mapping reflection Matières 1 2 3 mapping diffuse reflection diffuse transparency reflection refraction diffuse mapping diffuse reflection diffuse reflection filter mapping bump mapping mapping mapping diffuse reflection

More information

Ray Tracing: Special Topics CSCI 4239/5239 Advanced Computer Graphics Spring 2018

Ray Tracing: Special Topics CSCI 4239/5239 Advanced Computer Graphics Spring 2018 Ray Tracing: Special Topics CSCI 4239/5239 Advanced Computer Graphics Spring 2018 Theoretical foundations Ray Tracing from the Ground Up Chapters 13-15 Bidirectional Reflectance Distribution Function BRDF

More information

Advanced Distant Light for DAZ Studio

Advanced Distant Light for DAZ Studio Contents Advanced Distant Light for DAZ Studio Introduction Important Concepts Quick Start Quick Tips Parameter Settings Light Group Shadow Group Lighting Control Group Known Issues Introduction The Advanced

More information

Raytracing CS148 AS3. Due :59pm PDT

Raytracing CS148 AS3. Due :59pm PDT Raytracing CS148 AS3 Due 2010-07-25 11:59pm PDT We start our exploration of Rendering - the process of converting a high-level object-based description of scene into an image. We will do this by building

More information

Visual cues to 3D geometry. Light Reflection and Advanced Shading. Shading. Recognizing materials. size (perspective) occlusion shading

Visual cues to 3D geometry. Light Reflection and Advanced Shading. Shading. Recognizing materials. size (perspective) occlusion shading Visual cues to 3D geometry Light Reflection and Advanced Shading size (perspective) occlusion shading CS 4620 Lecture 17 1 2 Shading Recognizing materials Variation in observed color across an object strongly

More information

Photo-realism Fundamentals

Photo-realism Fundamentals 1-(800) 877-2745 www.ashlar-vellum.com Photo-realism Fundamentals Using Cobalt, Xenon, Argon Copyright 2008 Ashlar Incorporated. All rights reserved. Photo-realism Fundamentals Photo-realistic rendering

More information

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Lecture 15: Shading-I. CITS3003 Graphics & Animation Lecture 15: Shading-I CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Learn that with appropriate shading so objects appear as threedimensional

More information

LIGHTING - 1. Note. Lights. Ambient occlusion

LIGHTING - 1. Note. Lights. Ambient occlusion Note LIGHTING - 1 The creation and use of lights varies greatly between the default Blender renderer and the Cycles renderer. This section refers only to simple lighting in the default renderer. Lights

More information

Oso Toon Shader. Step 1: Flat Color

Oso Toon Shader. Step 1: Flat Color Oso Toon Shader By default the Oso Toon Shader has most of the same elements of standard Iray Uber Shader, that it is based on. However, there are some additional functions that allow OTS to do some dramatic

More information

SNC2D PHYSICS 4/27/2013. LIGHT & GEOMETRIC OPTICS L Light Rays & Reflection (P ) Light Rays & Reflection. The Ray Model of Light

SNC2D PHYSICS 4/27/2013. LIGHT & GEOMETRIC OPTICS L Light Rays & Reflection (P ) Light Rays & Reflection. The Ray Model of Light SNC2D PHYSICS LIGHT & GEOMETRIC OPTICS L Light Rays & Reflection (P.402-409) Light Rays & Reflection A driver adjusts her rearview mirror. The mirror allows her to see the cars behind her. Mirrors help

More information

Computer Graphics. Ray Tracing. Based on slides by Dianna Xu, Bryn Mawr College

Computer Graphics. Ray Tracing. Based on slides by Dianna Xu, Bryn Mawr College Computer Graphics Ray Tracing Based on slides by Dianna Xu, Bryn Mawr College Ray Tracing Example Created by Anto Matkovic Ray Tracing Example Ray Tracing Example Ray Tracing Most light rays do not reach

More information

Working with the BCC Bump Map Generator

Working with the BCC Bump Map Generator Working with the BCC Bump Map Generator Bump mapping is used to create three dimensional detail on an image based on the luminance information in the image. The luminance value of each pixel of the image

More information

General mental ray questions

General mental ray questions HDRI For Artists Siggraph 2008 mental ray HDRI FAQ By Håkan Zap Andersson, mental images version 4.1: April 25, 2008 General mental ray questions What is/are the primary reasons I should use mental ray

More information

COMP environment mapping Mar. 12, r = 2n(n v) v

COMP environment mapping Mar. 12, r = 2n(n v) v Rendering mirror surfaces The next texture mapping method assumes we have a mirror surface, or at least a reflectance function that contains a mirror component. Examples might be a car window or hood,

More information

ART 268 3D Computer Graphics Texture Mapping and Rendering. Texture Mapping

ART 268 3D Computer Graphics Texture Mapping and Rendering. Texture Mapping ART 268 3D Computer Graphics Texture Mapping and Rendering Texture Mapping Is the way in which a material is wrapped around an object. The default method is UVW mapping (see below). When you drag a material

More information

UNIT C: LIGHT AND OPTICAL SYSTEMS

UNIT C: LIGHT AND OPTICAL SYSTEMS 1 UNIT C: LIGHT AND OPTICAL SYSTEMS Science 8 2 LIGHT BEHAVES IN PREDICTABLE WAYS. Section 2.0 1 3 LIGHT TRAVELS IN RAYS AND INTERACTS WITH MATERIALS Topic 2.1 RAY DIAGRAMS Scientists use ray diagrams

More information

V-RAY MATERIAL SETTINGS

V-RAY MATERIAL SETTINGS V-RAY MATERIAL SETTINGS author: Wouter Wynen brought to you by: 2006 VisMasters. All rights reserved. VisMasters and the VisMasters logo are trademarks of ArchVision, Inc. All other trademarks belong to

More information

LEVEL 1 ANIMATION ACADEMY2010

LEVEL 1 ANIMATION ACADEMY2010 1 Textures add more realism to an environment and characters. There are many 2D painting programs that can be used to create textures, such as Adobe Photoshop and Corel Painter. Many artists use photographs

More information

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination Global Illumination Why Global Illumination Last lecture Basic rendering concepts Primitive-based rendering Today: Global illumination Ray Tracing, and Radiosity (Light-based rendering) What s Global Illumination

More information

CS 5625 Lec 2: Shading Models

CS 5625 Lec 2: Shading Models CS 5625 Lec 2: Shading Models Kavita Bala Spring 2013 Shading Models Chapter 7 Next few weeks Textures Graphics Pipeline Light Emission To compute images What are the light sources? Light Propagation Fog/Clear?

More information

This work is about a new method for generating diffusion curve style images. Although this topic is dealing with non-photorealistic rendering, as you

This work is about a new method for generating diffusion curve style images. Although this topic is dealing with non-photorealistic rendering, as you This work is about a new method for generating diffusion curve style images. Although this topic is dealing with non-photorealistic rendering, as you will see our underlying solution is based on two-dimensional

More information

Soft shadows. Steve Marschner Cornell University CS 569 Spring 2008, 21 February

Soft shadows. Steve Marschner Cornell University CS 569 Spring 2008, 21 February Soft shadows Steve Marschner Cornell University CS 569 Spring 2008, 21 February Soft shadows are what we normally see in the real world. If you are near a bare halogen bulb, a stage spotlight, or other

More information

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University Global Illumination CS334 Daniel G. Aliaga Department of Computer Science Purdue University Recall: Lighting and Shading Light sources Point light Models an omnidirectional light source (e.g., a bulb)

More information

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker CMSC427 Advanced shading getting global illumination by local methods Credit: slides Prof. Zwicker Topics Shadows Environment maps Reflection mapping Irradiance environment maps Ambient occlusion Reflection

More information

Recall: Basic Ray Tracer

Recall: Basic Ray Tracer 1 Recall: Ray Tracing Generate an image by backwards tracing the path of light through pixels on an image plane Simulate the interaction of light with objects Recall: Basic Ray Tracer Trace a primary ray

More information

Lighting. Figure 10.1

Lighting. Figure 10.1 We have learned to build three-dimensional graphical models and to display them. However, if you render one of our models, you might be disappointed to see images that look flat and thus fail to show the

More information

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

Announcements. Written Assignment 2 out (due March 8) Computer Graphics Announcements Written Assignment 2 out (due March 8) 1 Advanced Ray Tracing (Recursive) Ray Tracing Antialiasing Motion Blur Distribution Ray Tracing Ray Tracing and Radiosity Assumptions Simple shading

More information

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch CSCI 420 Computer Graphics Lecture 18 Global Illumination Jernej Barbic University of Southern California BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch. 13.4-13.5] 1 Global Illumination

More information

There are many kinds of surface shaders, from those that affect basic surface color, to ones that apply bitmap textures and displacement.

There are many kinds of surface shaders, from those that affect basic surface color, to ones that apply bitmap textures and displacement. mental ray Overview Mental ray is a powerful renderer which is based on a scene description language. You can use it as a standalone renderer, or even better, integrated with 3D applications. In 3D applications,

More information

Computer Graphics. Illumination and Shading

Computer Graphics. Illumination and Shading Rendering Pipeline modelling of geometry transformation into world coordinates placement of cameras and light sources transformation into camera coordinates backface culling projection clipping w.r.t.

More information

The Rendering Equation. Computer Graphics CMU /15-662

The Rendering Equation. Computer Graphics CMU /15-662 The Rendering Equation Computer Graphics CMU 15-462/15-662 Review: What is radiance? Radiance at point p in direction N is radiant energy ( #hits ) per unit time, per solid angle, per unit area perpendicular

More information

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows. CSCI 420 Computer Graphics Lecture 18 Global Illumination Jernej Barbic University of Southern California BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Angel Ch. 11] 1 Global Illumination

More information

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1) Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Why do we need Lighting & shading? Sphere

More information

Point based global illumination is now a standard tool for film quality renderers. Since it started out as a real time technique it is only natural

Point based global illumination is now a standard tool for film quality renderers. Since it started out as a real time technique it is only natural 1 Point based global illumination is now a standard tool for film quality renderers. Since it started out as a real time technique it is only natural to consider using it in video games too. 2 I hope that

More information

Turn your movie file into the homework folder on the server called Lights, Camera, Action.

Turn your movie file into the homework folder on the server called Lights, Camera, Action. CS32 W11 Homework 3: Due MONDAY, APRIL 18 Now let s put the ball in a world of your making and have some fun. Create a simple AND WE MEAN SIMPLE environment for one of your ball bounces. You will assign

More information

Practical Techniques for Ray Tracing in Games. Gareth Morgan (Imagination Technologies) Aras Pranckevičius (Unity Technologies) March, 2014

Practical Techniques for Ray Tracing in Games. Gareth Morgan (Imagination Technologies) Aras Pranckevičius (Unity Technologies) March, 2014 Practical Techniques for Ray Tracing in Games Gareth Morgan (Imagination Technologies) Aras Pranckevičius (Unity Technologies) March, 2014 What Ray Tracing is not! Myth: Ray Tracing is only for photorealistic

More information

Shading / Light. Thanks to Srinivas Narasimhan, Langer-Zucker, Henrik Wann Jensen, Ravi Ramamoorthi, Hanrahan, Preetham

Shading / Light. Thanks to Srinivas Narasimhan, Langer-Zucker, Henrik Wann Jensen, Ravi Ramamoorthi, Hanrahan, Preetham Shading / Light Thanks to Srinivas Narasimhan, Langer-Zucker, Henrik Wann Jensen, Ravi Ramamoorthi, Hanrahan, Preetham Phong Illumination Model See Shirley, Ch 10 and http://en.wikipedia.org/wiki/phong_shading

More information

Comp 410/510 Computer Graphics. Spring Shading

Comp 410/510 Computer Graphics. Spring Shading Comp 410/510 Computer Graphics Spring 2017 Shading Why we need shading Suppose we build a model of a sphere using many polygons and then color it using a fixed color. We get something like But we rather

More information

8 Human Skin Materials and Faking Sub Surface Scattering in Cycles

8 Human Skin Materials and Faking Sub Surface Scattering in Cycles 8 Human Skin Materials and Faking Sub Surface Scattering in Cycles In this chapter, we will cover: Simulating SSS in Cycles by using the Translucent shader Simulating SSS in Cycles by using the Vertex

More information

Ray Tracer Due date: April 27, 2011

Ray Tracer Due date: April 27, 2011 Computer graphics Assignment 4 1 Overview Ray Tracer Due date: April 27, 2011 In this assignment you will implement the camera and several primitive objects for a ray tracer, and a basic ray tracing algorithm.

More information

MR Shaders Dielectric Materials Rendering Glass and Simple Caustics

MR Shaders Dielectric Materials Rendering Glass and Simple Caustics Dielectric Material This shader is a physically based material shader that can be used to simulate dielectric media such as glass, water, and other liquids. The shader uses Fresnel's formulas for dielectric

More information

Shading I Computer Graphics I, Fall 2008

Shading I Computer Graphics I, Fall 2008 Shading I 1 Objectives Learn to shade objects ==> images appear threedimensional Introduce types of light-material interactions Build simple reflection model Phong model Can be used with real time graphics

More information

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows. CSCI 480 Computer Graphics Lecture 18 Global Illumination BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch. 13.4-13.5] March 28, 2012 Jernej Barbic University of Southern California

More information

02 Shading and Frames. Steve Marschner CS5625 Spring 2016

02 Shading and Frames. Steve Marschner CS5625 Spring 2016 02 Shading and Frames Steve Marschner CS5625 Spring 2016 Light reflection physics Radiometry redux Power Intensity power per unit solid angle Irradiance power per unit area Radiance power per unit (solid

More information

BCC Sphere Transition

BCC Sphere Transition BCC Sphere Transition The Sphere Transition shape models the source image onto a sphere. Unlike the Sphere filter, the Sphere Transition filter allows you to animate Perspective, which is useful in creating

More information

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 CSE 167: Introduction to Computer Graphics Lecture #7: Color and Shading Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 Announcements Homework project #3 due this Friday,

More information

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows Recollection Models Pixels Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows Can be computed in different stages 1 So far we came to Geometry model 3 Surface

More information

Path Tracing part 2. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Path Tracing part 2. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017 Path Tracing part 2 Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017 Monte Carlo Integration Monte Carlo Integration The rendering (& radiance) equation is an infinitely recursive integral

More information

Rendering Engines - Specific tools may depend on "Rendering Engine"

Rendering Engines - Specific tools may depend on Rendering Engine Week 5 3DS Max, Cameras, Lighting and Materials Rendering - Process of turning geometry into pixels Rendering Engines - Specific tools may depend on "Rendering Engine" 1. Internal (3DS MAX) ART (Autodesk

More information

Color and Light. CSCI 4229/5229 Computer Graphics Summer 2008

Color and Light. CSCI 4229/5229 Computer Graphics Summer 2008 Color and Light CSCI 4229/5229 Computer Graphics Summer 2008 Solar Spectrum Human Trichromatic Color Perception Are A and B the same? Color perception is relative Transmission,Absorption&Reflection Light

More information

AMD Radeon ProRender plug-in for PTC Creo. User Guide

AMD Radeon ProRender plug-in for PTC Creo. User Guide AMD Radeon ProRender plug-in for PTC Creo User Guide This document is a user and setup guide on how to render photorealistic images in real-time and apply decals for PTC Creo. DISCLAIMER The information

More information

Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD

Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD Shading, lighting, & BRDF Theory Cliff Lindsay, PHD Overview of today s lecture BRDF Characteristics Lights in terms of BRDFs Classes of BRDFs Ambient light & Shadows in terms of BRDFs Decomposing Reflection

More information

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015 Orthogonal Projection Matrices 1 Objectives Derive the projection matrices used for standard orthogonal projections Introduce oblique projections Introduce projection normalization 2 Normalization Rather

More information

Global Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Global Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller Global Illumination CMPT 361 Introduction to Computer Graphics Torsten Möller Reading Foley, van Dam (better): Chapter 16.7-13 Angel: Chapter 5.11, 11.1-11.5 2 Limitation of local illumination A concrete

More information

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project To do Continue to work on ray programming assignment Start thinking about final project Lighting Course Outline 3D Graphics Pipeline Modeling (Creating 3D Geometry) Mesh; modeling; sampling; Interaction

More information

Shading 1: basics Christian Miller CS Fall 2011

Shading 1: basics Christian Miller CS Fall 2011 Shading 1: basics Christian Miller CS 354 - Fall 2011 Picking colors Shading is finding the right color for a pixel This color depends on several factors: The material of the surface itself The color and

More information

Extending the Disney BRDF to a BSDF with Integrated Subsurface Scattering. Brent Burley Walt Disney Animation Studios

Extending the Disney BRDF to a BSDF with Integrated Subsurface Scattering. Brent Burley Walt Disney Animation Studios The 42nd International Conference and Exhibition on Computer Graphics and Interactive Techniques Extending the Disney BRDF to a BSDF with Integrated Subsurface Scattering Brent Burley Walt Disney Animation

More information

Photo Studio Optimizer

Photo Studio Optimizer CATIA V5 Training Foils Photo Studio Optimizer Version 5 Release 19 September 008 EDU_CAT_EN_PSO_FF_V5R19 Photo Studio Optimizer Objectives of the course Upon completion of this course you will be able

More information

Visual Perception. Visual contrast

Visual Perception. Visual contrast TEXTURE Visual Perception Our perception of the visual shape, size, color, and texture of things is affected by the optical environment in which we see them and the relationships we can discern between

More information

Chapter 9- Ray-Tracing

Chapter 9- Ray-Tracing Ray-tracing is used to produce mirrored and reflective surfaces. It is also being used to create transparency and refraction (bending of images through transparent surfaceslike a magnifying glass or a

More information

Working with the BCC Brick Generator

Working with the BCC Brick Generator Working with the BCC Brick Generator Brick is a versatile generator of tiled surfaces with realistic texture and lighting controls. The bricks can act as a Þlter on a layer or generate a brick surface

More information

CPSC 314 LIGHTING AND SHADING

CPSC 314 LIGHTING AND SHADING CPSC 314 LIGHTING AND SHADING UGRAD.CS.UBC.CA/~CS314 slide credits: Mikhail Bessmeltsev et al 1 THE RENDERING PIPELINE Vertices and attributes Vertex Shader Modelview transform Per-vertex attributes Vertex

More information

Computer Graphics. Illumination and Shading

Computer Graphics. Illumination and Shading () Illumination and Shading Dr. Ayman Eldeib Lighting So given a 3-D triangle and a 3-D viewpoint, we can set the right pixels But what color should those pixels be? If we re attempting to create a realistic

More information

Autodesk Fusion 360: Render. Overview

Autodesk Fusion 360: Render. Overview Overview Rendering is the process of generating an image by combining geometry, camera, texture, lighting and shading (also called materials) information using a computer program. Before an image can be

More information

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics Announcements Assignment 4 will be out later today Problem Set 3 is due today or tomorrow by 9am in my mail box (4 th floor NSH) How are the machines working out? I have a meeting with Peter Lee and Bob

More information

Simple Lighting/Illumination Models

Simple Lighting/Illumination Models Simple Lighting/Illumination Models Scene rendered using direct lighting only Photograph Scene rendered using a physically-based global illumination model with manual tuning of colors (Frederic Drago and

More information

CS452/552; EE465/505. Intro to Lighting

CS452/552; EE465/505. Intro to Lighting CS452/552; EE465/505 Intro to Lighting 2-10 15 Outline! Projection Normalization! Introduction to Lighting (and Shading) Read: Angel Chapter 5., sections 5.4-5.7 Parallel Projections Chapter 6, sections

More information

The Making of Seemore WebGL. Will Eastcott, CEO, PlayCanvas

The Making of Seemore WebGL. Will Eastcott, CEO, PlayCanvas The Making of Seemore WebGL Will Eastcott, CEO, PlayCanvas 1 What is Seemore WebGL? A mobile-first, physically rendered game environment powered by HTML5 and WebGL 2 PlayCanvas: Powering Seemore WebGL

More information

CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside CS130 : Computer Graphics Lecture 8: Lighting and Shading Tamar Shinar Computer Science & Engineering UC Riverside Why we need shading Suppose we build a model of a sphere using many polygons and color

More information

Ambient Occlusion Pass

Ambient Occlusion Pass Ambient Occlusion Pass (Soft Shadows in the Nooks and Crannies to Replicate Photorealistic Lighting) In this tutorial we are going to go over some advanced lighting techniques for an Ambient Occlusion

More information

Ok, so to get started we will take a look at the settings in the Render setup. If we were to take a render right now this is what we would see...

Ok, so to get started we will take a look at the settings in the Render setup. If we were to take a render right now this is what we would see... Caustics - V-Ray In this tutorial we are going to go over some advanced lighting techniques for creating realistic caustic effects using the V-Ray renderer. Caustics function in V-Ray much like they function

More information

At the interface between two materials, where light can be reflected or refracted. Within a material, where the light can be scattered or absorbed.

At the interface between two materials, where light can be reflected or refracted. Within a material, where the light can be scattered or absorbed. At the interface between two materials, where light can be reflected or refracted. Within a material, where the light can be scattered or absorbed. The eye sees by focusing a diverging bundle of rays from

More information

Raytracing. COSC 4328/5327 Scott A. King

Raytracing. COSC 4328/5327 Scott A. King Raytracing COSC 4328/5327 Scott A. King Basic Ray Casting Method pixels in screen Shoot ray p from the eye through the pixel. Find closest ray-object intersection. Get color at intersection Basic Ray Casting

More information

Raycast Rendering Maya 2013

Raycast Rendering Maya 2013 2000 2012 Michael O'Rourke Raycast Rendering Maya 2013 (See also the Intro to Lights and Rendering tutorial for an introduction to the basics of rendering an image) Concept There are several algorithms

More information

EECS 487: Interactive Computer Graphics

EECS 487: Interactive Computer Graphics Ray Tracing EECS 487: Interactive Computer Graphics Lecture 29: Distributed Ray Tracing Introduction and context ray casting Recursive ray tracing shadows reflection refraction Ray tracing implementation

More information

Color and Light CSCI 4229/5229 Computer Graphics Fall 2016

Color and Light CSCI 4229/5229 Computer Graphics Fall 2016 Color and Light CSCI 4229/5229 Computer Graphics Fall 2016 Solar Spectrum Human Trichromatic Color Perception Color Blindness Present to some degree in 8% of males and about 0.5% of females due to mutation

More information

Lighting affects appearance

Lighting affects appearance Lighting affects appearance 1 Source emits photons Light And then some reach the eye/camera. Photons travel in a straight line When they hit an object they: bounce off in a new direction or are absorbed

More information