Mental Ray Lighting

06 Jul 2010

Mental Ray IlluminationIn this beginner’s tutorial we’re going to illuminate a simple warehouse interior in 3ds Max. We’ll explore techniques to illuminate the interior through windows only. To keep things simple we’ll concentrate on lights that work with Final Gather and leave Global Illumination out of the discussion. I’m using 3ds Max 2011.


Step 1 Mental Ray Renderer

We’re going to render the scene with Mental Ray. By default 3ds Max uses the Scanline renderer so we have to change that. Change the renderer to Mental Ray ( Rendering > Render Setup… > Common tab > Assign Renderer > Production > mental ray Renderer ).

Step 2 Warehouse Geometry

This tutorial is about Mental Ray lighting but first we’ll create a really simple warehouse interior. Create a box ( Create panel > Geometry > Standard Primitives > Box ) in the top viewport . Modify the box ( Make a selection > Modify panel ) according to the following parameters:

  • Length: 20
  • Width: 20
  • Height: 10
  • Length Segs: 5
  • Width Segs: 1
  • Height Segs: 3

Creating box in 3ds Max

Step 3 Creating Windows

Next we’re going to create the windows. Add Edit Poly modifier to the box ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > Edit Poly ). Activate the polygon sub-object level, and delete two polygons in the right viewport.

Deleting polygons with Edit Poly

Activate the vertex sub-object level and move the vertices to change the size and shape of the windows according to the picture below. ( Click and drag to select a row or column of vertices at once. )

Warehouse windows

Now the geometry is complete, but since we’re going to render the interior we should flip the normals of all the polygons:

  1. Activate the polygon sub-object level
  2. Select all polygons ( CTRL + a )
  3. Go to the modify panel and click ‘Flip’ in the Edit Poly modifier ( Modify Panel > Edit Poly > Edit Polygons > Flip )
  4. Deactivate the polygon sub-object level

Step 4 Creating Camera

Create a target camera ( Create panel > Cameras > Target ) in the top viewport and apply ( Make a selection > Modify panel ) the following parameters:

  • Parameters
    • Lens: 20 ( wide angle lens is needed to get a good view of the interior )

Right-click on the Perspective view and press ‘c’ in the keyboard to change it to camera view. Move the camera inside the box to get a view like in the picture below.

Default rendering with Mental Ray in 3ds Max

Step 5 Warehouse Material

Open Material Editor ( Press ‘m’ in keyboard ) and create the material for the warehouse:

  1. Click “Get Material” button and select ( doubleclick ) ‘Arch & Design (mi)’ from the list ( Materials > mental ray > Arch & Design ).
  2. Select the warehouse and assign the material to it.
  3. Reflectivity: 0 ( perfectly matte surface )

Designin Mental Ray material

Apply diffuse and bump maps:

  1. Bump map: Composite ( Maps > Standard > Composite )
  2. Add Smoke map to the first layer of the Composite Map ( large scale details )

    Size: 0,5

    # Iterations: 20

    Color #1: Black

    Color #2:
    Dark Gray ( RGB 50, 50, 50 )

  3. Add second layer to the Composite map. Change the blending mode to Addition. Add Speckle map to the second layer ( small scale details )

    Size: 0,4

    Color #1: Light gray ( RGB 180, 180, 180 )

    Color #2: Black

  4. Add this file as a diffuse map ( Maps > Standard > Bitmap > concrete-texture-high-resolution.jpg )

Material settings for a concerete wall

And here is how the rendered interior with default lighting looks like:

Default illumination

Step 6 The Main Light Source

Now it’s the time to create the lighting. Let’s start with the main light source (sun). Create Mental Ray area spot ( Create panel > Lights > Standard > mr Area Spot ) in the front viewport. Place the spot light according to the picture below. Modify the spotlight ( Make a selection > Modify panel ) according to the following parameters:

  • Spotlight Parameters
    • Hotspot/Beam: 24
    • Falloff/Field: 26
  • General Parameters
    • Shadows: On (Ray Tracted Shadows)

( Tip: If you’d like to make the light more directional, just move the spotlight farther away from the warehouse. )

Spot light positioning

Render the image to see the lighting:

Effect of a single spotlight

Step 7 The Environment

At the moment we can’t even see the windows because the background color is black (by default). Let’s go to the environment settings ( Rendering > Environment… ) and change the background color:

  1. Click ‘None’ and select Glow ( Maps > mental ray > Glow ) from the Material / Map Browser
  2. Open Material Editor ( Press ‘m’ in keyboard ). Drag and drop the Glow shader from environment settings to an empty material slot in Material Editor ( make sure to select ‘instance’ when asked ). Make the following adjustments to the Glow shader:

    Glow: White

    Brightness: 4

Glow shader settings

Render the scene to see the effect:

light through windows

Now that we can see the windows, let’s apply a glow around them. Apply Glare Camera Shader ( Rendering > Render Setup… > Renderer > Camera Effects > Camera Shaders > Output > Glare ) Just turn the output shader on, the glare shader should be selected by default. Render the image again to see the difference. ( The use of Glare shader is the reason for using Glow shader in the background instead of just white color. )

Effect of Mental Ray Glare shader

(The glow effect might seem really strong at the moment but in my opinion it works well in the final image. You can adjust the strength of the glow by adjusting the brightness of the glow shader or by adjusting the glare shader itself.)

Step 8 Indirect Lighting

At the moment we have only the spot light (sun). The image is very dark and there is no indirect light. Create a skylight ( Create panel > Lights > Standard > Skylight ) to simulate the indirect light coming from the windows. Apply ( Make a selection > Modify panel ) the following settings to the skylight:

  • Multiplier: 1,5

Render the scene to see the lighting:

Effect of skylight

Some light reaches the ceiling over the windows but as a whole the image still looks about the same. We need to drive more light inside the warehouse. Fortunately there is an easy way to do just that. Go to the right viewport and create two sky portals ( Create panel > Lights > Photometric > mr Sky Portal ) that are slightly larger than the windows and position them immediately outside the openings. Apply ( Make a selection > Modify panel ) the following parameters to the sky portals:

  • Multiplier: 1,5 ( The strength of the light )

Mental Ray sky portal positioning

( Sky portal needs a skylight to work. It gathers existing sky lighting into the interior scene. The arrow shows the direction of light flow. ) Let’s render the scene to see how the sky portals affect the lighting:

Lighting effect of the sky portals

Let’s add bounced light to the equation to see if it makes any difference. Go to the Final Gather setup and apply the following settings ( Rendering > Render setup… > Indirect Illumination > Final Gather ):

  • Basic
    • Multiplier: 2 ( the strength of the effect )
    • Bounces: 5 ( a number of bounces indirect illumination does )

Render the scene to see the effect of indirect illumination.

Interior lighting in 3ds Max

Now there is noticeably more light inside. If you look carefully you can even see each corner of the room.

Step 10 Volume Light

Let’s make the image more interesting by adding some volumetric light rays coming from the windows. Go to the Atmosphere settings ( Rendering > Environment… > Atmosphere ) and add Volume light effect:

  1. Click ‘Add…’ button, select ‘Volume Light’ from the list and click ‘OK’
  2. Click ‘Pick Light’ and click on the mr area spot we created earlier
  3. Density: 20 ( strong effect )

Volume light settings in 3d Max

Let’s render to see the effect of the volume light:

Volumetric light

Step 11 Completing the Lighting and Rendering with Mental Ray

The Volume light seems to bring too much light into the scene. Let’s fix it by decreasing the Final Gather multiplier:

  • Rendering > Render setup… > Indirect Illumination > Final Gather > Multiplier: 1,4

Let’s also adjust the sampling settings to get a more polished render. Go to the render setup and increase antialiasing quality by increasing Mental Ray’s sampling values ( Rendering > Render setup… > Renderer > Sampling Quality ):

  • Samples per pixel
    • Minimum: 4
    • Maximum: 64
  • Filter
    • Type: Mitchell ( For most scenes the Mitchell filter gives the best results. )

Mental Ray lighting and rendering

That’s it for today. Thanks for reading!

Click to share if you like it!

120 Responses to “Mental Ray Lighting”

« Older Comments Newer Comments »
  1. Toonsta says:

    WHY doesn’t my project look ANYTHING like yours after step 6??? after I add the spot light, the whole “spot” inside gets lit up, disregarding the “windows” totally. And if final gather is on, the whole friggin room gets more or less lit up. PLEASE help, I don’t understand any of this :( Have tried countless other tutorials but there seems to be some kind of fundamental setting difference between me and everyone else. Using 3dsmax 2011.

    • Andy says:

      Your spot light needs to have shadows turned on.

    • polygonblog says:

      What Andy said. Thank you Andy! I fixed the tutorial. Originally I didn’t mention it because in 2011 the shadows are on by default.

  2. Steve says:

    Your tutorial is fantastic.. worked great and give me lots of ideas for lighting.. my only question is if you had windows all around the room would you creat more mr areaspot one for each side of the room that has light and then adding the others as volume lights or would this be too much?
    thanks,
    Steve

    • polygonblog says:

      The spotlight represents the sun so I wouldn’t create more of them. I would just create new sky portal for each window.

      • Steve says:

        I tried that Looks good but still find the inside of the room a bit dark.. any ideas.. can i send you a screen capture?
        Steve

    • polygonblog says:

      If the room is dark, just increase diffuse bounces or multiplier in final gather or multiplier in sky portals or skylight.

  3. Jobearth says:

    Hi,

    I was looking for lighting tutorials and came into this page, nice tutorial. I just learned about volume light and flip thingy and indirect illumination.
    I was wondering, if by any chance you have and exterior lighting tutorial, most settings I find are interiors. I have a new project, an exterior especial setting with furniture and fixtures with it and it is kinda hard to make a good lighting for my scenes..
    Just by any chance if you have, thanks guys! :)

    Jobs

  4. Dedi says:

    Great!

  5. Dedi says:

    I propose to add an Ambient Occlusion in warehouse material in Special Effect and pick Exact AO.
    Try, looks much better.
    Thanks for tutorial!

  6. Ali F iran says:

    Very, very Great. Thank you 4 this tutorial.

  7. stradela F iran says:

    that was so nice,thanx dude,keep going on ;)

  8. Dave Drumstick says:

    Bro, will you ever make a tutorial for NURBS?

    :D

    thanks for al these tutorials :)

  9. Man this is very helpfull thanks!!!

  10. Ahren says:

    Nice tutorial man, quick easy and well done. Keep them up

  11. MemoNick says:

    Can you use Daylight(Mr Sun) instead, for light?

  12. saince says:

    Great Tuto but i have an DB 0.3 fatal error after step 10.
    Before i add volume light effect, the rendering process worked, but ater i have this fatal error.
    I made this tuto on 3ds max 2010.

  13. farshid says:

    tanks a lot !!!:)

  14. Lakshman says:

    that is an awesome tut…haven tried it but looks promising…can u make a similar tutorial for maya cause i have been tryin to get any type of rays in MR but seems impossible…

  15. Sam says:

    first thanks for this tut. but my project just does not look anything like yours after step 6? did i miss something?

    after the mr spot nothing looked the same! :(

    • polygonblog says:

      Make sure shadows are turned on in your spotlight.

  16. Max says:

    Awesome tutorial…my first fully complete scene using 3ds Max and its looking awesome. I’m new to 3D design and was curious about step 3; what would have been the result had we not flipped the normals of all the polygons…does it have to do with where the mapped materials/textures would appear? (please excuse my lack of initiative)

    • polygonblog says:

      Thanks Max! By default material only appears on one side of a polygon. Additionally only the visible side casts shadows, at least with standard materials.

  17. Nicholas says:

    Coming up just to say a BIG thank you for those tutorials. It improved my skills so much (yes, I’m a beginner).

    THANK YOU (a big one this time).

  18. john says:

    Great tutorial thank you for providing this. I followed it once and it came out looking the way I wanted.
    However
    the second time I tried it, I couldn’t get the render to look the way it did with smooth volume light shining into the room.
    Instead
    what I got was a staggering, stuttering appearance of light coming into the room. It’s as if the light thought it was hitting a surface multiple times between the window and the floor, so there are rectangular traces of light surrounding the light path.
    I asked my peers about this problem and they say it looks like there is something going on while the render is going through one of its passes? I can’t seem to re-create the success of my first attempt.

  19. Dave says:

    Thank you very much I actually used this tutorial to make a cool looking garage for my car I made. very helpful.

  20. Tiff says:

    My mr Area Spot light doesn’t seem to be working, and I’ve no idea why. It appears to work in the modelling window, but when I try to render the scene there’s no light coming from it, there’s only the light coming through the windows. What am I doing wrong??

  21. kuni says:

    heeeiiieeee….

    thanks a lot for sharing such an interesting piece of knowledge with us….
    it is really helpful to me…!!!

    :)

  22. MoBo says:

    Very nice tutorial, the outcome is realy impressive. I just can’t figure out how you created the light with Ray Traced Shadow which has the soft edge shadows.
    Thanks very much

  23. Samantha says:

    Hi, May i know how & where to adjust the glare shader ?

  24. Samantha says:

    Hi, And the file take quite long time to render when i try the tutorial in my interior with furniture …is that have any solution to lighten my file size ?
    Thank you so much ~ and i like your tutorial ~ look cool ~with clear explanation

  25. parisa says:

    my Question is? why did not creat daylight Instead of skylight in the artwork.

    Thanks very much

  26. Samantha says:

    Hi,May i know How to create hidden light at ceiling ?

  27. Samantha says:

    Hi, i try to apply this render method on a enclose room .. there is no window .. n after render is quite dark.. do have any other light can lighten up the place ? Thank you so much

  28. Hennerz says:

    Hi All, I just had a go of this tutorial, very good good amount of info and picutres. However I don’t get the same results?!?!
    My volumetric light is pixelated and i don’t have as much shadowing in the room. Also with the ‘sun’ hotspot and beaam fall off 24/26 i don’t get any feathering on the cast shadow?

    Just wondering is there any other details I may have missed, also does volumetric thing take a very long time to process? I have new machine with oodles of power oodles! but seemed rather slow, 10mins at 640×480

    Many Thanks Hen

  29. 111 says:

    Excellent Tutorial Clear and well laid own! Thanks

  30. dilesh says:

    great work done…. its really learning one..good keep it up

  31. Rohit says:

    Great tutorial. I got a satisfactory result even in 3Ds Max 7. Though I prefer making rooms using shell modifies than flipping normals. I had absolutely no idea about volume lights. Thanks to your tutorial, now I do know.

  32. Nonserial says:

    Really nice Tutorial!

    I’m not surte what i make out of it but we’ll see XD

  33. Thomas Braithwaite says:

    Thanks a lot, really gave me a good insight into various lighting techniques :)

    Also, I couldn’t find “warehouse” when using the Arch+Design thing :/

  34. 3dsmax says:

    Need more!!! ha I’m trying to learn as much as I can about mental ray :D

  35. Mukul says:

    Great Tutorial !

    Thanks a ton

  36. Mukul says:

    Here is my render .

    This is my result: file:///C:/Users/Mukul/Desktop/Polygon%20Works/new%20one%20lighting.jpg

  37. john says:

    Can any body help me to get a window glare..even if I turn the output shader on..I get nothing, seem something wrong.
    Do I have to select anything before a applying that? or to do the camera?

    I really need your help.

    Thanks in Advance.

  38. M says:

    Great tutorial. really appreciate that you show a sample render after each step, so we can understand where things went wrong if the final render doesn’t come out right. I also really appreciate that the tutorial doesnt require any special plug-ins. Thanks!

  39. Robiin says:

    Hey Guys.
    I did exactly the same as you described in your tutorial with Max 2010. I’ve even used the same values. But here’s my result:

    http://s7.directupload.net/file/d/2584/mvmvkdxp_jpg.htm
    I think my standart settings are false…

    Please help me, I need the Room for an Intro i watn to create.

    Thanks in advance,

    Robin

  40. NM says:

    oooooh..how great are you..thank you very much..i’v been suffering to know this without going crazy with too many steps..you just made it clear and simple..i hope you have more tutorials..i’m enjoying lighting for the 1st time ..thanks alot

« Older Comments Newer Comments »

Leave a Reply