Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you would like RenderMan for Maya or Katana to recognize your pattern plugin and provide a user interface for changing input parameters and connecting output parameters to other nodes, then you will need to create an args file for your pattern. The args file defines the input and output parameters in XML so that tools like RMS or Katana can easily read them, discover their type, default values, and other information used while creating the user interface for the pattern node. Please consult the Args File Reference for more information.

Texture Baking

RenderMan can optionally bake pattern outputs to 2D or 3D textures by evaluating those patterns over an output manifold. Pattern plug-ins that wish to bake outputs should provide custom implementations of the RixPattern::Bake2dOutput or RixPattern::Bake3dOutput methods that return true. When in bake mode, RenderMan queries these methods to describe the output manifold and to initialize display drivers.

It is possible to write a generalized baking node that reference the output of arbitrary upstream pattern graphs. For reference, see PxrBakeTexture and PxrBakePointCloud pattern plug-ins:

Code Block
languagetext
Hider "bake"
Format 512 512 1
Display "render.exr" "openexr" "rgba"
Projection "perspective" "fov" [30]
Translate 0 0 5
WorldBegin
    AttributeBegin
        Pattern "PxrFractal" "pattern"
        Pattern "PxrBakeTexture" "baked" "reference color inputRGB" ["pattern:resultRGB"]
          "string filename" ["bake.tif"] "string display" ["tiff"]
          "string primVar" ["st"] "int resolutionX" [512] "int resolutionY" [512]
        Bxdf "PxrDiffuse" "default" "reference color diffuseColor" ["baked:resultRGB"]
        Sphere 1 -1 1 360 "varying float[2] st" [0 0 1 0 0 1 1 1]
    AttributeEnd
WorldEnd