Some parameters for RapidCompact CLI are directly available with the respective commands.
However, many relevant options (like the choice of a specific algorithm for a certain
task, or the resolution for a specific type of texture image) are only available via the
settings mechanism of RapidCompact CLI.
The ratio behind this is to ease usage of the command line, especially for users that are not
familiar with all the details, while still allowing you to configure all relevant
parameters when necessary.
This example writes a config file with filename "rpd_config.json". This special
filename is used by RapidCompact CLI to check, on startup, for an existing config file inside
the current directory. If the file has another filename, or if it is placed at
another location, you can use the read_config command to read it when
launching RapidCompact CLI. Example:
Changing the settings inside a config file is pretty straightforward - just use
your favorite text editor to alter the default values and save the file. When looking
into a config file, you will notice that settings' names are using a URN-like scheme,
separating several parts of the name by a colon. Examples:
The colons are used to separate different parts of each setting's name, where the
first part is always the subsystem of RapidCompact CLI that uses the setting. In the above
example, for instance, the prefix "rendering" tells us that the following part
"imageWidth" refers to a setting inside that subsystem (and nowhere else). For
example, the width of images for texture generation will not be affected by this
setting.
Sometimes, you might want to try out different settings without having to use a
config file. This is easily possible by using the command set
(shorthand: s). Example:
In this example, a mesh is loaded and its 3D geometry is decimated to 10% of the
original vertices. Instead of using the standard decimation method or the one from
the default config file, it is explicitly set to
edgeLength before the decimater is used.
In general, the default value of a setting can be overriden in both ways, using a
config file or using the command line. Both methods, using a config file and using
s on the command line, override the current values of the given
settings, so the current value of a setting also depends on the order in which
previous read_config or s commands are executed. If you
have use for this, you can also split up one large config file into multiple smaller
ones, to separate different aspects of configuration. This is possible since the
settings specified inside the config file do not need to be complete. Instead, a
config file will only override settings for the parameters that are specified,
leaving unspecified settings untouched. Example:
By default, RapidCompact CLI will print some information to the standard output while
executing commands. By specifying a log level, you can influence how verbose this
output will be. To do so, use the "logging:infoLevel" setting. The corresponding
values are:
To show warnings or errors to your users in a clean and readable way, you can simply redirect the warning and error streams that the CLI will produce. You can also create a nice progress bar this way, if you're running the CLI behind a visual UI.
The following table lists all available settings of RapidCompact CLI, grouped by the related functionality or command.
Name | Type | Default | Valid Range | Quick Description |
---|
baking:bakeCombinedScene | Flag | false | [true, false] | bakes the scene as a single entity even if its meshes have transformations |
baking:fixedAtlasResolution | Flag | false | [true, false] | if false, each texture's pixel budget is divided by all atlases |
baking:forceNormalRebaking | Flag | false | [true, false] | rebakes normal maps when preserving UVs, even if UV overlaps are detected |
baking:generateDisplacement | Flag | false | [true, false] | enables/disables the generation of displacement maps |
baking:generateNormal | Flag | true | [true, false] | enables/disables the generation of normal maps when the input has no normal maps |
baking:tangentSpaceNormals | Flag | true | [true, false] | switches between tangent-/object-space normal maps |
baking:baseColorMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked base color and diffuse maps |
baking:clearcoatMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked clearcoat maps |
baking:clearcoatNormalMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked clearcoat normal maps |
baking:clearcoatRoughnessMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked clearcoat roughness maps |
baking:displacementMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked displacement maps |
baking:emissiveMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked emissive maps |
baking:genericMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked generic maps |
baking:iridescenceMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked iridescence maps |
baking:iridescenceThicknessMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked iridescence thickness maps |
baking:metallicMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked metallic maps |
baking:normalMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked normal maps |
baking:occlusionMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked AO maps |
baking:roughnessMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked roughness, specular and glossiness maps |
baking:sampleCount | Int | 4 | [1, 4, 8, 16] | number of samples per texel for texture baking |
baking:sheenColorMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked sheen color maps |
baking:sheenRoughnessMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked sheen roughness maps |
baking:specularColorMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked specular color maps |
baking:specularValueMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked specular value maps |
baking:thicknessMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked thickness maps |
baking:transmissionMapResolution | Int | 2048 | [1 .. 16384] | resolution for baked transmission maps |
baking:forcedDisplacementMax | Real | 0 | [-inf .. inf] | (see baking:forcedDisplacementMin) |
baking:forcedDisplacementMin | Real | 0 | [-inf .. inf] | when forcedDisplacementMax and forcedDisplacementMax are given and valid (min < max), their values are used to clamp and normalize the final entries in the displacement map |
baking:normalMapScale | Real | 1 | [2.2250738585072014e-308 .. inf] | normal scaling for the baked normal map (only used on glTF output) |
baking:skipNormalsRoughnessThreshold | Real | 0 | [0 .. 1] | roughness value below which difference in normals between source/target are not baked |
Name | Type | Default | Valid Range | Quick Description |
---|
compact:addUVsToTiledMeshes | Flag | false | [true, false] | compact unwraps meshes that have tiled UVs and adds additional non-tiling UV layer |
compact:aggregateUVs | Flag | false | [true, false] | if UVs are preserved, combines textures from different materials into a single atlas when possible |
compact:allowRectangularPOTTextures | Flag | false | [true, false] | create rectangular POT textures when beneficial for auto sized textures |
compact:removeInvisibleGeometry | Flag | false | [true, false] | remove invisible triangles after decimation, but before unwrapping |
compact:atlasingFactor | Int | 1 | [1 .. 10] | divide each created atlas into n new atlases |
compact:baseColorFlatTexThreshold | Int | 0 | [0 .. 255] | per channel maximum distance threshold below which this texture will be replaced with material value |
compact:displacementFlatTexThreshold | Int | 0 | [0 .. 255] | per channel maximum distance threshold below which this texture will be replaced with material value |
compact:emissiveFlatTexThreshold | Int | 0 | [0 .. 255] | per channel maximum distance threshold below which this texture will be replaced with material value |
compact:metallicFlatTexThreshold | Int | 0 | [0 .. 255] | per channel maximum distance threshold below which this texture will be replaced with material value |
compact:normalsFlatTexThreshold | Int | 0 | [0 .. 255] | per channel maximum distance threshold below which this texture will be replaced with material value |
compact:occlusionFlatTexThreshold | Int | 0 | [0 .. 255] | per channel maximum distance threshold below which this texture will be replaced with material value |
compact:roughnessFlatTexThreshold | Int | 0 | [0 .. 255] | per channel maximum distance threshold below which this texture will be replaced with material value |
compact:specularFlatTexThreshold | Int | 0 | [0 .. 255] | per channel maximum distance threshold below which this texture will be replaced with material value |
compact:pixelsPerUnitLength | Real | 0 | [0 .. inf] | number of pixels per unit length (e.g. per meter) |
compact:animationSimplification | String | none | ['none', 'conservative', 'aggressive', 'extreme'] | specify how much to simplify animation curves |
compact:atlasingMode | String | separateAlpha | ['single', 'separateAlpha', 'separateNormals', 'separateAlphaNormals', 'separateMaterials'] | mode used to assign meshes to atlases |
compact:materialNamingScript | String | | | script for defining material names after baking |
compact:nodeNamingScript | String | | | script for defining node names during flattening operations |
compact:powerOfTwoTextures | String | ceil | ['none', 'ceil', 'floor', 'round'] | compact ensures that textures have power of two dimensions |
compact:quality | String | default | ['fast', 'thorough'] | specify whether compact should generally try to complete fast or exhaust options |
compact:removeSmallFeatures | String | | or % | percentage (relative to the scene's bounding box) or absolute value (in scene units), defining the largest mesh lump bbox sidelength considered small |
compact:splitMode | String | auto | ['auto', 'none', 'byOpacity', 'byMaterial'] | mode used to deal with meshes with multiple materials |
Name | Type | Default | Valid Range | Quick Description |
---|
export:centerModel | Flag | false | [true, false] | centers the model around the coordinate origin before export |
export:convertToMetalRough | Flag | false | [true, false] | if true, materials are always converted from spec/gloss to rough/metal |
export:discardUnusedUVs | Flag | false | [true, false] | if true, discards unused UV sets on export |
export:displacementToNormalMapAlpha | Flag | false | [true, false] | bakes displacement values into the normal map's alpha channel |
export:excludeTangents | Flag | true | [true, false] | prevents export of tangent data, expects render client to compute them in MikkTSpace |
export:fbxNormalmapYFlip | Flag | false | [true, false] | flip FBX normalmaps Y axis on export |
export:fbxUnitsConversion | Flag | true | [true, false] | deep convert scene units instead of scaling root node |
export:forceDoubleSidedMaterials | Flag | false | [true, false] | export all materials as double sided |
export:forceSeparateOcclusionMap | Flag | false | [true, false] | export a occlusion as a separate map instead of including it in the ORM |
export:preferBinaryFormat | Flag | true | [true, false] | turns export in binary format on/off (if available) |
export:preserveTextureFilenames | Flag | false | [true, false] | keeps he input texture filenames where possible |
export:unlitMaterials | Flag | false | [true, false] | enables that all materials are specified as unlit, for .gltf/.glb export |
export:jpgQuality | Int | 90 | [1 .. 100] | quality (in percent) of images exported as JPG |
export:jpgQualityNormals | Int | 95 | [1 .. 100] | quality (in percent) of images with normal data exported as JPG |
export:ktxCompressionSpeed | Int | 2 | [0 .. 5] | compression speed for KTX (0 = fast, 5 = slow but higher quality) |
export:ktxQuality | Int | 128 | [0 .. 255] | compression quality for KTX (0 = lowest quality but max compression, 255 = max quality) |
export:maxBaseColorMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported base color and diffuse maps |
export:maxClearcoatMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported clearcoat maps |
export:maxClearcoatNormalMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported clearcoat normal maps |
export:maxClearcoatRoughnessMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported clearcoat roughness maps |
export:maxDisplacementMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported displacement maps |
export:maxEmissiveMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported emissive maps |
export:maxGenericMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported generic maps |
export:maxIridescenceMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported iridescence maps |
export:maxIridescenceThicknessMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported iridescence thickness maps |
export:maxMetallicMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported metallic maps |
export:maxNormalMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported normal maps |
export:maxOcclusionMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported AO maps |
export:maxRoughnessMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported roughness, specular and glossiness maps |
export:maxSheenColorMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported sheen color maps |
export:maxSheenRoughnessMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported sheen roughness maps |
export:maxSpecularMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported specular maps |
export:maxThicknessMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported thickness maps |
export:maxTransmissionMapResolution | Int | 16384 | [1 .. 16384] | maximum resolution for exported transmission maps |
export:mipmapCount | Int | 2 | [1 .. inf] | number of mipmap levels generated on export (only supported for KTX2 files) |
export:preferredUVChannel | Int | 0 | [0 .. inf] | if an export format does not support multiple UV channels, pick the one set here |
export:webpQuality | Int | 93 | [1 .. 100] | quality (in percent) of images exported as WebP |
export:webpQualityNormals | Int | 95 | [1 .. 100] | quality (in percent) of images with normal data exported as WebP |
export:scaling | Real | 1 | [2.2250738585072014e-308 .. inf] | asset scaling before export, does not affect asset for further processing |
export:baseColorMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for base color maps |
export:clearcoatMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for clearcoat maps |
export:clearcoatNormalMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for clearcoat normal maps |
export:clearcoatRoughnessMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for clearcoat roughness maps |
export:displacementMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for displacement maps |
export:emissiveMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for emissive maps |
export:fbxAxisSystem | String | | mayaZUp; mayaYUp; max; motionbuilder; opengl; directx; lightwave | desired FBX axis system |
export:fbxUnits | String | m | mm; dm; cm; m; km; inch; foot; mile; yard | desired FBX system unit |
export:geometryCompression | String | none | none; draco; dracoLossy; meshQuantization | desired geometry compression (currently only available for GLTF/GLB export) |
export:iridescenceMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for iridescence maps |
export:iridescenceThicknessMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for iridescence thickness maps |
export:metallicMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for metallic maps |
export:normalMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for normal maps |
export:occlusionMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for occlusion maps |
export:overrideMaterials | String | none | none; defaults | specify if you want to replace all materials on export with another set of materials |
export:roughnessMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for roughness maps |
export:sheenColorMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for sheen color maps |
export:specGlossMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for specular+glossiness maps |
export:specularMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for specular maps |
export:textureCopyPolicy | String | lossyWhenPossible | whenPossible; lossyWhenPossible; never | specify when to copy or re-export (re-encode) texture files |
export:textureMapFilePrefix | String | | | prefix to be used for texture map names |
export:textureNamingScript | String | | | script for defining texture names |
export:thicknessMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for thickness maps |
export:transmissionMapFormat | String | auto | jpg; png; png8; ktx-basis-etc1s; ktx-basis-uastc; webp | desired output file format for transmission maps |
export:uastcQuality | String | default | default; high; balanced; compressed; high+compressed | compression quality for UASTC KTX |
export:usdProfile | String | arkit | arkit; omniverse; generic | desired USD output usage |
export:usdUnits | String | cm | m; cm; original | desired USD system unit |
Name | Type | Default | Valid Range | Quick Description |
---|
rendering:disableEnvMap | Flag | false | [true, false] | if true, disables the environment map when rendering PBR |
rendering:enableDropShadow | Flag | true | [true, false] | turns rendering of drop shadow on/off |
rendering:showBackFaces | Flag | false | [true, false] | turns rendering of backfaces on/off |
rendering:imageHeight | Int | 1024 | [1 .. 16384] | height to be used for rendered images |
rendering:imageWidth | Int | 1024 | [1 .. 16384] | width to be used for rendered images |
rendering:sampleCount | Int | 4 | [1 .. inf] | number of samples per pixel for image rendering |
rendering:IBLBackgroundBlur | Real | 0.4 | [0 .. 1] | IBL background blur level. 0 not blurred, 1 fully blurred |
rendering:IBLIntensity | Real | 1 | [0 .. 100] | Intensity multiplier for the IBL. 1.0 is default |
rendering:cameraVerticalFOVDeg | Real | 0 | [0 .. 90] | camera vertical field of view in degrees. 0 will use default values |
rendering:IBLFilePath | String | | | file path for the .env IBL to use for rendering. If empty, the default IBL map is used. |
rendering:background | String | transparent | ['transparent', 'white', 'black', 'gradientGray', 'vignette', 'ibl'] | background to be used for rendered images |
rendering:cameraPosition | String | auto | auto | camera position vector for rendering |
rendering:cameraUpVector | String | 0 1 0 | | camera up direction for rendering |
rendering:cameraViewVector | String | 0 0 -1 | | camera direction vector for rendering |
rendering:shadingMode | String | pbr | ['pbr', 'wireframe', 'flat', 'vs_normals', 'diffuse', 'emissive', 'metallic', 'roughness', 'clearcoat', 'clearcoatRoughness', 'specular', 'specularColor', 'occlusion'] | rendering method |