{"id":259,"date":"2008-12-04T18:03:13","date_gmt":"2008-12-05T00:03:13","guid":{"rendered":"http:\/\/www.mrbluesummers.com\/?page_id=259"},"modified":"2010-07-02T18:33:03","modified_gmt":"2010-07-02T18:33:03","slug":"introductory-mental-ray-lighting","status":"publish","type":"post","link":"http:\/\/www.mrbluesummers.com\/259\/3d-tutorials\/introductory-mental-ray-lighting","title":{"rendered":"Introductory mental ray Lighting"},"content":{"rendered":"

For this tutorial, we\u2019re going to explore mental ray by making a simple room and lighting setup. I\u2019ll be using 3dsMax 9 but you can follow along with any version. I’m also including my finished file so you can pick it apart if it suits you.<\/p>\n

\"Final<\/a><\/p>\n

Our final render, after some materials and direct light.<\/p>\n<\/div>\n

Mental Ray Room<\/a><\/p>\n

Now I’m assuming a low, but non-zero level of previous knowledge during this tutorial. Specifically, that you’ve been using scanline for a few days or weeks and would like to extend your knowledge to include mental ray. While I’ll include images and try to go step-by-step, Remember that mental ray isn’t for those just starting the program for the first time.<\/p>\n

Step 1: Build a box and flip its normals.<\/h2>\n

I\u2019ll start off by making a box that\u2019s 200x100x70 that\u2019s the basis of my room.<\/p>\n

Convert it to an editable poly object by right clicking and selecting editable poly.<\/p>\n

Select all the polygons and in the Edit Polygons rollout, select \u201cFlip\u201d.<\/p>\n

\"Box<\/a><\/p>\n

Create a box with flipped normals.<\/p>\n<\/div>\n

Step 2: Make some windows and details.<\/h2>\n

Feel free to deviate slightly from the tutorial at this point if you\u2019re feeling confident. I\u2019m going to create a single window at one end of the long-ish room. However, you could do some pretty ambitious stuff with the roof, creating a long skylight and then putting up rafters and plants. Oh my! But for me, and for the sake of some beginners out there, I\u2019m going to keep it easy and direct for now.<\/p>\n

Select the polygon at the end of the hall and inset it, then extrude it with a negative value. If you want to resize the window you can. I\u2019ve selected the bottom polygon of the window sill and moved it up a bit.<\/p>\n

Delete this polygon. This will form our window!<\/p>\n

\"A<\/a><\/p>\n

Cut out a window for the room.<\/p>\n<\/div>\n

Select the floor polygon. Inset it a little bit, and then extrude it down to form a baseboard. This is a minor stylistic thing that always adds a little realism to the room! I’ve also taken the artistic liberty of raising the base of the window a little higher.<\/p>\n

\"Create<\/a><\/p>\n

Create a border for the floor.<\/p>\n<\/div>\n

Now we have the makings of a basic room. Go ahead and save your work. Always a good practice.<\/p>\n

Step 3: Switch to mental ray and create some lights.<\/h2>\n

We need to enable the mental ray renderer, since the scanline is being used by default. Hit F10 for your render settings panel and under the \u201cCommon\u201d tab in the \u201cAssign Renderer\u201d rollout, hit the \u201c\u2026\u201d next to production and select t the mental ray renderer. For a shortcut, in the little pink box in the lower left corner you can type<\/p>\n

    renderers.production = mental_ray_renderer()<\/pre>\n

Super! Let\u2019s get some lights in here. Under your create panel, go to the lights group, and select an \u201cmr area omni\u201d. Place it at the base of your window sill in the perspective viewport. Move it up so that it\u2019s just outside your window.<\/p>\n

\"Now<\/a><\/p>\n

Now for some lights!<\/p>\n<\/div>\n

Step 4: Scene adjustment.<\/h2>\n

Take a render (Shift-Q). Hmm\u2026not quite what we want yet, is it? That’s ok, I know just the trick!<\/p>\n

\"The<\/a><\/p>\n

Not quite what we expected.<\/p>\n<\/div>\n

For starters, we need the polygons of the room to be double sided so that light doesn\u2019t leak in from the walls. Hit your hotkey \u201cM\u201d and open the material browser. Drag and drop any grey material from the browser onto your room object and the material will be applied. Select the \u201c2-sided\u201d checkbox in the material you just dragged over.<\/p>\n

\"Use<\/a><\/p>\n

Create and use a 2 sided material.<\/p>\n<\/div>\n

If you render again, you\u2019ll realize that now we can\u2019t see inside the room! That\u2019s because the walls are now impenetrable. We need a camera on the inside of the room. Under your create tab, go to the cameras group and create a target camera inside the room by clicking and dragging.<\/p>\n

You can switch to this camera by pressing the \u201cC\u201d key. Reposition the camera if you feel the need to. It was likely created at ground level, and that\u2019s not quite right.<\/p>\n

Now if you render you get a much better perspective on things. If you\u2019re having trouble, it could be because the camera is not entirely inside the room, or it\u2019s not pointed in the right direction.<\/p>\n

Next, go ahead and hit your \u201c8\u201d key or go to the tool bar \u201cRendering\u201d>\u201dEnvironment\u201d and click the black swatch under background color. Pick a very light blue color. That will make it look a little more like the light coming in the room is real.<\/p>\n

\"Pick<\/a><\/p>\n

Pick an outdoors-y color.<\/p>\n<\/div>\n

Step 5: Use Final Gather.<\/h2>\n

Re-render the image, and you\u2019ll see that it\u2019s looking even better now!<\/p>\n

\"Our<\/a><\/p>\n

Our second render's looking good.<\/p>\n<\/div>\n

But something is still off with the light. I bet if we enable final gather it\u2019ll look twice as good! Final gather is a light bouncing solution in mental ray similar to 3d Studio Max\u2019s native radiosity. If we turn it on, the light will cast around the room in a much more realistic way. If you\u2019re using 3dsMax 2009, final gather is probably on by default so you can effectively skip this step.<\/p>\n

In your render settings window (F10) you\u2019ll see an \u201cIndirect Illumination\u201d tab. Click on the checkbox that says \u201cfinal gather\u201d, select \u201cDraft\u201d from the quality preset pulldown, and change your bounces from 0 to 1.<\/p>\n

Re-render your image. Now we\u2019re cooking!<\/p>\n

\"The<\/a><\/p>\n

Final Gather makes all the difference.<\/p>\n<\/div>\n

Step 6: Make the spherical light project properly.<\/h2>\n

What do you say we make that light source look like it\u2019s really from outside? Select the mental ray light, and under the modify panel, click on the \u201carea light parameters\u201d rollout. We want to change the height and width of the area light to fit the window better. The window is<\/em> the lightsource. Increase the radius of the light such that it can reach the left and right sides of the window, even if it starts protruding into the room. Use the scale tool to scale it such that it becomes a big flat disk right outside the window. You\u2019ll have to twiddle the radius spinner to see the size of the disk, so don\u2019t hesitate to do a guess-and-check kind of approach. Don\u2019t worry too much, this isn\u2019t that critical.<\/p>\n

\"Proper<\/a><\/p>\n

The spherical light is softer.<\/p>\n<\/div>\n

Re-render, and you\u2019ll see the lighting solution really coming to life. It\u2019s a little graining and dark, so we\u2019ll have to increase the intensity of the light. In addition, change the samples on the light from 5 and 5 to 8 and 8. This will increase the sampling of the shadows and remove some of that grainy texture. Note that this change will increase render times, so if it becomes difficult for your system to handle, leave it low until you\u2019re ready for a final render!<\/p>\n

\"Render<\/a><\/p>\n

We're getting more light now.<\/p>\n<\/div>\n

Cool beans! Now I\u2019m going to let you try out whatever you want on this scene. Put some materials around the room and see how they render. Maybe make more windows or direct lights and let the light sources interact and brilliantly light up the place. It\u2019s your call! I encourage you not<\/strong> to skip this step. Playing around is what really teaches you how to use this program, tutorials like this are supposed to get you to that stage.<\/p>\n

\"Final<\/a><\/p>\n

Our final render, after some materials and direct light.<\/p>\n<\/div>\n

I\u2019ve done a few things to my scene, and you can check them out at your leisure. The biggest changes are the extra light sources, a few lighting tweaks like intensity, and the materials.<\/p>\n

If you have any questions, you can always find me on the 3dTotal Forums<\/a> and PM me (Bluesummers-3dt).<\/p>\n

Until next time, happy rendering!<\/p>\n","protected":false},"excerpt":{"rendered":"

For this tutorial, we\u2019re going to explore mental ray by making a simple room and lighting setup. I\u2019ll be using 3dsMax 9 but you can follow along with any version. I’m also including my finished file so you can pick it apart if it suits you. Mental Ray Room Now I’m assuming a low, but […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,15,18,20],"tags":[31,49,118,2564,2569,119,88],"_links":{"self":[{"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/posts\/259"}],"collection":[{"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/comments?post=259"}],"version-history":[{"count":0,"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/posts\/259\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/media?parent=259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/categories?post=259"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mrbluesummers.com\/wp-json\/wp\/v2\/tags?post=259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}