Skydome Rig

Skydome Rig

I’m a really big fan of using HDR images for lighting outdoor scenes.  (Check out this tutorial from Peter Guthrie if you haven’t already. It is for 3DS Max, but everything said there is transferable to Maya) – you can get some really nice lighting, clouds and colours that’s just not possible with a standard sun + sky setup.

However, the major flaw with this method is getting the HDRI shadows and the V-Ray Sun shadows to match. It can be a real guessing game, especially if your trying to find that perfect angle to light your scene.

So after mucking around a bit in Maya I came up with this work flow that I thought might be useful to share.

Setting up a V-Ray Light Dome + V-Ray Sun Rig

Open your HDRI in Photohsop, convert it to an 8-bit image, and then adjust the exposure down so only the sun is visible. Once you have done this you can save it as “Sun Aim.jpg” or something.

Our aim with this underexposed image is to make it easy to align the V-Ray Sun with the sun in the HDR image, so that we can get a perfect match for shadows and light direction in your renders.

32-bit HDRI

8-Bit with adjusted exposure so only the sun is visible

In your Maya scene, create a V-Ray Dome Light, then bring in your new image into to Maya and attach it to the Dome Light’s Dome Tex slot.

Make sure to check Use Dome Tex and Tex Adaptive

Once you do this Maya should now automatically display your image in the viewport.

A V-Ray Dome Light in Maya's viewport

A V-Ray Dome Light in Maya's viewport

Now create a V-Ray Sun. By default the sun will not be lined up with the sun in the HDR image, the best way to do this is to go and create a camera from Create > Cameras > Camera

Rename the camera to camSunAim or something useful.

While looking through the default persp viewport, rotate camSunAim so it is roughly pointing towards the sun – make sure NOT to physically move this camera though, it has to remain at the centre of the world.

camSunAim (Selected Blue Object) now roughly points towards the HDRI sun

Look through camSunAim and adjust the rotation values of the camera so you can clearly see the sun in the centre of the viewport.

Do not move, pan, tumble or dolly - just adjust the camera's rotational values!

Select the V-Ray Sun (usually VRayGeoSun1) and position the “handle/gizmo” so that it so that it matches up to the centre of the sun. (You can always switch backwards to the perspective view to help out a bit, but as long as the V-Ray Sun matches the image through camSunAim it will be a perfect alignment).

The V-Ray Sun is now perfectly aligned to the HDRI

To get the sun to lock on and follow the rotation of the V-Ray Dome Light, we will have to write an expression to do this.

Select VRayPlaceEnvTex1 and open the Attribute Editor.

Right click on Horizontal Rotation and click Create New Expression.

Assuming that you have left the original names in place for the Sun + Skydome placement node all this time, try the following code:

transform1.rotateY = VRayPlaceEnvTex1.horRotation +180

Make sure to tick Horizontal Flip.

You then should be able to adjust the Horizontal Rotation parameter of the V-Ray Dome and the V-Ray Sun will now follow it.

This should make lighting your scenes a much easier thing to do now.

Creating Skydome Libraries

I highly recommend you create a rig like this for each HDRI you own and save them all as separate Maya ASCII scenes for later use.

My premade skydome rigs in LayoutTools 2011

It makes lighting new projects from scratch much easier because you know what to expect right off the bat, especially if you find the right balance between HDRI brightness and V-Ray Sun brightness.

Comments

Nobody has said anything in this post yet!

Feedback