Katana for Technical Artists | OpScripts
Instructor
Adam Davis
Level
Experienced
Length
1h 1m 14s
Version Required
Katana 4.0 and later
1. Introduction to the OpScript Node
OpScript is a node that you can connect to your node network and use to manipulate attributes and scene graph locations using the scripting language LUA. OpScripts can be used to build custom nodes when there isn’t already a node in Katana to perform a particular task.
In this video, you will learn how OpScripts can be used when working in Katana.
Adam demonstrates how to use OpScript nodes to subdivide geometry by setting an attribute on referenced scene graph locations, as well as how to copy geometry and type information to locator positions by using multiple inputs on OpScript nodes to read and copy attributes from other branches. Adam also takes you through the OpResolve node to demonstrate how you can control which Ops are resolved at which point in the Node Graph, as well as how to control the order that Ops are resolved.
You will also learn how to create and access User Parameters from within your script to build custom, user-friendly parameters to manipulate the result of the OpScript without editing the LUA code, this is demonstrated through creating a drop-down menu to select polymesh or subdmesh for referenced geometry.
You will also take a look into the other parameters available within OpScript nodes, including the execution modes to control when the OpScript is run and where it is applied, using modifier names to help you keep Attributes organized when multiple OpScripts are being used, and specifying scene graph locations recursively.
2. OpScript Use Case - Generating a Grid of Lights
In this video, you will apply what you learned previously to create an OpScript to generate a grid of lights. As well as writing a LUA script to carry out this task, you will also learn how to group it and add user parameters to the group to customize the light grid.
Adam will guide you through the process of building an OpScript iteratively so you will gain an understanding of how each part contributes to the final result. You’ll begin with the basics of accessing the user parameters and creating a number of new lights according to the parameter inputs before positioning the lights on the grid. By the end of the video, you’ll have created a script that turns an inputted original light into a rig and adds the specified number of lights in the x and y axes as child locations to create a grid of lights.
Throughout the video, you’ll be introduced to some key concepts, including what happens when you create new scene graph locations, how to update the lightList attribute and some Matrix maths.
Course Files
The tutorial includes two Katana files, a starting file from which you begin and an end file that contains the completed project.
OpScript is a node that you can connect to your node network and use to manipulate attributes and scene graph locations using the scripting language LUA. OpScripts can be used to build custom nodes when there isn’t already a node in Katana to perform a particular task.
In this video, you will learn how OpScripts can be used when working in Katana.
Adam demonstrates how to use OpScript nodes to subdivide geometry by setting an attribute on referenced scene graph locations, as well as how to copy geometry and type information to locator positions by using multiple inputs on OpScript nodes to read and copy attributes from other branches. Adam also takes you through the OpResolve node to demonstrate how you can control which Ops are resolved at which point in the Node Graph, as well as how to control the order that Ops are resolved.
You will also learn how to create and access User Parameters from within your script to build custom, user-friendly parameters to manipulate the result of the OpScript without editing the LUA code, this is demonstrated through creating a drop-down menu to select polymesh or subdmesh for referenced geometry.
You will also take a look into the other parameters available within OpScript nodes, including the execution modes to control when the OpScript is run and where it is applied, using modifier names to help you keep Attributes organized when multiple OpScripts are being used, and specifying scene graph locations recursively.
2. OpScript Use Case - Generating a Grid of Lights
In this video, you will apply what you learned previously to create an OpScript to generate a grid of lights. As well as writing a LUA script to carry out this task, you will also learn how to group it and add user parameters to the group to customize the light grid.
Adam will guide you through the process of building an OpScript iteratively so you will gain an understanding of how each part contributes to the final result. You’ll begin with the basics of accessing the user parameters and creating a number of new lights according to the parameter inputs before positioning the lights on the grid. By the end of the video, you’ll have created a script that turns an inputted original light into a rig and adds the specified number of lights in the x and y axes as child locations to create a grid of lights.
Throughout the video, you’ll be introduced to some key concepts, including what happens when you create new scene graph locations, how to update the lightList attribute and some Matrix maths.
Course Files
The tutorial includes two Katana files, a starting file from which you begin and an end file that contains the completed project.