iray EDUCATIONAL PREPARING CONTENT FOR IRAY IN AUTODESK 3DS MAX AND 3DS MAX DESIGN APRIL 2011

iray EDUCATIONAL PREPARING CONTENT FOR IRAY® IN AUTODESK® 3DS MAX® AND 3DS MAX DESIGN® APRIL 2011 © 2011 NVIDIA | Preparing Content for iray® in Auto...
Author: Bryan Goodwin
0 downloads 3 Views 8MB Size
iray EDUCATIONAL PREPARING CONTENT FOR IRAY® IN AUTODESK® 3DS MAX® AND 3DS MAX DESIGN® APRIL 2011

© 2011 NVIDIA | Preparing Content for iray® in Autodesk® 3ds Max® and 3ds Max Design®

CONTENTS INTRODUCTION

3  

PHOTOREALISM

4  

Materials ............................................................................................................. 4   Geometry ............................................................................................................. 6   Modeling Glass......................................................................................... 6   UV Coordinates ........................................................................................ 8   Smooth Curved Surfaces ......................................................................... 9   Lights ................................................................................................................... 9   Photometric Lights .................................................................................. 9   Environment and Sunlight ..................................................................... 10   Cameras ............................................................................................................ 12   Depth Of Field ........................................................................................ 12   MORE INFORMATION

© 2011 NVIDIA | Preparing Content for iray® in Autodesk® 3ds Max® and 3ds Max Design®

13  

Page 2

INTRODUCTION As a physically accurate renderer, iray requires scenes to be set up in a physically plausible manner. To set up a scene that will yield great photorealistic results with iray, it is sufficient to honor a few recommendations, which are enumerated in the following pages. Preparing physically plausible scenes introduces performance benefits because potential sources of noise and other unexpected situations are implicitly avoided, due to geometries and materials being optimally setup.

© 2011 NVIDIA | Preparing Content for iray® in Autodesk® 3ds Max® and 3ds Max Design®

Page 3

PHOTOREALISM MATERIALS As a physically accurate renderer, iray requires the use of physically plausible materials. Currently, iray supports Autodesk's Arch&Design shader1 interface and the Autodesk Pro Materials. Using other types of shaders is not recommended2. The Arch&Design shader contains a number of presets which will significantly shorten the time spent on tuning materials. In the world of iray, objects are made of glass, steel, ceramic, etc... and this is exactly the kind of simplicity that enables designers to focus on their work rather than spending time on making it look the way they wanted, dealing with complex shader graphs to approximate reality. iray renders out reality by design so it becomes natural to embrace a workflow where satin metal is just satin metal.

Physical Glass preset

Glossy Plastic preset

Satin Wood preset

Bronze preset

For a more in-depth understanding of using the Arch&Design presets, see the "Materials - Presets" tutorial in the video section at www.irayrender.com The easiest process to create new materials is to start with an existing preset, then customize it by modifying the shader's parameters and eventually assigning textures. While tuning a material's properties, it is important to bear in mind the following recommendations: §

Pure white materials are hardly found in nature, hence they should be avoided. Avoid diffuse colors such as RGB=[1,1,1] (pure white), which could, for example, be replaced with [0.7, 0.7, 0.7]. Only few materials, such as pure snow, can reach values as high as 0.9.

Pure white (unreal)

1 2

Realistic white

Most parameters are supported, with few exceptions such as Round Corners, Ambient Occlusion etc... With the exception of shaders such as Multi/Sub-Object and Double-Sided.

© 2011 NVIDIA | Preparing Content for iray® in Autodesk® 3ds Max® and 3ds Max Design®

Page 4

§

§

§

Purely black surfaces are hardly found in nature, hence they should be avoided. RGB [0,0,0] could for example be replaced with [0.04, 0.04, 0.04].

Pure black (unreal)

Realistic black

Perfect reflectivity

Realistic reflectivity

Avoid perfectly reflective materials when possible. In nature, a reflectivity ratio of 0.7 is considered high. Reflectivity Color should be set to [0.7, 0.7, 0.7] instead of pure white.

When setting up glowing materials, avoid "accidents" such as diffuse color, reflectivity, transparency, bump, etc... (see "Self-Illuminating Geometries" tutorial in the video section at www.irayrender.com), as these will likely introduce noise in the image.

Glow with accidents

© 2011 NVIDIA | Preparing Content for iray® in Autodesk® 3ds Max® and 3ds Max Design®

Glow without accidents

Page 5

§

Alpha Maps embedded in textures will not be used to automatically create holes in objects. Use the Cut-Out feature of the Arch&Design shader to achieve such result.

Cut Out feature of the Arch&Design shader

GEOMETRY With iray, geometries represent physical objects, hence they will have to be modeled as such. For example, glass panels always have a thickness, they are never flat. In this section, we'll see how geometries should be modeled in order to be properly rendered by a physically accurate renderer like iray.

MODELING GLASS It is not rare to stumble across models of interiors where window glasses are made with a single thin plane. In real life, glass panels always have a thickness, even when really thin, their depth is never inconsiderable. In order to compute proper refractions, iray will expect light rays to travel through a solid geometry. When glass is modeled using flat geometry, refractions are not possible. Glass panels with zero thickness are possible in computer graphics, but do not exist in the real world. The only way for iray to render such flat glass panels, would be to use the "Thin Glass" material preset within the Arch&Design shader. With such preset, refractions will be ignored.

Arch&Design shader - Thin Glass preset

© 2011 NVIDIA | Preparing Content for iray® in Autodesk® 3ds Max® and 3ds Max Design®

Page 6

iray will be able to properly compute and render refractions when glass is modeled as a solid geometry. For example, flat window panels should be replaced with boxes. When this is the case, the Arch&Design Physical Glass preset can be used to achieve photorealistic results.

Arch&Design shader - Physical Glass preset

The following example illustrates how important it is to model glass geometries in the exact same way as they appear in real life, in order to get an accurate result with the iray render.

Light bulb modeled with a single continuous line. Once the Lathe modifier is applied, the result will be a solid geometry. When rendered with physical glass, the solid bulb will look like the above. However, the interior of a real light bulb is not made of glass.

© 2011 NVIDIA | Preparing Content for iray® in Autodesk® 3ds Max® and 3ds Max Design®

Page 7

In order to model a realistic bulb, we'll have to model a section of the glass shell. Glass always has a thickness, so we'll model a very thin external layer (see detail in the inset). When rendered with physical glass, the result will now be photorealistic.

For a more in-depth understanding of modeling glasses for iray, please see the "Materials - Glass" tutorial in the video section at www.irayrender.com

UV COORDINATES UV Coordinates should always be meaningful, especially when using anisotropy.

Anisotropic material on object with planar UV mapping.

Anisotropic material on object with spherical UV mapping.

© 2011 NVIDIA | Preparing Content for iray® in Autodesk® 3ds Max® and 3ds Max Design®

Page 8

SMOOTH CURVED SURFACES Smooth curved surfaces need a certain triangle count to avoid shadow terminator artifacts (i.e. a blocky looking shadow edge). As a rule of thumb, if the silhouette looks under-tessellated, it might yield shadow terminator problems.

Poorly tessellated geometry yields shadow artifacts.

Same object with slightly better tessellation.

Poorly tessellated objects do not look good in general.

Same object with proper tessellation.

LIGHTS With iray, all light sources contribute to the direct and indirect illumination of all objects, it is not possible to constrain the contribution of lights to specific objects.

PHOTOMETRIC LIGHTS Because of the physically accurate nature of iray, only Photometric Lights should be used, although it is possible to use Standard light types as well (Spot, Omni, Directional)3. iray supports all types of photometric lights:

3

§

Photometric Web

§

Spotlight

Standard Lights will work, but their non-physical parameters such as exponent's falloff will be ignored.

© 2011 NVIDIA | Preparing Content for iray® in Autodesk® 3ds Max® and 3ds Max Design®

Page 9

§

Uniform Spherical

§

Uniform Diffuse

and light shapes: §

Point

§

Line4

§

Rectangle

§

Disc

§

Sphere

§

Cylinder

In addition, any geometry in the scene can become a light (watch the "Self-Illuminating Geometries" tutorial in the video section at www.irayrender.com). For more information about using photometric lights with iray, please watch the "Photometric Lights" tutorial in the video section at www.irayrender.com.

ENVIRONMENT AND SUNLIGHT With iray, the environment always contributes to the scene as a light, unless it's pure black. With iray, good HDR environments are likely to contribute with great realism to the final result. When using environment lighting, it is important to follow the recommendations hereafter: §

When using Sunlight, always assign a "mr physical sky" to the environment, unless another environment is used.

Without environment (left), sunlight alone won't have any effect on the scene, since sunlight gets baked in the environment. On the right side, Sunlight is combined with a mr Physical Sky environment

4

For performance reasons, it is strongly recommended to use cylinder shapes in place of lines.

© 2011 NVIDIA | Preparing Content for iray® in Autodesk® 3ds Max® and 3ds Max Design®

Page 10

§

When using an HDR only to lit the scene, 3ds Max will automatically add a directional light, because 3ds Max will fail to recognize the HDR as a valid light source. To prevent such behavior (unless desired), it is sufficient to introduce a dummy light source with very low intensity (eg. 0.001 cd).

HDR without dummy light

§

Avoid HDRs where the sun is not as bright as in real life: they will yield washed out results. To determine whether the sun is bright enough, open the HDR with imf_disp and take a look at the value of the sun. If its anywhere below ~1000 then the sun is too dark, and the resulting light simulation will look dull.

HDR with dull sun §

HDR with dummy light

HDR with bright sun

Avoid low resolution HDRs, as the aliasing of small bright spots in the environment map will perfectly transfer into the final picture and yield artifacts, especially in the shading/lighting of objects. Low resolution HDRs should be applied the optional blur settings.

For more information about using environment lights with iray, please watch the "HDRIs" tutorial in the video section at www.irayrender.com.

© 2011 NVIDIA | Preparing Content for iray® in Autodesk® 3ds Max® and 3ds Max Design®

Page 11

CAMERAS DEPTH OF FIELD To increase photorealism, it is a good idea to make use of the camera's Depth Of Field. Using Depth Of Field does not add to the computational cost of rendering a scene. iray supports mental ray's depth of field, for more information on how to enable and control Depth Of Field, please watch the "Camera Depth Of Field" tutorial in the video section at www.irayrender.com.

Without Depth Of Field

With Depth Of Field

© 2011 NVIDIA | Preparing Content for iray® in Autodesk® 3ds Max® and 3ds Max Design®

Page 12

MORE INFORMATION For more tutorials, tips and hints

www.irayrender.com

For technical questions

forum.mentalimages.com

To stay up to date

Twitter Autodesk Area

© 2011 NVIDIA | Preparing Content for iray® in Autodesk® 3ds Max® and 3ds Max Design®

Page 13