Q100268: How to use an object as an Arnold mesh light in Katana
This article explains how to use a piece of geometry as a light source in Katana.
More information on mesh lights can be found in the Arnold for Katana User Guide on Mesh Lights. If you're familiar with mesh lights and setting up a simple working example in Katana, then an advanced version of textured Arnold mesh lights can be found in article: Q100269: How to set up textured Arnold mesh lights in Katana
To illustrate the mesh light setup with Arnold and Katana this article provides an example scene and a detailed step by step explanation of how the scene was put together.
- To set up the simple attached example scene we will be lighting, please create the following:
- a CameraCreate node
- a PrimitiveCreate node of type poly sphere
- a PrimitiveCreate node of type cube
- a material called BoxMaterial, with an arnoldSurfaceShader of type standard
- Merge all the nodes that were created in step 1.
- View the scene from the Merge node and look through the camera in the Viewer.
- Scale the cube primitive so that the sphere sits inside of it.
NOTE: This is to catch the light that will be emitted from the sphere and make it visible in the scene.
- Append a MaterialAssign node after the Merge node and assign BoxMaterial to the box.
- Append a GafferThree node. Right-click > Add > Light to add a new light.
- Go to the material tab in the GafferThree, and add an arnoldLightShader. Set the type to mesh_light.
- Under the source parameter on the mesh light shader, set mesh to the sphere’s Scenegraph location. Change the color to red and increase the value of the exposure and samples parameters like so:
- Append a RenderSettings node and change renderer to arnold. Now right-click on the RenderSettings node > Preview Render and see the red light affecting the inside of the box.
NOTE: At this point you've created a working mesh light example where the sphere is the mesh light and lights up the inside of the box. You should see in the render that the inside of the box is lit in red, but the sphere itself is still white. This is because using an object as a mesh light doesn’t change the object’s surface shader.
- To make the surface of the sphere match, create a material called SphereMaterial with an arnoldSurfaceShader of type standard, emission set to 1 and emission_color set to red, and merge it at the top of the Nodegraph. The SphereMaterial parameters should look like:
- Insert another MaterialAssign node after the first one we created, and assign SphereMaterial to the sphere. Now if you Preview Render again from the RenderSettings node, you should see that the sphere seems to glow red and light up the box.
The example scene attached was created in Katana 2.5v4 with Arnold 220.127.116.11 and KtoA 1.1 by following the above steps, and can be used as a reference for working with mesh lights in Arnold and Katana.
We're sorry to hear thatPlease tell us why