Skip to content

Latest commit

 

History

History
109 lines (89 loc) · 4.92 KB

README.md

File metadata and controls

109 lines (89 loc) · 4.92 KB

maya2katana

Easily copy shading nodes from Maya to Katana

Currently supported renderers:

  • Arnold 5 (bate)

    Supported nodes: aiStandardSurface, aiStandardHair, aiNormalMap, aiColorCorrect, aiBump2d, aiImage, aiMultiply, aiDivide, aiPow, aiLayerShader, aiSpaceTransform, aiClamp, file, ramp, bump2d, multiplyDivide, blendColors, clamp

Installation

  1. Quit Maya

  2. Clone maya2katana repository (or download zip, extract and rename directory from "maya2katana-master" to "maya2katana") and place it to:

Windows: \Users\<username>\Documents\maya\scripts
Linux: ~/maya/scripts
  1. Open Script Editor and paste the following code to Python tab:
import maya2katana
reload (maya2katana)
maya2katana.copy()
  1. To create a shelf button select the code and middle-mouse-drag it to your shelf

Usage

  1. Select a shading network or a single shadingEngine (Shading Group) node Maya shading network

  2. Press the button you've created earlier or execute a script (see installation step)

  3. Switch to Katana and paste the nodes Resulting Katana shading network

Integrations

To get the XML from shading network name:

import maya2katana
reload (maya2katana)
node_name = 'materialSG'
# Get the xml as string
resulting_xml = maya2katana.generate_xml(node_name)

You can save the resulting XML to file and bring it into Katana:

# Now create the Katana shading network
# Suppose the XML (string) is already loaded
# to 'resulting_xml' string variable
from Katana import NodegraphAPI, KatanaFile
# Create a group for shading network
group_name = 'materialSG'
group_node = NodegraphAPI.CreateNode(group_name, NodegraphAPI.GetRootNode())
# Bring the nodes to Katana scene
# and place them inside the newly created group
nodes = KatanaFile.Paste(resulting_xml, group_node)

Arnold 5 escription

Incompatible with "Arnold 4" (与"Arnold 4"不兼容)

May be incompatible with "RenderMan" (可能与"RenderMan"不兼容)

Using Maya node requires setting up the renderer (使用Maya节点需要设置渲染器)

Description currently: (当前说明)

  1. The texture path will be converted to a ".tx" path (纹理路径将转换为".tx"路径)
  2. Maya File to aiImage (Maya文件转为aiImage) Supported attributes (支持的属性): Image Name, Color Space, Color Gain, Color Offset
  3. aiImage add Color Space support
  4. Maya Ramp to Arnold Ramp_RGB (Maya渐变转为阿诺德渐变)
  5. Maya BlendColors to Arnold Mix_RGBA (Maya颜色混合转为阿诺德混合颜色)