INSIDE 3DS MAX® 7 [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

INSIDE 3DS MAX® 7 [Electronic resources] - نسخه متنی

Adobe Creative Team

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید











  • mental ray


    mental ray version 3.3 is a completely separate rendering package written by mental images (www.mentalimages.com) (Figure 20.36). This is industrial-grade software that has been used in movies like The Matrix Reloaded, Star Wars: Episode IIAttack of the Clones, and Terminator 3: Rise of the Machines. In February 2003, the Academy of Motion Picture Arts and Sciences recognized mental images for technical achievement.

    Figure 20.36. mental ray's quality can be seen in this illustration, or in the stillLifeMR.jpg file on the DVD. Note the light spilling out under the crystal ball.

    As you might guess, technical usage of mental ray is a vast subject, well beyond the scope of this book. We'll take a tour of the main features and get a good starting place for additional study; more information resources are provided at the end of the section.

    mental ray's primary features are as follows:

    • Global illumination

    • Caustics (light cast onto another surface by either reflection or refraction)

    • Soft shadows

    • Area lights

    • Vector-based motion blur

    • Motion-blurred shadows

    • Real-world depth of field

    • Extensive shader language


    mental ray is fully hyperthreaded, so having a multiprocessor setup will significantly increase rendering speeds. This translates to having four buckets working at a time with a dual-processor machine, compared with a single bucket on a single-processor machine.

    One thing that 3ds max users will find tough to get used to is the limited licensing of mental ray. Each copy of 3ds max 7 ships with two licenses. A license is good for one processor. So, if you wish to implement mental ray on a multiple-machine render farm, additional licenses must be purchased from discreet.

    Even though mental ray renders from within 3ds max, you can still write out a native-format .mi file to render on a non3ds max mental ray setup. This can come in handy, as mental ray has been integrated into Softimage|XSI, Maya, Side Effects Software's Houdini 5, SolidWorks PhotoWorks 2, and Dassault Système's CATIA V4 and V5 products.

    mental ray has special instances built into various parts of the 3ds max interface that need to be covered in order. First off, choose mental ray as the default Production renderer by scrolling to the bottom of the Render Scene panel. Click the Assign Renderer rollout, click the … button, then choose mental ray Renderer.

    mental ray Lights


    mental ray can use all 3ds max light types, but the rendering really shines when using the area lights. These lights provide for natural-looking soft shadows by causing the light to emit from a 2D plane in space rather than from a point. mr Area Omni and mr Area Spot are accessed from the bottom of the Object Type area of the Lights Create panel.

    Note

    If you can't see any of the mental ray Extensions in the Light parameters (or Materials), you need to enable them. Choose Customize > Preferences and select mental ray, and check the Enable mental ray Extensions box. mental ray should also be chosen as your Production renderer.

    Converting 3ds max Lights to mental ray Lights


    You can convert one or all of your 3ds max lights to mental ray area lights by using a scripted utility in the following manner:


    1.

    Select one or more lights.

    2.

    Go to the Utilities panel. Click the MAXScript button.

    3.

    When the MAXScript rollout opens, choose Convert to mr Area Lights from the Utilities drop-down list at the bottom.

    4.

    When the rollout comes up, click Convert Selected Lights. You have the choice whether to delete the original light. If you leave the original light, you will have double the lighting power.


    Raytraced shadows are a good place to start when using area lights. Down in the Area Light Parameters rollout, of critical importance is the Height and Width (or Radius, with a Cylinder type) spinner. You should look for the blue line as you turn the spinner; this will give you an idea of the size of your light source. Bigger light sources make for greater blurring of the shadow's edge and extend rendering time (Figure 20.37).

    Figure 20.37. Adjusting the size of the area light.

    mental ray Materials


    3ds max materials can translate straight over to mental ray and then profit from some tweaking. Using the physically accurate shaders in conjunction with mental ray materials will give a more realistic look to your renderings. There is precise control over individual components, such as shadows and photon caustics. This allows you to dial in exactly the look that you're going for (Figure 20.38).

    Figure 20.38. The material parameters area of a standard material, in the mental ray Connection rollout (at the bottom of the Material Editor).

    3ds max comes equipped with three sets of shader libraries: the standard mental ray libraries, a specialized set for 3ds max, and the LumeTools collection. All of these try for a physically correct version of a particular surface. The term shader has a far more expanded meaning in mental ray than it does in the standard materials interface.

    When you have placed a mental ray material in the slot, and you click a map button, an expanded version of the Material/Map Browser allows for access to a wide variety of mental ray effects. A good place to start is the DGS Material in the Surface slot. DGS stands for Diffuse, Glossy, Specular. This material is a mental ray phenomenon (a preprogrammed shader) that provides a physically accurate simulation of a surface. It is the "vanilla" materialone that works for most objects. If you try to put a bitmap directly in, the object won't shade properly.

    Note

    Using Displacement shading is somewhat similar to using the standard mapped material, and much more efficient in memory overhead.

    mental ray also supports 3ds max's Ink 'n Paint toon shader. The results are almost indistinguishable from those of the standard Default Scanline Renderer, but mental ray is far faster (Figure 20.39).

    Figure 20.39. Our Spaceman, rendered with mental ray. Time: 38 seconds. The same file took 4 minutes, 35 seconds to render with the scanline renderer. (Compare spaceman.jpg with mrspaceman.jpg on the DVD.)

    mental ray Rendering Setup


    When you are ready to render, you may notice a number of changes to the Render Scene dialog. In looking at the Indirect Illumination panel, you can see that there are quite a few references to photons. mental ray uses photons to bounce around global illumination and caustics. The overall power of the photons is controlled with the Global Energy Multiplier spinner at the bottom of the panel. Photons have nothing to do with brightness in the scene, but they can confuse neophyte mental ray users. Not setting up properly for the rendering can have frustrating consequences.

    Here's the sequence of events to get good caustics and global illumination renderings:


    1.

    Open the file called diamond01.max from the DVD. Choose File > Save As, point to an appropriate subdirectory on your hard drive, and use the plus-sign button to save a new file with the name incremented to diamond02.max.

    2.

    Try test-rendering the Camera viewport. You should see a picture of the diamond, using the GemstoneDiamond material from the RayTraced_02.mat Material Library. A sunset environment map has been applied, as well (Figure 20.40).

    Figure 20.40. The diamond, rendered at 640 by 480 with the scanline renderer. Time: 17 seconds (diamond01.jpg on the DVD).

    3.

    Open the Render Scene dialog and scroll to the bottom of the Common panel. Open the Assign Renderer rollout. Click the … button next to Production, and choose mental ray Renderer from the available selections.

    Try another test render with mental ray. The picture won't change much, but the rendering time goes down. There's still more work to do to get the diamond to really sparkle.

    Next, let's change the material to something more physically accurate. We'll be using the mental ray Glass Phenomena material that ships with 3ds max 7.

    4.

    Press the M hot key to open the Material Editor. Click the first material swatch to select it. Click the Standard button to open the Material/Map Browser. From the list, select the Glass (physics_phen) material.

    Notice how the materials that are mental rayspecific have a yellow ball in front of them, as opposed to the familiar blue ball. If you had wanted to build your own mental ray material, selecting it as the material type would have presented you with the starting place.

    5.

    In the Glass (physics_phen) Parameters rollout of the Material Editor, set the Index of Refraction to 2.5, which is the approximate value of the IOR of diamonds in the real world. Drag and drop the glass material onto the diamond. Close the Material Editor.

    Try another test render. Now the diamond looks much deeper and has internal reflections (Figure 20.41). Next we'll attack that stark shadow.

    Figure 20.41. The diamond now has a physically accurate material. Time: 7 seconds. (diamond03.jpg on the DVD.)

    6.

    From the Utilities panel, select MAXScript. Down in the MAXScript rollout, select Convert to mr Area Lights. Select the spotlight in the scene, and click the Convert Selected Lights button. Click Yes to delete the old light.

    7.

    Select the light and open the Modify panel. The light's previous settings have been maintained, but we need to open the Area Light Parameters rollout. Change the type to Disc, and gradually increase the Radius spinner to about 70. Be sure to notice the blue circle around the light in one of the viewports as you work the spinner. This is a good way to eyeball the size of the area light when you build your own scenes. Set the Samples in both U and V to 10. In the Shadow Parameters rollout, set the Density spinner to 0.5

    When you test-render, you should see a big difference in the Ray Traced shadow being cast by the diamond. The area light has provided a realistic soft shadow (Figure 20.42). Next, we open the Render dialog to do our setup.

    Figure 20.42. The diamond casts a soft shadow. Time: 41 seconds. (diamond04.jpg on the DVD.)

    Note

    You need to be careful where you point light sources when rendering with mental ray. If a light is pointed off into space with nothing to stop the photons, an error will result. If you absolutely have to point your light this way, the best thing to do is surround your scene with a large sphere with the normals reversed. This will catch any stray photons and also allow your scene to render faster.

    8.

    Open the Render Scene dialog and go to the Indirect Illumination panel. Click the Enable box in the Caustics section.

    If you were to try to render, you would get an error message saying that there aren't any caustic generators in the scene. The generators are assigned on an object-by-object basis.

    9.

    Click the light, and Control-click the diamond. Right-click to bring up the Quad menus, and select Properties from the lower right.

    10.

    Go to the mental ray panel and click on Generate Caustics; make sure that both Global Illumination check boxes are checked (Figure 20.43).

    Figure 20.43. Turning on caustic generation for the diamond and the light.

    11.

    Back in the Indirect Illumination panel, click the Enable box in the Global Illumination area. Next, scroll to the bottom of the rollout to the Light Properties area. Increase the Global Energy Multiplier value to 10, and reduce the Decay to 1.5.

    Now the rendering really shines, with the generated caustics kicking the refracted light out of the diamond. mental ray did a separate photon emission pass before rendering to figure out the GI and caustics (Figure 20.44).

    Figure 20.44. The diamond is spectacular now, with the caustics rendering. Time: 1 minute, 24 seconds. (diamond05.jpg on the DVD.)

    We can take this image still further. Using Final Gather will bring in some color bleed from the sunset environment and add details into the caustics.

    Note

    mental ray doesn't respect the Exclude option in lights when it comes to photons. If you try to Exclude a lightbulb from the light source inside it, no photons will be cast and an error will result. This doesn't affect the lighting in the scene at all; it can be tricky to troubleshoot.

    12.

    In the lower half of the Indirect Illumination panel, check the Enable box in Final Gather. Reset the Samples to 100. In the Trace Depth area, set Max Reflections and Max Refractions to 12. Render out the final image.

    You can look at the file diamondFinished.max from the DVD if you have had any problems with your version of the setup (Figure 20.45).

    Figure 20.45. Additional fine details have shown up in the refractions and caustics of the diamond rendering. Time: 1 minute, 22 seconds. (diamond06.jpg on the DVD.)


    Much of the power of mental ray can be unlocked through careful experimentation. We've only scratched the surface of the possibilities of this pro-grade rendering solution. The stillLifeMR.max file is on the DVD to aid in your exploration.

    Additional mental ray Information


    Tutorials can be found at


    • / 193