Tutorial: Creating Photo-Realistic Renders with HDR using 3ds max & Mental Ray

April 23rd, 2008

3d photo real render of an Ambrato Wall Sconce - HDR 3ds max TutorialHDR photo real render of a copper pendant light made with 3d studio max - HDR TutorialHDR photo real render using 3d studio max of glass marble company logo - HDR Tutorial3d photo real render of an Agilis Wall Sconce - HDR 3ds max Tutorial

The technique I use to create photo real product image renders is called Image Based Lighting (IBL). There are no lights in the scene, all of the illumination is provided through the HDR texture map. The images above are some recent 3d models I have rendered using Image Based Lighting with an HDR map I created. I have this HDR image probe available for a free download as you go through the tutorial.

First thing you want to do is start with a fresh scene and merge in the object that you want to render. I’m going to use a wall sconce that I modeled recently. If you don’t have any 3d models off hand, just create a few spheres or a teapot and apply a shiny or glossy shader to them. Try to keep a realistic scale to them, for instance, give them a 3-6″ diameter. This goes for any model that you merge in -make sure it has a realistic scale. If you don’t already, everything you model should be to scale. It helps textures, lighting, and cameras play nice together -not to mention adding realism.

Photo realistic 3d render tutorial screenshot01

Next create a huge sphere around this object. Create panel | Geometry| Standard Primitives | Sphere

HDR 3d photo realistic render tutorial screenshot

Now you want turn the sphere inside-out so the polygons are facing inwards. This is called flipping the normals. Modify | Normal

If it appears that the sphere’s polygons haven’t flipped, it’s probably because your objects default to not backfacing culls. The fix is simple, just right click on the object and under ‘display properties’, check ‘backface cull’. If the ‘display properties’ section of the dialog is greyed out, click the ‘by layer’ box just to the left of the ‘display properties’ options.

HDR-3d-photo-realistic-render-tutorial-screenshot

Now we need to load up an HDR image to be used as the environment for the object we are rendering. This is going to be applied to the sphere that was just created around the merged or (or created) model. Open the material editor and load up a ‘mental ray’ shader from the Material/Map Browser. The ‘mental ray’ shader has a bunch of roll-outs: Surface, Shadow, Photon, Photon Volume, Bump, Displacement, etc. We are just concerned with ‘Surface’. Click the ‘Surface’ slot where it says ‘none’ and select ‘Bitmap’ from the Material/Map Browser.

HDR-3d-photo-realistic-render-tutorial-screenshotHDR-3d-photo-realistic-render-tutorial-screenshot

I just realized that you probably don’t have an HDR environment image off-hand. No worries, I have an HDR image probe that I created myself that you can download (I’ll post up a tutorial on creating the image probe in the future). I also have this in high-res, unfortunately my bandwidth won’t allow for that to be posted :(

HDR Image Probe Download

When you load up the HDR bitmap, be sure to tell 3ds max to handle it as a 32-bit file.

HDR Tutorial 3d photo real render screenshot HDR-3d-photo-realistic-render-tutorial-screenshot

Apply this environment material to the large environment sphere in your scene. Throw a UVW map on it and set the mapping to ‘Spherical’, and be sure that ‘Real-World Map Size’ is unchecked.

Before we start getting some visual feedback from the renderer, I’m going to mount my sconce to a wall. If your object would naturally sit on the ground in real life, then create a floor rather than the wall. Make it just big enough to fill up your camera view (oh yea, its time to create a camera view). Your viewport should look something like this:

HDR-3d-photo-realistic-render-tutorial-screenshot

Now apply a material to this floor or wall. I really like using Mental Ray’s Arch+Design materials. They behave very well with mental ray and offer tons of flexibilty based on real-world values. Whatever you use, make sure that it will emit and receive photons properly.

I am going to add a simple texture to my wall to give it a little realism. I did a quick search on google images for “wall finish” and turned up some nice results. Since the scene we are dealing with here is just a single close-up shot, this texture doesn’t need to be tile-able. Just grab a nice large, straight-on picture someone took of their wall. I usually filter the google image search results by ‘Extra Large Images’ and kick it down until I find what I need.

One thing I forgot to mention is to add a light to the scene, and turn it off.  If there are no lights in the scene, then 3ds max adds ambient lighting to your render which will make everything look plasticy.

Now lets do some damage. Fire up the render dialog (F10 is a shortcut). To set Mental Ray as the renderer, open up the Render Scene dialog and click the ‘Common’ tab. Scroll down to the ‘Assign Renderer’ roll-out and click the ‘…’ button.

Since we are just trying to get visual feedback, there are a few things we can do to whip out some real quick renders just to get a feel for whats going on without fumbling around for 8 hours. For these initial runs, I usually set my Samples per Pixel to ‘Minimum: 1/64 | Maximum: 1/4′. Its fast with just enough detail to know what you’re dealing with. (This is under the ‘Renderer’ tab under ‘Samples per Pixel’ roll-out). To speed things up some more I even set my output size to 300 x 300px (or whatever your aspect ratio is). Again, just enough to see whats going on. Now go to the Indirect Illumination tab and under the ‘Final Gather’ roll-out check ‘Enable Final Gather’ and set the Basic settings to the following: Initial FG Point Density: 0.1 | Rays per FG Point: 25 | Interpolate Over Num. FG Points: 15 | Diffuse Bounces:0 | Weight: 1.0. Remeber, these settings are only to whip out some quick and dirty renders for fast visual feedback.

One last step when dealing with HDR imagery; be sure to set the renderer’s frame buffer type to ‘32-bits per channel’ or Floating Point. This will enable us to output our renders as true 32-bit HDR files that can have their exposure adjusted in capable post-production apps like Photoshop or HDR Shop. Technically these 32-bit HDR renders could also be used as functioning HDR environmental textures.

HDR-3d-photo-realistic-render-tutorial-screenshot

Ok, so this is looking good on the first shot. Rendering time 0:00:03. -only a small bit of your life was used up there.

HDR-3d-render-tutorial-output-preview

If its not looking right, or you just want to explore your options, here are a few tweaking methods that I use:

1.) Tone-mapping. The stock tone-mapper that comes with 3ds max is Logarithmic Exposure Control. This is in the ‘Environment and Effects dialog box (Rendering | Environment…). If your gamma correction is not enabled, you will probably need to make this active to see anything. Gamma is an issue that I’m not going to get into here. I’ll save that little gem for later. A little side note; I can never get the ‘Render Preview’ in the ‘Exposure Control’ roll-out to show anything, does anyone have any insight on this? I like to use mia_exposure_simple for tone-mapping because it offers a bit more flexibility, but the Log exposure should work fine for you.

2.) Output energy of the HDR texture. (Bitmap parameters | Output roll-out | Output Amount). This will basically adjust how bright your environment is. Default is 1.0, so adjusting it above or below 1.0 change how the HDR map behaves.

Output energy of the HDR texture: .25Output energy of the HDR texture: 2.5

The first render has an output amount in the HDR bitmap of .25. The second render has it set at 2.5. No exposure control was adjusted.

3.) Rotate the environment. Simple as that- rotating the sphere or UVW map will reposition the bright parts of the image affecting the brightness, shadows, and highlights of your model.

HDR environment map original placementHDR map rotated 45 Degrees

Both of these renders have the same output amount in the HDR bitmap. The only thing that changed was that the environment was rotated around.

To get the final result of the images at the top of the tutorial, I used a combination of the tweaking methods I described above. I set the output of the HDR texture to 0.32 and bumped up the brightness on my tone-mapper (mia_exposure_simple). Doing this brought out more lumination from the alabaster material than the light from the HDR map allowed. I also used photon global illumination to add a bit more glow.

Good luck rendering! I’d love to see some of the results created from anyone who used this tutorial, please send them! As always, feel free to ask any questions as well.

If you are an architectural visualization designer and would like to download these sconce models to use in your project, I have them up for sale on Turbo Squid

Tutorials | Comments | Trackback

12 Responses to “Tutorial: Creating Photo-Realistic Renders with HDR using 3ds max & Mental Ray”

  1. 1Dusan Maljkovic
    May 15th, 2008 @ 3:48 am

    Hi there mate. i have a question i would like to ask you.. i am learning 3ds max but i cant get it right with some things. i want to create realistic sandy ground or grassy ground, all the same , but i cant really make it. i saw your work and i think that you could be the one who could show me how? maybe you have some good tutorial or something? if you have some spare time for me pls email me on dusanmaljkovic@hotmail.com. Thank you!

  2. 2admin
    May 15th, 2008 @ 9:53 am

    Hi Dusan,

    Well, for the grass I have heard that using the Hair and Fur system in 3ds max works well for grass.

    (Modify panel > Make a selection. > Modifier List > World-Space Modifiers > Hair And Fur )

    -I have never tried it though so I can’t be much help after that.

    Jeff Patton has a good tutorial with grass using displacement:

    The sand is another one I have never tried and can’t really think of anything off the top of my head that would produce realistic results… Let me know if you find anything though, I’m curious about it now. However, I can tell you that whatever method you use for both of these, be sure to use the IBL setup I show in the tutorial, because you will be able to concentrate on the textures of your grass and sand without having to worry if the lights / environment are setup correctly.

  3. 33ds max tutorials
    May 29th, 2008 @ 5:49 pm

    [...] maxIf you have a copy of 3ds max, this tutorial will get you rendering photo-real images in no time.http://www.redcultur.com/silkypixel/2008/04/23/tutorial-creating-photo-realistic-renders-with-hdr-us…3ds Max Tutorials, Maya Tutorials, Lightwave 3D Tutorials, Cinema …3ds max Tutorials, Maya [...]

  4. 4BEEF
    July 12th, 2008 @ 12:59 am

    how do you get mental ray in 3DS max????

  5. 5admin
    July 16th, 2008 @ 4:50 pm

    In the ‘render scene’ dialog, go to the Common tab. At the very bottom there is a rollout that says ‘Assign Renderer’.

    Expand that, click the ‘…’ and select ‘mental ray Renderer’.

  6. 6SAYI PRADEEP
    August 8th, 2008 @ 9:13 am

    I completed the 3d max…am searching job in 3d field…i want to know how to give all the lighting effects with which buton we need to use…by short cut…

  7. 7Rich
    August 10th, 2008 @ 9:05 am

    i put the light into the scane, and turned it off, but my viewport is black, the image renders using the log esttings but not with GI or caustics? how can i fix that?

  8. 8Arie
    August 12th, 2008 @ 9:05 am

    Hi, i’m arie, a vocational high school’s student that interest to create photo realistic picture with 3ds max. I’m interested after saw your blue glass ball picture at you website, so i learn mental ray further more to create material than assign to sphere object but i still can’t, please merry to me to tell me how create material like blue glass with bitmap in it’s surface. Please email me to arie_180691@yahoo.co.uk

  9. 9admin
    August 12th, 2008 @ 1:38 pm

    @SAYI PRADEEP: Yea… well, to edit all your lights from one spot go to, ‘Tools | Light Lister…’ from the top menu. I don’t know the shortcut for that. To edit the scene lighting go to, ‘Rendering | Render…’ from the top menu. The shortcut is F10.

    @Rich: Do you have Final Gather turned on?

    @Arie: Exactly what are you having trouble with?

  10. 10steve h
    August 13th, 2008 @ 3:30 pm

    hi there!! thanks very much for this excellent tutorial..I have been having a bit of trouble with the “plastic-y” look in mental ray and couldn’t find how to hdri..thanks again
    ps i’m about to try getting some 3d vis work but not too sure if i’m good enough!!Any idea where I could send images for a decent opinion?! Or if you could,please mail me ;) captaincreativity@yahoo.co.uk

  11. 11Arie
    August 17th, 2008 @ 10:39 pm

    exactly i just want to know, how to create material for this blue glass marble, are that need some light ? omni, vray, or else.
    What renderer that you use ? mental ray, vray, default renderer or else. Thanks very much before.., hope you understand

  12. 12admin
    August 19th, 2008 @ 9:05 am

    The material for the marble is an Arch & Design material and was rendered with Mental Ray. I started with the Arch & Design ‘glass’ preset and tweaked it from there.

    The lighting comes from an HDR map applied to a sphere that is wrapped around the marble and ground geometry(see tutorial). -be sure to have Final Gather turned on or the HDR map won’t illuminate the scene.

    The secret to the material is in the ‘Advanced Rendering Options’. The color of the marble will be determined under ‘Refraction | Color at Max Distance’. Make it the same color as ‘Refraction |Color’ under the Main material properties.

    Also, to make the Arch & Design glass material look more like the ‘Glass (physics_phen)’ material, be sure to uncheck ‘Skip reflections on the inside…’ under ‘Advanced Reflectivity Options’. Glass (physics_phen) is a great material, but I like the flexibility that the Arch & Design mats give. -like easily adding a bump map…

    …which is how I made the imprint on the marble; just throw a black & white bitmap of a logo or text in the Bump slot. I have that set to 0.1 for a subtle look. Also, be sure to blur the bitmap a bit, because having hard lines will make the glass start throwing off artifacts.

    I can do a short tutorial on this in the future.

Leave a Reply

  1.  
  2.  
  3.  
  4. XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
You can keep track of new comments to this post with the comments feed.

Categories

Blogroll

FireStats icon Powered by FireStats