Q100268: How to use an object as an Arnold mesh light in Katana

Follow

SUMMARY

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

 

MORE INFORMATION

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. 

SCENE SETUP

  1. 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

  2. Merge all the nodes that were created in step 1.

  3. View the scene from the Merge node and look through the camera in the Viewer.

  4. 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.


  5. Append a MaterialAssign node after the Merge node and assign BoxMaterial to the box.

  6. Append a GafferThree node. Right-click > Add > Light to add a new light.

  7. Go to the material tab in the GafferThree, and add an arnoldLightShader. Set the type to mesh_light.

  8. 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:



  9. 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.


  10. 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:



  11. 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 4.2.14.2 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.
Was this article helpful?
0 out of 0 found this helpful