Git Product home page Git Product logo

maya2katana's Introduction

maya2katana

Easily copy shading nodes from Maya to Katana

Currently supported renderers:

  • Supported nodes: aiAmbientOcclusion, aiImage, aiNoise, aiStandard, aiUserDataColor, aiUserDataFloat, aiVolumeCollector, alCellNoise, alCombineColor, alCombineFloat, alCurvature, alFlake, alFlowNoise, alFractal, alHair, alInputScalar, alInputVector, alJitterColor, alLayer, alLayerColor, alLayerFloat, alRemapColor, alRemapFloat, alSurface, alSwitchColor, alSwitchFloat, alTriplanar, blendColors, bump2d, clamp, luminance, ramp, samplerInfo

  • Supported nodes: aaOceanPrmanShader, PxrAdjustNormal, PxrAovLight, PxrAttribute, PxrBackgroundDisplayFilter, PxrBackgroundSampleFilter, PxrBakePointCloud, PxrBakeTexture, PxrBarnLightFilter, PxrBlack, PxrBlackBody, PxrBlend, PxrBlockerLightFilter, PxrBump, PxrBumpManifold2D, PxrCamera, PxrChecker, PxrClamp, PxrColorCorrect, PxrCombinerLightFilter, PxrConstant, PxrCookieLightFilter, PxrCopyAOVDisplayFilter, PxrCopyAOVSampleFilter, PxrCross, PxrCryptomatte, PxrCurvature, PxrDebugShadingContext, PxrDefault, PxrDiffuse, PxrDirectLighting, PxrDirt, PxrDiskLight, PxrDisney, PxrDisplace, PxrDispScalarLayer, PxrDispTransform, PxrDispVectorLayer, PxrDisplayFilterCombiner, PxrDistantLight, PxrDomeLight, PxrDot, PxrEdgeDetect, PxrEnvDayLight, PxrExposure, PxrFacingRatio, PxrFilmicTonemapperDisplayFilter, PxrFilmicTonemapperSampleFilter, PxrFlakes, PxrFractal, PxrFractalize, PxrGamma, PxrGeometricAOVs, PxrGlass, PxrGoboLightFilter, PxrGradeDisplayFilter, PxrGradeSampleFilter, PxrHSL, PxrHair, PxrHairColor, PxrHalfBufferErrorFilter, PxrImageDisplayFilter, PxrImagePlaneFilter, PxrIntMultLightFilter, PxrInvert, PxrLMDiffuse, PxrLMGlass, PxrLMLayer, PxrLMMetal, PxrLMMixer, PxrLMPlastic, PxrLMSubsurface, PxrLayer, PxrLayerMixer, PxrLayerSurface, PxrLayeredBlend, PxrLayeredTexture, PxrLightEmission, PxrLightProbe, PxrLightSaturation, PxrManifold2D, PxrManifold3D, PxrManifold3DN, PxrMarschnerHair, PxrMatteID, PxrMeshLight, PxrMix, PxrMultiTexture, PxrNormalMap, PxrOcclusion, PxrPathTracer, PxrPortalLight, PxrPrimvar, PxrProjectionLayer, PxrProjectionStack, PxrProjector, PxrPtexture, PxrRamp, PxrRampLightFilter, PxrRandomTextureManifold, PxrRectLight, PxrRemap, PxrRodLightFilter, PxrRollingShutter, PxrRoundCube, PxrSeExpr, PxrShadedSide, PxrShadowDisplayFilter, PxrShadowFilter, PxrSkin, PxrSphereLight, PxrSurface, PxrTangentField, PxrTee, PxrTexture, PxrThinFilm, PxrThreshold, PxrTileManifold, PxrToFloat, PxrToFloat3, PxrVariable, PxrVary, PxrVolume, PxrVoronoise, PxrWhitePointDisplayFilter, PxrWhitePointSampleFilter, PxrWorley

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)

maya2katana's People

Contributors

ababak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maya2katana's Issues

Custom RenderMan shader (*.so and *.oso)

We have custom shaders which we contracted out to be developed.

We can load them both in Maya and Katana

What is the correct way to let maya2katana know about those custom shaders so that the conversion script translate those information across from Maya to Katana ?

Cheers

PxrMatteID - not supported

Error: line 1: int() argument must be a string or a number, not 'tuple'
Traceback (most recent call last):
File "", line 3, in
File "W:\PubLogs\nyue\maya\maya2katana\clip.py", line 530, in copy
xml = generateXML(nodeNames, renderer=renderer)
File "W:\PubLogs\nyue\maya\maya2katana\clip.py", line 512, in generateXML
nodeXml = processNode(node, renderer=renderer, mappings=renderer_module.mappings)
File "W:\PubLogs\nyue\maya\maya2katana\clip.py", line 273, in processNode
iterateMappingRecursive(mappings[nodeType], root, node)
File "W:\PubLogs\nyue\maya\maya2katana\clip.py", line 169, in iterateMappingRecursive
if mayaValue is not None and not equalAttributes(mayaValue, value):
File "W:\PubLogs\nyue\maya\maya2katana\clip.py", line 76, in equalAttributes
return int(a) == int(b)
TypeError: int() argument must be a string or a number, not 'tuple' #

PxrOSL support

Hi,

I saw how the the xml files are added manually. So for a node like the PxrOSL, since it takes file paths, the parameter changes according to what oso file you are using. How would you add into the renderer/prman/nodes/ folder then?

Will the PxrOSL node be supported in the near future?

Maya Arnold shader to katana issue

Hello, I'm looking for a solution to bring Maya Arnold shaders to katana, so I don't have to manually reconnect everything from scratch, is there an up update script for Arnold 5? can anyone help, or give me a guide so I can modify the script, or create a new one. thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.