Render with a skydome Hdri in maya
Discover how to render a realistic scene with a skydome light using the Arnold render engine in Maya
Find out how to render a realistic scene with a skydome light using Arnold in Maya
The Arnold rendering engine by Solid Angle is the newest photorealistic renderer installed by default in Maya 2018. Arnold uses physically based rendering to accurately simulate lighting in the real world. When rendering scenes that require realistic lighting from an environment, an Arnold skydome light is particularly useful. It is combined with an image file for lighting in the environment, and can be used for reflections on objects.
The image file used for a skydome must contain sufficient image information. Normal digital photographs do not contain enough information captured from the actual environment to reproduce the lighting information. The Image-based Lighting (IBL) uses a High Dynamic Range Image (HDRI) mapped to the skydome to reproduce lighting in the scene.
The equirectangular 360 is a spherical or Latlong image file, and is one of the more common environment map projections; it is commonly used in mapping the Earth onto a flat surface. Similarly, when capturing a 360 photo, it projects the environment as a sphere onto a flat plane.
There are several ways to capture an equirectangular 360 photo of an interior or exterior environment. Different cameras and different methods will produce varying results. The methods will vary based on your budget, or what sort of camera you have access to. For this tutorial, I am providing an HDRI for you to use, and I will demonstrate how to use any HDR image as a skybox and create a realistic render in Maya using Arnold.
01 capture An hdr image
You can use either a 360 camera or a digital camera on a nodal tripod head to shoot pictures of an environment you want to use. There are some wonderful compact 360 cameras on the market right now, but a nodal tripod head will work with a standard digital camera. There are many resources on the internet for taking HDR photos.
02 merge image files of bracketed exposures
There are several software packages that can do this – since I use Photoshop, there is a built-in Merge to HDR function. In Photoshop, choose the File menu>automate> Merge to HDR Pro. This will ask you for the images to combine and the exposure difference between each image. If you have Adobe Creative Cloud, and have Adobe Bridge installed, you can also select the images and choose Tools>photoshop>merge to HDR Pro. Once combined the images will need to be converted to 32bit, and then saved as a Radiance (HDR) or OPENEXR format.
03 Save image file
Save the image file as an OPENEXR or Radiance (HDR) file. When using Photoshop, if neither of the two file formats are available when saving, make sure the image mode is set to 32 bit (Image>mode>32 Bits/channel).
04 Stitch image
If needed, use stitching software to combine the images to create the final equirectangular 360 image file. If you are using
Photoshop, choose the File menu>automate>photomerge. Then select the files or an entire folder containing the image files to combine. Try the auto layout function first, but if that doesn’t give you the best results then try other layout methods.
05 Set the maya project Directory
Use the included project files through this tutorial. It’s already a project directory and just needs to be set as the Maya project before the scene file is opened. Do this by starting up Maya first, then choose File>open Scene. In the Open window, click the Set Project button. In the Set Project window, select the directory for the project (just click once on the project directory to highlight it) then click the Set button. When the Set Project window closes, choose the scene file hdr_skydome_2018_start.ma and click the Open button.
06 maya Scene file
You can either use the scene file I provided for this tutorial, or you can create your own scene. Based on the 360 photo you use, this scene can be either an interior or exterior environment. This tutorial uses some basic objects in the outdoors and already has some textures for a table in the scene.
07 enable the Arnold plugin
The Arnold plugin adds a top-level menu in Maya, titled Arnold. If this menu is not available it could be that the Arnold render plugin is not enabled. Arnold is the default photorealistic hardware render engine installed with Maya 2018. From the Window menu>setting/ Preferences>plug-in Manager, look for the mtoa plugin and check the box next to Loaded.
08 prepare the hdr image
Place an HDR equirectangular photo in the sourceimages directory of the Maya project directory. I included one of my HDR equirectangular 360 images for you to use, but you can certainly use one you created. There are also many resources on the internet where
you can download and use HDR IBL image files. Make sure that you are using a true HDR file.
09 ADD A Directional light
First off, if you are creating your own scene, and creating an interior scene, you will not need to add a directional light. Directional lights mimic light from the sun. This type of light projects light rays that are parallel and originate from the direction the light is facing. Rotating this light changes the direction of the light rays. Translating (moving the light around the scene) will not change the direction of this light at all. Choose Create>lights>directional Light.
10 use Directional lights
Since the skydome light affects the scene with colour and light emitted from the image file, this can affect the colour of textures used in the scene. For interior scenes an HDRI file contains lighting information that is more realistic, so using an interior light is not necessarily required, and the IBL could be sufficient for the scene. Since the sun provides so much light in the outdoors, adding an additional light will provide more realistic shadows and lighting in the scene, while the IBL produces additional lighting information and adds reflections.
11 ADD An Arnold Skydome light
The Arnold render engine adds some of its own lights. While Arnold can use Maya standard lights to add image-based lighting (IBL), Arnold uses its own skydome light. This creates a sphere in the scene that can have an image file mapped to the colour channel. Add the skydome by choosing Arnold>lights>skydome Light.
12 map image file node
To map an image file to the skydome light, connect an image file node to the colour channel of the skydome light. Just like all mappable channels in Maya, click the checkered box next to the colour channel in the Skydome Light attributes in the Attribute Editor. In the Create Render Node window,
select the 2D Texture subsection under the Maya section on the left side of the window, then click the File option in the right-hand side of the window.
13 connect the hdr image file
Click the folder icon next to the Image Name in the Image Attributes section of the Attribute Editor. In the Load Image File window, choose the sourceimages directory, and select the HDR equirectangular photo to use. Then click the Load button. You should now see the image on the skydome light’s geometry in the scene.
14 Set Skydome light Attributes
In the Outliner window, choose the aiskydomelight to see its attributes in the Attribute Editor. Set the Resolution attribute to the same width of the image file used. The image I used is 7,744 pixels wide, so this attribute is set to 7,744. Never set this attribute higher than the horizontal resolution of the HDR map, as Arnold uses this to capture details from the image file. Make sure the image is set to Latlong for equirectangular 360 images. Keep the Exposure attribute set at zero. Changing this attribute will adjust the intensity of the lighting in the image. Make sure that Illuminates By Default is enabled.
15 create A render camera
Create a different camera to use for rendering. To create a new camera in the scene head to Create>cameras>camera. Reposition the camera in the scene by translating or rotating.
16 name the new camera
Change the name of the camera to something distinctive, I call my rendering cameras Shotcamera. With the new camera selected open the Attribute Editor for the camera’s transform node attributes, and enter the new name. Do not change the name of the shape node. Changing the name of the camera’s transform node will update the name of the shape node automatically.
17 view through the camera
Look through the camera by choosing the Panels menu in the main viewport, select Perspective> Shotcamera1, or the name of the
rendering camera. Now you can move the camera around with the normal camera movement tools. Turn on the Resolution Gate in the viewport to see what will render.
18 change render Settings
Open the Render Settings window, from Windows>general Editors>render Settings and make sure Arnold Renderer is the selected render engine in the Render Using menu at the top. You can also change the Image Size to the target size to render.
19 test the Arnold render
While Maya has a Render View window, the Arnold Renderview window is a better method when rendering with Arnold. From the Arnold menu, select Render, this will open the Arnold Renderview window and start a single frame render automatically.
20 change Directional light Settings
If the render is too dark, you can adjust the intensity of the light, or adjust the Exposure attribute in the Arnold settings in the Attribute Editor for the light. To make shadows softer, adjust the Angle value. This is the angular size of the light in degrees. A larger Angle value will soften shadows in the scene. Changing the Samples value in the Attribute Editor to more than 3 will improve the edges and detail of the shadows. Be aware that increasing this value too high will drastically increase render times.
21 Adjust light Direction
Select the Direction Light, and press the ‘e’ key to rotate the light. Change the direction of the light so that the arrows are facing in the same general direction as the sun in the skydome image. While this does not need to be exact, it should be in the same general direction so that the shadows are facing the correct direction.
22 Depth of field
Everything in the foreground and the background in the current render will be in focus, which might be ideal, but does not look very realistic. If this was a picture taken in the real world, due to the nature of the camera lens, it would not be able to keep everything in focus. Adding depth of field to the render camera will create a more realistic and believable render.
23 Determine Distance to the camera
Looking through the rendering camera, determine the distance to an object by selecting it in the scene and checking the Distance From Camera value in the Heads Up Display. This will be in the upper
right of the main viewport; if this is not displayed, turn it on by choosing Display>heads Up Display and check the Object Details option.
24 enable Depth of field
Select the rendering camera and scroll down to the Arnold section in the Attribute Editor. Check the box next to the Enable DOF attribute. Enter the value of the object distance to the camera into the Focus Distance. This value does not have to be exact, especially since the distance to an object is where the pivot point is located.
25 change Arnold Settings
The Arnold Renderview will update as the depth of field is adjusted. Increase the Aperture Size to make less of the background and foreground in focus in the render – this is called a shallow depth of field. When the background and foreground are both in focus, it is called deep depth of field. Decrease the Aperture Size value in order to achieve a deeper depth of field.
26 Set up for final rendering
Open the Outliner window, and select the aiskydomelight. In the Attribute Editor increase the Samples to 3. Increasing this value improves the edges of the shadows. Although, increasing this value too high will drastically increase the render times.
27 change the render options
Open the Render Settings window and select the Arnold tab. Change the AA Samples, which is set to 3 by default. Since we are including camera depth, increase this value to 7 or higher.
28 render the final image
Switch to the Shotcamera (rendering camera), open the Arnold menu and select Render. Again, this will open the Arnold Renderview window and start a single frame render. Adjusting any settings in Maya will restart the render, but allows you to interactively see the results. •