Sharks! The subject matter for our underwater scene
In this tutorial we will cover lighting and rendering an underwater scene with a school of sharks. We will setup the scene with fog to achieve an under water feel to the scene. We will cover lighting the scene using a gobo to create a fake caustic effect. We will also go through creating the sea material using vector displacement.
- We will start off by creating some fog for our underwater scene. Open the Render Settings window. Under the Environmentattributes, change the Atmosphere from none to Fog.
- You should see the Fog attributes in the attribute editor. Increase the Distance a small amount to something like 0.02 and render the scene. You should get something that looks like this:
Default fog settings. Ground point is Z by default.
- Change the fog color to a mid blue and change the Ground Normal to Y up by entering 1 in the Y axis field and 0 in the Z axisfield. The sharks are going to be near the surface of the sea and so we want to give the impression that light is coming from the top and attenuates in the Y direction.
Ground Normal 1 (Y-Axis)
- We now want to increase the amount of fog. Increase the Distance value to around 1.
Distance increased to 1
- The sharks at the top are not receiving much fog. Increase the Height value. This will push more fog to the top of the scene and will make the scene look more convincing.
Height 5 Height 44
Now we need to cast some light in the scene. We will use a spotlight. This will enable use to add some light filters to it that will give us more control of the lighting in the scene.
- Create a spot light and increase the cone angle so that it covers the entire renderable scene. In this case we have used a cone angle of 175. Increase the intensity or exposure enough so that the sharks are visible.
- Next we will create a fake caustic effect that is projected through the light source. To do this we will add an Ai Gobo light filter to the spotlight. Select Light Filters under the Arnold section of the spotlight and add an Ai Gobo filter.
- Connect a file texture to the Slide Map attribute. We are going to use a texture map consisting of a caustic pattern. The texture map below is used as a fake caustic effect connected to the Slide Map attributes of the Ai Gobo.
Caustic texture connected to 'Slidemap' attribute of aiGobo
- Test render the scene. Using the default settings, the scale of the caustic effect looks too small. Reducing the scale of the Scale S and T values increases the scale of the caustic texture used for the Slide Map.
Gobo Scale S T set to 1. The caustic pattern is too small. Lowering the Gobo Scale S T to 0.5 creates a larger caustic effect
- The gobo effect appears a bit strong. We can reduce its effect by increasing the Density value. Try increasing it by a small amount to 0.5. This looks better.
Density decreased to 0.5
Next, create a polygon plane and scale it up so that it covers the entire scene. We want the sea plane to be transparent, therefore we must deselect Opaque within the Arnold attributes for the plane. Assign an Ai Standard material to it and rename it to 'Sea'. Lower the Base Weight to 0. Increase the Specular Weight to 1 and lower the Specular Roughness to 0. Under Transmission, increase the Transmission Weight to 1. Change the IOR to 1.3 (where air meets water). Even though 1.3 is the physically accurate value used for the index of refraction of water, you may want to cheat this value according to taste.
Polygon plane used for the sea surface
To get a more realistic wave effect, we will use a vector displacement map to displace the sea waves. This will displace the sea geometry around a direction different from the normal unlike a traditional displacement map which displaces the geometry in one direction only. More information about creating an ocean surface can be found here.
- Connect the file texture below to a Maya displacement node. Connect the displacement node to the shading group of the Ai Standard used for the sea.
Texture map used as the Vector displactement for the sea
- In the Arnold attributes for the sea polygon plane, change the Subdivision Type to Catclark and increase the number of Iterations. Start off with a low number of Iterations and increase them until you get something that looks realistic. Higher values will increase memory use and render times, so be careful not to go too high with this value initially.
Arnold subdivision settings for sea polygon plane
Scene without sea Scene with displaced sea
Below you can see the final render from Arnold (left image) and after it has been tone mapped and color corrected (right image):
Beauty render from Arnold After tone editing in post processing software
That concludes this tutorial for creating an underwater fog scene. Environment effects such as fog are a simple way to add convincing ambience to a scene. Also the Ai Gobo can be used to cheat real world lighting effects such as caustics and give you more control and are cheap to render.
?Ramp texture connected to Ai Sky node Volume scattering effect ?
Ai Gobo caustic effect