thedigitalfeed.co.uk content
thedigitalfeed.co.uk/Graphics
Maya, MentalRay and HDR
Posted on Thursday the 19th of January, 2006
www.thedigitalfeed.co.uk/graphics/2006/01/19/maya-mentalray-and-hdr
Let's set up the HDR texture. First of all, create a polygon sphere. Scale it to a large size. I've used the width of the ground plane as the diameter of the sphere.

Environment Sphere
In the front view port, change the selection to Faces and delete the bottom half of the sphere. We don't need it, as it's below the ground plane. Also, add Planar Mapping and scale the 2d Placement to the same width of the sphere.

2D Planar Mapping
Now we need to set up the HDR material. Because the material will be a source of light, we need to create a new Surface Shader. In the Attribute Editor, change the Out Colour of the Surface Shader to a File, and select an HDR image from your computer. I use the spherical Kitchen image from the Light Probe Gallery, as it has tends to give a very warm and natural feel to the render. Assign this shader to your environment sphere.
We need to modify the UV co-ordinates of the sphere. Change the selection to UVs and select a couple of rows near the top. In the UV editor, scale these UVs down so that they are not so squashed. Repeat for another couple of sets of UVs further down and space them out, as in the second image:

Before UV Editing

After UV Editing
Now that we've done that, we can test render:

Initial HDR render
You can see that the image is very choppy. This is because we are only using 1,000 rays to light the scene. I'll bump this way up to 10,000 and re-render:

Second HDR render
Much better. HDR in Maya is as simple as that. Of course, increasing the ray count adds a lot of time to the render. There are other settings you can fine-tune to increase quality in the scene without adding a great deal to the render time, but I'll save that for another tutorial.