ShaderMap Version 4.x
Setup Projects from Command Line with XML
This feature is deprecated and will be removed in a future version. Use the LUA Script API to setup projects from command line.

ShaderMap allows project nodes and materials to be setup from command line using an XML script. The file passed to the command line must have the extension .XML to work. Below is an example XML Command Line script that loads a single source Color Map and generates a Displacement Map from it:



<?xml version="1.0" encoding="utf-8" ?>

<shadermap_cl_setup>

   <node_count v="2" />

   <node_0 plugin="src_color_texture" file="C:\color_map.jpg" mask="C:\color_map_mask.png"
        property_values="0;0;" row_col="0;0;" />

   <node_1 plugin="map_diff_to_disp_2" inputs="0;"
        property_values="0;21;100;20;20;0;96;96;99;1;5;0;0;1;1;0;" row_col="1;1;"
        save_path="C:\color_map_mask_DISP" save_format="11" />

   <material_count v="1" />

   <material_0 plugin="0.standard" maps="0;1;#D;#D;" is_default="1" />

</shadermap_cl_setup>




The XML document must include the shadermap_cl_setup section with node_count and the material_count tags inside. For every node a node_(NUMBER 0-N) tag must be included. Likewise for every material a material_(NUMBER 0-N) tag must be included. Below is a list and description of all node_# and material_# attributes. All attributes marked with * are required.

Tag <node_# />
  • plugin * - The name of the node plugin. This is the name of the plugin binary file without the extension. For a complete list of included node plugin names, scroll down the page.
  • file - If the node is a source map or source model then this is required. It is the full file path location of the file to use as source.
  • mask - The file path to a Mask image associated with the map node.
  • inputs - If the node requires inputs then this attribute is required. It sets a list of node ids to use as inputs. Node IDs are separated by semicolons. Input Nodes should already be defined.
  • property_values - If the node has properties then a list of property values is listed. A special value of #D can be listed to force a default value. Property values are listed from top to bottom and are divided by a semicolon. For a list of allowed property types and values, scroll down the page.
  • row_col - A list of two numbers representing the position of the node in the Project Grid. Row;Column;
  • save_path - The file path to a save location for a map node. The filename should not have an extension on it.
  • save_format - A number value representing the output format. To view a complete list of output formats, scroll down the page.
  • cage - Only valid for plugin type 3d_model. It is the file path location to a 3D Cage Model.
Tag <material_# />
  • plugin * - The name of the material plugin. This is the name of the plugin file without the extension. For a complete list of included material plugin names, scroll down the page.
  • maps - If the material uses maps then list the map node IDs separated by a semicolon. The map node IDs are listed from top to bottom. A special value of #D can be used to force a default map to be passed to the material.
  • is_default - If set to 1 then the material is applied to all default geometry in the Material Visualizer.



Node Plugin Names:

NameDescription
3d_modelA source 3D Model


src_color_textureSource Color Map / Texture
src_disp_mapSource Displacement Map
src_norm_mapSource Normal Map


map_blank_normBlank Normal Map
map_blendBlend Map (A, B)
map_blend_normBlend Normal Map (A, B)
map_diff_to_albedoAlbedo (Diffuse)
map_diff_to_dispDisplacement (Diffuse) - Deprecated
map_diff_to_disp_2Displacement (Diffuse)
map_disp_to_aoAmbient Occlusion (Displacement) - Deprecated
map_disp_to_ao_2Ambient Occlusion (Displacement)
map_disp_to_dudvDUDV (Displacement)
map_disp_to_normNormal Map (Displacement) - Deprecated
map_disp_to_norm_2Normal Map (Displacement)
map_disp_to_specSpecular (Displacement)
map_model_to_aoAmbient Occlusion (3D Model)
map_model_to_color_idColor ID (3D Model)
map_model_to_curveCurve Map (3D Model)
map_model_to_dispDisplacement (3D Model)
map_model_to_ts_normTangent Space Normal Map (3D Model)
map_model_to_ws_normWorld Space Normal Map (3D Model)
map_norm_to_dispDisplacement (Normal Map)
map_norm_to_normNormal Map (Normal Map)


Material Plugin Names:

NameDescription
0.standardStandard Material
01.displaceDisplacement Material
1.parallaxParallax Offset Material
2.celCell Shading Material


Property Type Values:

Property TypeValue Description
Page ListAn integer in a zero based index representing the selected list item. Always the first property. A page list will modify the properties underneath it. Ex. Map nodes with two rendering modes use Page List properties.
FileA full file path to the file location.
Checkbox0 for unchecked, 1 for checked.
ListAn integer in a zero based index representing the selected list item.
NumberboxEither an integer or floating point value, depending on the type set.
ColorboxA color packed into a 32 bit unsigned integer. Each color channel is a byte packed into the first 24 bytes in order R (0), G (8), B (16). See the Windows RGB Macro.
SliderAn integer number representing the position of the slider.
Coordinate SystemAn unsigned integer where X, Y, and Z directions are combined with a bitwise OR operator. Below are the direction definitions:
  • MAP_COORDSYS_X_POS_LEFT 0x00000001
  • MAP_COORDSYS_X_POS_RIGHT 0x00000002
  • MAP_COORDSYS_Y_POS_UP 0x00000004
  • MAP_COORDSYS_Y_POS_DOWN 0x00000008
  • MAP_COORDSYS_Z_POS_NEAR 0x00000010
  • MAP_COORDSYS_Z_POS_FAR 0x00000020


Output File Formats:

IDDescription
0MAP_FORMAT_BMP_INDEX_8
1MAP_FORMAT_BMP_RGB_8
2MAP_FORMAT_BMP_RGBA_8


3MAP_FORMAT_DDS_DXT1
4MAP_FORMAT_DDS_DXT3
5MAP_FORMAT_DDS_DXT5


6MAP_FORMAT_JPEG


7MAP_FORMAT_PCX_INDEX_8
8MAP_FORMAT_PCX_RGB_8


9MAP_FORMAT_PNG_INDEX_8
10MAP_FORMAT_PNG_RGB_8
11MAP_FORMAT_PNG_RGBA_8
12MAP_FORMAT_PNG_RGB_16
13MAP_FORMAT_PNG_RGBA_16


14MAP_FORMAT_PSD_INDEX_8
15MAP_FORMAT_PSD_RGB_8
16MAP_FORMAT_PSD_RGB_16


17MAP_FORMAT_TGA_INDEX_8
18MAP_FORMAT_TGA_RGB_8
19MAP_FORMAT_TGA_RGBA_8


20MAP_FORMAT_TIF_RGB_8
21MAP_FORMAT_TIF_RGBA_8
22MAP_FORMAT_TIF_RGB_16
23MAP_FORMAT_TIF_RGBA_16


24MAP_FORMAT_EXR_16F
25MAP_FORMAT_EXR_RGB_16F
26MAP_FORMAT_EXR_RGBA_16F
27MAP_FORMAT_EXR_32F
28MAP_FORMAT_EXR_RGB_32F
29MAP_FORMAT_EXR_RGBA_32F


30MAP_FORMAT_HDR_RGB_32F

ShaderMap Software Documentation
Copyright © 2017 Rendering Systems Inc.