NOT YET IMPLEMENTED

NOT YET IMPLEMENTED


fig 1. fig 2. 
The Render Sampler Info node enables you to sample any shading node in Maya and have its results control the attributes of any objects in your scene.  Unlike a command, the Render Sampler Info node updates its results whenever any of its inputs changes, allowing you to integrate shading nodes into your scene setup.

Depending on the type of shading node that you are using, different types of input are required.  For 2D textures such as File nodes and Ramps, you only to provide the node with UV information.  For 3D textures such as Crater or Volume Noise, you only to provide the node with positional information.  For Materials and Shading Groups, you need to provide normal information so that lighting calculation will know which direction the current sample point is facing.

The inputs and outputs of the Render Sampler Info node are all array attributes, so you can calculate multiple results at a time.  In fact, it is more efficient to have a single Render Sampler Info node calculate 1000 points than have 1000 Render Sampler Info nodes calculating a single point each.

The Render Sampler Info node is extremely powerful and configurable.  Each input must be thought of as a pixel and depending on the type of shader that you are sampling, you may need to provide only the UV value for that pixel or the Position, Normal, Tangent and UV Values.  When using the Render Sampler Info node to drive an attribute of an object in your scene, the methods by which you provide the sampler node with that data is quite arbitrary.  The obvious connection that could be made is to control the Position attribute of the sampler with the Translate attribute of the object. This would allow the sampler node to properly calculate 3D textures, however, if you were to then try to connect the resulting color information from the sampler to the Translate attribute of the object to perform some sort of offsetting, you would end up in a loop.  So it is important to plan out how you want the sampler to get its information.

Creation

Select the objects that you want to have the Render Sampler Info node connect its results to and open the "Constraint -> Render Sampler Options" window.  If you select "Constrain -> Render Sampler" the options window will automatically appear.

Once you have selected the options and hit the Apply button, a Render Sampler Info node will be created and the appropriate connections will be made.  

The Translate attribute of the selected objects will automatically be connected to the Position Attribute of the unless you select the Translate attribute as what you are connecting the results of Render Sampler Info node as this would cause a cycle and produce unexpected results.

In the Attribute Editor for the newly created renderSamplerInfo node, you can assign any shading node to theShader attribute, with the following exceptions :

Creation Options

There are several options for creating the Render Sampler Info node.

Add UV Attributes

With this flag turned on, when the Render Sampler Info node is created, it will automatically add a U Value and V Value attribute to the objects that it is affecting, unless the object already has those attributes, and then connect the attributes to the Render Sampler Info node.  This will allow you modify the UV coordinates that the sampler is using quite efficiently.

If the object that you are controlling with the Render Sampler Info node already has a Mesh Constraint or NURBS Constraint affecting it, it should already have the U Value and V Value attributes which are controlling its attributes on the surface.  This can often make for a more intuitive setup.

Connect Color To
The scroll list lists all of the double3 attributes of the first selected objects and dynamically updates each time the  options window is opened.  Any double3 attribute such as Translate, Rotate, Scale or any custom Vector attributes that you added are shown in this scroll list.  You can select multiple attributes to connect the resulting color of the attached shading node to.

Connect Transparency To

The scroll list lists all of the double3 attributes of the first selected objects and dynamically updates each time the  options window is opened.  Any double3 attribute such as Translate, Rotate, Scale or any custom Vector attributes that you added are shown in this scroll list.  You can select multiple attributes to connect the resulting transparency of the attached shading node to.  Transparency is only outputted for Shading Groups.  For all other rendering nodes, the results will be 0 0 0.

Connect Luminance To

The scroll list lists all of the double attributes of the first selected objects and dynamically updates each time the  options window is opened.  Any double attribute such as Translate X, Rotate Z, Scale  Yor any custom double attributes that you added are shown in this scroll list.  You can select multiple attributes to connect the resulting luminance of the attached shading node to.  The luminance is calculate simply by adding the resulting color's R, G and B and dividing by three as opposed to using a proper luminance calculation of :

    Luminance = 0.3 * red + 0.59 * green + 0.11 * blue

Attributes

Shader

The Shader attribute is where you connect your shading node to the Render Sampler Info node.

Force Update

The Force Update attribute is used to force the Render Sampler Info node to update itself, regardless of whether or not it thinks one of its inputs has changed.  

Position

Position is used by the Render Sampler Info node to calculate 3D Textures as well as any Shading Group nodes.  It is an array attribute.

Ref Position

Ref Position is used by the Render Sampler Info node to calculate 3D Textures with the Local flag attribute set.  It is an array attribute.

Normal

Normal  is used by the Render Sampler Info node for lighting calculations or to calculate the Facing Ratio of a Sampler Info node.  It is an array attribute.

Tangent U

Tangent U is used by the Render Sampler Info for some Shading Group calculations such as Anisotropy or for certain Sampler Info attributes.  It is an array attribute.

TangentV

Tangent V is used by the Render Sampler Info for some Shading Group calculations such as Anisotropy or for certain Sampler Info attributes.  It is an array attribute.

U Value

U Value is used by the Render Sampler Info for all 2D texture calculations such as Ramps or File Textures and for certain Sampler Info attributes.  It is an array attribute.

V Value

V Value is used by the Render Sampler Info for all 2D texture calculations such as Ramps or File Textures and for certain Sampler Info attributes.  It is an array attribute.

Result Color

The Result Color attribute contains the resulting color information from the attached shading node.  It is an array attribute.

Result Color Offset

The Result Color Offset attribute allows you to offset the results of the luminance by a user defined value.  This enables you to either preserve the current value of an attribute and then add the results of the luminance to it.  It is an array attribute.

Result Transparency

The Result Transparency attribute contains the resulting transparency information from the attached Shading Group node.  For all other nodes, it returns a value of 0.  It is an array attribute.

Result Transparency Offset

The Result Transparency Offset attribute allows you to offset the results of the luminance by a user defined value.  This enables you to either preserve the current value of an attribute and then add the results of the luminance to it.  It is an array attribute.

Result Luminance

The Result Luminance attribute contains the resulting luminance information from the attached shading node.  It is an array attribute.

Result Luminance Offset

The Result Normal Offset attribute allows you to offset the results of the luminance by a user defined value.  This enables you to either preserve the current value of an attribute and then add the results of the luminance to it.  It is an array attribute.

Limitations and Workarounds

Limitation : NOT YET IMPLEMENTED

NOT YET IMPLEMENTED.

Examples

NOT YET IMPLEMENTED

Notes

NOT YET IMPLEMENTED

Uses

NOT YET IMPLEMENTED

P & S (Problem and Solutions)

NOT YET IMPLEMENTED