rendering with mental ray and 3ds max - elsevierfront_matter.pdfrendering with mental ray® and 3ds...

11
Rendering with mental ray ® and 3ds Max

Upload: others

Post on 17-Mar-2020

23 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Rendering with mental ray and 3ds Max - ElsevierFront_Matter.pdfRendering with mental ray® and 3ds Max Second Edition Joep van der Steen Ted Boardman AMSTERDAM • BOSTON • HEIDELBERG

Rendering with mental ray® and 3ds Max

Page 2: Rendering with mental ray and 3ds Max - ElsevierFront_Matter.pdfRendering with mental ray® and 3ds Max Second Edition Joep van der Steen Ted Boardman AMSTERDAM • BOSTON • HEIDELBERG
Page 3: Rendering with mental ray and 3ds Max - ElsevierFront_Matter.pdfRendering with mental ray® and 3ds Max Second Edition Joep van der Steen Ted Boardman AMSTERDAM • BOSTON • HEIDELBERG

Rendering with mental ray® and 3ds Max

Second Edition

Joep van der Steen

Ted Boardman

AMSTERDAM • BOSTON • HEIDELBERG • LONDON • NEW YORK • OXFORDPARIS • SAN DIEGO • SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO

Focal Press is an imprint of Elsevier

Page 4: Rendering with mental ray and 3ds Max - ElsevierFront_Matter.pdfRendering with mental ray® and 3ds Max Second Edition Joep van der Steen Ted Boardman AMSTERDAM • BOSTON • HEIDELBERG

Focal Press is an imprint of Elsevier 30 Corporate Drive, Suite 400, Burlington, MA 01803, USA Linacre House, Jordan Hill, Oxford OX2 8DP, UK

© 2010 ELSEVIER Inc. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or any information storage and retrieval system, without permission in writing from the publisher. Details on how to seek permission, further information about the Publisher ’ s permissions policies and our arrangements with organizations such as the Copyright Clearance Center and the Copyright Licensing Agency, can be found at our website: www.elsevier.com/permissions .

This book and the individual contributions contained in it are protected under copyright by the Publisher (other than as may be noted herein).

Notices Knowledge and best practice in this fi eld are constantly changing. As new research and experience broaden our understanding, changes in research methods, professional practices, or medical treatment may become necessary.

Practitioners and researchers must always rely on their own experience and knowledge in evaluating and using any information, methods, compounds, or experiments described herein. In using such information or methods they should be mindful of their own safety and the safety of others, including parties for whom they have a professional responsibility.

To the fullest extent of the law, neither the Publisher nor the authors, contributors, or editors, assume any liability for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions, or ideas contained in the material herein.

Library of Congress Cataloging-in-Publication Data Steen, Joep van der. Rendering with Mental Ray and 3Ds Max / Joep van der Steen, Ted Boardman. — 2nd ed. p. cm. ISBN 978-0-240-81237-3 1. Computer graphics. 2. Computer animation. 3. Mental ray (Computer fi le) 4. 3D studio. 5. Three-dimensional display systems. I. Boardman, Ted. II. Title. T385.S744 2009 006.6 — dc22 2009029542

British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library.

ISBN: 978-0-240-81237-3

For information on all Focal Press publications visit our website at www.elsevierdirect.com

09 10 11 12 13 5 4 3 2 1

Printed in Canada

Working together to grow libraries in developing countries

www.elsevier.com | www.bookaid.org | www.sabre.org

Page 5: Rendering with mental ray and 3ds Max - ElsevierFront_Matter.pdfRendering with mental ray® and 3ds Max Second Edition Joep van der Steen Ted Boardman AMSTERDAM • BOSTON • HEIDELBERG

v

Acknowledgments

Joep and I would like to acknowledge Steffen Roemer at Mental Images for keeping us on the straight and narrow technical path in regards to mental ray.

Also, we ’ d like to thank Chris Simpson and his staff at Focal Press for all the help in turning the pages we generate into a real book. Wrangling one author through the process of producing a book is diffi cult, but having two authors makes it three times as hard.

Mostly, we thank you, the reader, for having enough confi dence in Joep and me to purchase the book.

Dedication

Ted Boardman would like to dedicate this book to Sally Turner for over 30 years of companionship.

Page 6: Rendering with mental ray and 3ds Max - ElsevierFront_Matter.pdfRendering with mental ray® and 3ds Max Second Edition Joep van der Steen Ted Boardman AMSTERDAM • BOSTON • HEIDELBERG

Image created by Bryan K. Woods.

Page 7: Rendering with mental ray and 3ds Max - ElsevierFront_Matter.pdfRendering with mental ray® and 3ds Max Second Edition Joep van der Steen Ted Boardman AMSTERDAM • BOSTON • HEIDELBERG

vii

Contents

Chapter 1: Getting Started with mental ray® in 3ds max 11.1 Introduction 11.2 Getting started 2

1.2.1 Setting 3ds max and 3ds max Design interface and defaults 21.2.1.1 Switching defaults and user interface 3

1.2.2 Units in 3ds max 31.2.2.1 Setting display and system units in 3ds max 3

1.3 Concepts 51.3.1 Global illumination 5

1.3.1.1 Direct light 61.3.1.2 Bounced light 61.3.1.3 Environment light 71.3.1.4 Shadows 71.3.1.5 Materials and shaders 7

1.3.2 Final gather 81.3.3 Photons 81.3.4 Exposure control 81.3.5 Ambient occlusion 91.3.6 Gamma correction 9

1.4 Companion website 9

Chapter 2: Rendering with mental ray® 112.1 Introduction 11

2.1.1 Gamma correction 112.1.2 Indirect illumination 12

2.1.2.1 Final gather 122.1.2.2 Global illumination 12

2.1.3 Ambient occlusion 132.1.4 Render presets 14

2.2 Gamma correction 142.2.1 Enable gamma correction 15

2.3 Indirect illumination 152.3.1 Final gather—Exterior scene 17

2.3.1.1 Enabling fi nal gather 182.3.1.2 Render Frame Window 202.3.1.3 Render Preset 20

Page 8: Rendering with mental ray and 3ds Max - ElsevierFront_Matter.pdfRendering with mental ray® and 3ds Max Second Edition Joep van der Steen Ted Boardman AMSTERDAM • BOSTON • HEIDELBERG

Contents

viii

2.3.1.4 Image Precision (Antialiasing) 242.3.1.5 Area to Render 262.3.1.6 Trace limits 282.3.1.7 Monochrome button 29

2.3.2 Final gather—Interior daylight 312.3.2.1 Interior scene with direct light 322.3.2.2 Final gather with bounces 33

2.3.3 Global illumination—Interior daylight 362.3.3.1 Enabling global illumination 382.3.3.2 Systematically increasing Photons per Sample and Radius 39

2.3.4 GI and FG combined 432.3.4.1 Applying fi nal gather to a global illumination scene 43

2.3.5 Ambient occlusion 442.3.6 Render presets 47

Chapter 3: mental ray® and lights 513.1 Introduction 513.2 Standard lights 52

3.2.1 Rendering in mental ray with standard lights 523.2.1.1 Standard lights with shadows 533.2.1.2 Mixing standard lights and photometric daylight 55

3.3 Photometric lights 563.3.1 Target photometric lights 57

3.3.1.1 Adding and adjusting photometric lights 573.4 Sky portal 60

3.4.1 Channeling daylight with a Sky Portal 603.4.1.1 Sky Portal 61

3.4.2 Sky Portal and scene environment 623.4.2.1 Sky Portal artifacts 64

3.5 Daylight system and Physical Sky shader 643.5.1 Creating a scene using the mr Physical Sky shader 65

3.5.1.1 Placing a Daylight system with Physical Sky background 653.5.2 Haze and clouds 68

3.5.2.1 Adjusting the haze in the sky 683.5.2.2 Using a background image 71

Chapter 4: mental ray® and materials 774.1 Introduction 774.2 Arch & Design material 78

4.2.1 Arch & Design templates 794.2.1.1 Setting Arch & Design templates 79

4.2.2 Controlling refl ections 804.2.2.1 BRDF control of refl ections 81

Page 9: Rendering with mental ray and 3ds Max - ElsevierFront_Matter.pdfRendering with mental ray® and 3ds Max Second Edition Joep van der Steen Ted Boardman AMSTERDAM • BOSTON • HEIDELBERG

Contents

ix

4.2.3 Self-illumination 824.2.3.1 Self illuminating headlights 83

4.2.4 Cutout maps 844.2.4.1 Cutout maps for transparency 84

4.2.5 Ambient Occlusion 854.2.5.1 Ambient occlusion for contrast 86

4.2.6 Round corners with Arch & Design materials 874.2.6.1 Arch & Design round corners 87

4.3 Car Paint material 884.3.1 Fancy paint for the hot rod 88

4.3.1.1 Experimenting with Car Paint material 884.4 ProMaterials 904.5 Multiple materials on single objects 90

4.5.1 Multi/Sub-Object material type 914.5.1.1 Material ID numbers 924.5.1.2 Multi/Sub-Object material 94

4.5.2 Masking techniques 974.5.2.1 The Blend material 974.5.2.2 Adding a Mask map to Blend material 99

4.5.3 Utility Bump Combiner 1034.5.3.1 Masking glossiness and refl ections at the map level 1044.5.3.2 Combining bump maps in Arch & Design material 107

Chapter 5: mental ray® and shaders 1115.1 Introduction 1115.2 Material/Surface shaders 112

5.2.1 Landscape shader 1125.2.1.1 Applying and adjusting a Landscape shader 112

5.2.2 Water surface shaders 1155.2.2.1 Materials for a water surface 1165.2.2.2 Adding bumps for waves 1195.2.2.3 Stain Underneath 121

5.2.3 Water shadow 1235.2.3.1 Water Surface Shadow shader 123

5.2.4 Multi/Sub-Map 1255.2.4.1 A different use of Multi/Sub-Map shader 125

5.3 Volume shaders 1285.3.1 Submerge shader 128

5.3.1.1 Applying a Submerge shader 1285.3.2 Parti Volume shader 131

5.3.2.1 Parti Volume shader to defi ne a volume 1315.4 mr Shader Element 133

5.4.1 Ambient Occlusion shader element 1335.4.1.1 mr Shader Element creates an external fi le 133

Page 10: Rendering with mental ray and 3ds Max - ElsevierFront_Matter.pdfRendering with mental ray® and 3ds Max Second Edition Joep van der Steen Ted Boardman AMSTERDAM • BOSTON • HEIDELBERG

Contents

x

5.5 Camera shaders 1365.5.1 Mist shader 136

5.5.1.1 Applying and adjusting a Mist shader 1375.5.2 Shader list 139

5.5.2.1 A Shader list to hold multiple shaders 1395.5.3 Beam shader 141

5.5.3.1 Adding a Beam shader to the Shader list 1425.5.4 Night shader 143

5.5.4.1 Using a Night shader to fool the eye 1435.6 Hidden shaders 145

Chapter 6: Special effects 1496.1 Introduction 1496.2 Materials and shaders effects 150

6.2.1 Animated maps 1526.2.1.1 Accurately sizing an animated mask map 153

6.2.2 Using animated maps as masks 1566.2.2.1 Masking the Blend material 157

6.2.3 mental ray material and Material to Shader map 1596.2.3.1 3D Displacement with Blend material in mental ray 159

6.3 Lighting effects 1616.3.1 Caustics effects 162

6.3.1.1 Refl ective caustics 1636.3.1.2 Refractive caustics 165

6.3.2 Volumetric effects 1676.3.2.1 Adding volume to blinking lights 167

6.4 Rendering effects 1716.4.1 Atmospheric effects 171

6.4.1.1 Fire Effect 3D clouds 1726.4.2 Motion blur effect 176

6.4.2.1 Enabling motion blur object properties 1766.4.2.2 Enabling motion blur in the renderer 1786.4.2.3 Fast Rasterization for rendering effi ciency 1806.4.2.4 More motion blur 181

6.4.3 Depth of fi eld 1836.4.3.1 Depth of Field (mental ray) 1836.4.3.2 Depth of Field (mental ray) in the real world 186

6.4.4 Contour rendering 1886.4.4.1 Contour renderer component 1886.4.4.2 Contour material component 1906.4.4.3 Contour Composite (contour) shader 1916.4.4.4 Contour material shaders 194

Page 11: Rendering with mental ray and 3ds Max - ElsevierFront_Matter.pdfRendering with mental ray® and 3ds Max Second Edition Joep van der Steen Ted Boardman AMSTERDAM • BOSTON • HEIDELBERG

Contents

xi

6.4.5 Matte/Shadow/Refl ections shader 1966.4.5.1 Viewport background 1976.4.5.2 Environment background 1996.4.5.3 Matte/Shadow/Refl ections (mi) material 2036.4.5.4 Product rendering against a white background 205

6.5 Viewport effects 2076.5.1 Introduction to mr Proxy objects 2086.5.2 Geometry proxy 208

6.5.2.1 Creating a mr Proxy 2096.5.3 Creating multiple proxies at once 2126.5.4 Using mr Proxy in Particle Flow 212

Chapter 7: Revit and mental ray® 2157.1 Introduction to Revit 2157.2 FBX import 216

7.2.1 FBX tips 2167.2.1.1 Import FBX fi le 2167.2.1.2 Scene troubleshooting 218

7.3 ProMaterials 2197.3.1 ProMaterial type 220

7.3.1.1 A look at ProMaterials 2207.3.2 Imported ProMaterials 222

7.3.2.1 Imported ProMaterials 2227.3.2.2 ProMaterials can be infl exible 224

7.4 Large scenes 2257.4.1 Effi ciency 226

7.4.1.1 Objects and polygons 2267.4.2 Coordinate systems 228

7.4.2.1 Centering a scene on the 3ds Max origin 2287.5 Camera composition 231

7.5.1 Rule of Thirds 2327.5.2 Camera shots 235

7.6 Architectural animation 2377.6.1 Camera motion and scene editing 238

7.6.1.1 Camera motion 2387.6.1.2 Scene editing 238

7.6.2 Flicker-free animation 2397.6.2.1 Flicker reduction for animation 239

Summary 240

Index 241