RfM
RiMel - rgbMeshArchives


return to main index

Download:
    scripts.zip



Introduction

This page presents six scripts that implement an interface that enables a prebaked archive to be "placed" at the vertices of a polymesh - figure 1. Unlike a similar interface presented in the tutorial RfM: meshArchives the one given here allows the placement of the archives to be controlled by the color input node, such as a texture, connected to the RIS material assigned to the polymesh.


Figure 1 (rollover)


Step 1

Download and unzip the scripts.zip file. Copy the following three scripts to your maya/projects/RfM_mel directory. Refer to the tutorial "RfM: Customizing" for information about this directory.

    maya/projects/RfM_mel/
                         |_ rgbMeshArchives.rman
                         |_ rgbMeshArchivesUI.mel
                         |_ rgbMeshArchivesRI.mel

Copy these two scripts to your maya/scripts directory. Ignore the scripts if you already have them.

    maya/scripts/
                |_ getNormals.mel
                |_ getVertices.mel
                |_ getVertexRGB.mel

Step 2

Create an object that will be exported as a rib archive. Make sure it is at the origin of the modelling plane. Go to the Modify menu item in Maya and choose "Freeze Transforms".

Go to the File menu and choose "Export Selection". In the "General Options" panel select "RIB_Archive". Save the rib archive in the project directory. Finally, hide the object.


Step 3

Create a polyPlane with, say, 20 x 20 divisions. Deselect it and reselect it.
In the script editor window run this command,
        rgbMeshArchivesUI;
You should see the interface shown below under the transform node tab.



Figure 2


Use the "Rib Archive" browse button and select the archive that was exported in step 1. Assign a PxrLMDiffuse material to the polyPlane and connect a standard Maya File node to the "Front Color". Add the name of the node to the "Color Input Node" parameter - outlined in red in figure 2.


Step 4

Render the scene.






© 2002- Malcolm Kesson. All rights reserved.