Assign custom mental ray text

For more information about the Custom mental ray text, see Custom mental ray text.

Click the button in the Custom Text Editor to create a custom text node and assign it to the selected node in the scene. The Attribute Editor is updated.

The option menu lists all the available text nodes that were previously created. By selecting a new entry in this option menu the text assignment of the current scene entity is replaced with this newly chosen text node. Saving the scene to a Maya file also stores all the existing text nodes, both connected and unconnected. Custom text nodes have to be deleted by standard Maya methods, as the Custom Text Editor doesn't provide a way to do it.

For more information on the different types of text assignments refer to Types of text assignments.

Assign custom text to an object or shader

To assign a material shader (example)

  1. Create a new scene.
  2. Create a NURBS object.
  3. Assign a new Blinn node to the NURBS object.
  4. Select the Blinn node (either in the Attribute Editor, the Hypergraph, or the Hypershade).
  5. Select Windows > Rendering Editors > mental ray > Custom Text Editor.

    The Custom Text Editor opens. For a description, see mental ray Custom text editor.

    When selecting objects or shaders in Maya the editor is updated according to the selected entity and enable the appropriate control if the current selection allows creation and assignment of custom mi text.

  6. Click the new button in the Custom Text Editor.

    The Attribute Editor displays the custom text user interface.

  7. Enter some text and click Apply.

    Any valid mi text can be entered and is stored once Apply is selected. Selecting Clear deletes the current text from the node and clears the text field.

    The custom text can make use of special placeholder characters or strings that are recognized during translation. They are replaced by actual values on export. There are four custom text variables being supported, For more information, see Custom Text Variables.

  8. Select a Custom Text Mode to specify if this text should be appended, prefixed to or completely replace the corresponding entity in the mi.
  9. Select the name in the Attribute Editor, for example mentalrayText1, and type myMaterial.

    After applying the text you should rename the node to some descriptive identifier, perhaps including a hint about the mode of application. Especially the shader text nodes should get a name that mentions their intended use because the Custom Shader Text section gathers all light, camera, material, and shader text nodes into one menu.

  10. Select the Blinn node again.

    The text editor shows the new entry myMaterial.

  11. Select File > Export All and export the scene to a mental ray (mi) file.
    Note:

    The Custom Text feature is intended for use only with the mental ray standalone renderer. To correctly render a scene containing shader/object modifications made using Custom Text, the scene must first be exported to .mi format, then rendered with the standalone product.