General commands
Introduction
The Simplygon MEL command has a number of flags which can be set from a script, for example the -tod flag which indicates that the default texture output folder shall be overridden:Simplygon -tod "c:/MyTextureOutputFolder"
.
The following listing shows all supported MEL commands and flags.
Command |
---|
Simplygon |
Short | Long | Argument(s) | Description |
---|---|---|---|
-b |
-BatchMode |
<none> | Force Simplygon to run in batch mode using the current settings, without opening the UI. |
-lb |
-LockBone |
string boneName bool isLocked |
Lock or unlock a specific bone (and their parents), depending on if lock is true or false . A locked bone will not be removed when processing a boneLOD in Simplygon. |
-rb |
-RemoveBone |
string boneName |
Defines which bones to remove when doing a boneLOD in Simplygon. All the mesh's vertices will be disconnected from these bones and and will instead be hooked up to nearest enabled parent bone. Note: The bones will not be removed from the scene! |
-lsv |
-LockSetVertices |
string setName |
Locks vertices in the named set. These vertices will not be touched when generating the MeshLOD. |
-mc |
-MaterialColor |
string materialName string channelName float r float g float b float a |
Overrides or creates the color on the specified channel of the material. |
-mt |
-MaterialTexture |
string materialName string channelName string texturePath |
Overrides or sets the texture on the specified channel of the material. |
-mlt |
-MaterialLayeredTexture |
string materialName string channelName string texturePath int layer string blendType |
Overrides or sets the texture on the specified texture layer of the material. Blend type can be add , multiply , subtract or none . |
-mtn |
-MaterialTextureNormals |
string materialName string texturePath bool isTangentSpace |
Overrides the normals texture of the material. Set the third parameter isTangentSpace to true if the normal map is in tangent space. |
-tcn |
-MaterialTextureChannelName |
string materialName string channelName string uvSetName |
Overrides the UV-set for the material. |
-tod |
-TextureOutputDirectory |
string outputPath |
Overrides the texture output folder for all processed textures to this absolute path. |
-caw |
-UseColorSetAsWeights |
string colorSetName |
Sets which color set to use as vertex weights. |
-wm |
-SetWeightsMultiplier |
float multiplier |
Sets the weight multiplier. The lower bound of the weights is 1/multiplier and the upper bound is multiplier . The multiplier must be in the range 2-8. |
-wi |
-SetWeightsInterpreter |
uint interpreter |
Sets which interpreter to use when interpreting vertex colors as weights0 Black: reduce more | White: reduce less1 Black: unchanged | White: reduce less2 Black: reduce more | White: unchanged. |
-ss |
-SelectionSet |
string setName string objectNames (separated by |) |
Creates a Selection Set that can be used for grouping objects. These groups can, if specified in the Simplygon UI, be used to process objects individually. Ex: setName "objectName1\|objectName2\|objectNameN\|" . |
-cpb |
-UseCurrentPoseAsBindPose |
<none> | Specifies that the skinning data will be extracted from the current pose rather than the bind pose. Please do not use this flag when in bind pose as synchronization issues might appear! |
-swp |
-SkipBlendShapeWeightPostfix |
<none> | If set, the default prefix in blend shape attribute names (_LOD, as in Mouth_LOD1) will be removed. Note: If set, all generated target meshes will be left in the scene! |
-sf |
-SettingsFile |
string settingsPath |
Sets the path to the preset/SPL which will be used when processing. Note: SPL files are only allowed in combination with batch mode. |
-spl |
-SPL |
string splObjectName |
Specifies which SPL object to use (created with spl_Create ). |
Examples
Batch mode
To launch Simplygon in Batch/Silent mode, assign your login information to SimplygonSecurity. Thereafter add the batch mode flag and the preset flag followed by the preset path.
SimplygonSecurity -su "username" -sp "password";
Simplygon -b -sf "c:/MyPreset.preset";
Material color override
To override a color of a material channel, enter the material name, the name for the channel and the rgba values for a specific color. In the example below we choose to set the diffuse channel of "MyMaterial" to blue. If the material channel does not exist it will be created.
Simplygon -mc "MyMaterial" "Diffuse" 0 0 1 1
Material texture override
To override a texture of a material channel, enter the name of the material, the name of the channel and at last the path to the texture. In the example below we choose to set a diffuse texture to the diffuse channel of the material. If the material channel does not exist it will be created.
Simplygon -mt "MyMaterial" "Diffuse" "c:/MyTexture.jpg"
Weight sets
To set the weight multiplier, start by setting which color set to use as vertex weights.
Simplygon -caw "SimplygonColorSet"
Then, set the weight multiplier (a value between 2 and 8):
-wm 8
Set which interpreter to use (a value between 0 and 2, where 0 is default):
-wi 0
Selection sets
To create a selection set, enter the name of the set to be created followed by a list of objects seaprated by a "|" without the quotes.
Simplygon -ss "SelectionSet1" "pCube1|pCube2|pCube3"