DataPool User Guide

Version 2.13 | Published November 30, 2018 ©

DataMaterial

images/download/attachments/30910247/plugins_datamaterial-icon.png
DataMaterial changes the material parameters of the controlled container. The data specifies any combination of the ambient, diffuse, specular, emission and alpha parameters of the material. The data format is:

[AMBIENT r g b] [DIFFUSE r g b] [SPECULAR r g b] [EMISSION r g b] [ALPHA a]

This format can specify new values for separate material components.

  • [COLOR r g b]: Specifies a color using red green and blue values.

    Note: All color values (r g b) are numbers between 0 and 255. Alpha values are float numbers between 0 and 100.

  • [MATERIAL name]: Specifies a material name from the Viz material library. The message format is: MATERIAL MATERIAL*<name>, where <name> is the full path to a material in Viz material library.

    images/download/attachments/41810658/plugins_datamaterial.png

Example

  • If the received data is MAT[0-3]=DIFFUSE 255 0 0, DIFFUSE 0 255 0, DIFFUSE 0 0 255; then the diffuse component of the material of the first child is red, the diffuse component of the material of the second child is green and, the diffuse component of the material of the third child is blue.

  • If the data received is MAT=COLOR 255 0 0; then all the container materials are set to red.

  • If the data received is MATERIAL MATERIAL*blue; then the material is set to the blue material in Viz material library.

    Note: DataMaterial plugin does not work unless the controlled containers have a material on them. If controlling child containers from a top node, each of the controlled child containers must have a material attached to it. The top container, hosting the DataMaterial plugin, doesn’t need to have a material attached to it.