Configuration and Settings

 
Important Note

Outdated Version:
You are looking at an outdated documentation version for an older RapidCompact CLI distribution. If you are using a newer version of the CLI please refer to the documentation of the current CLI release version.

< previous page next page >
 

Creating and Using a Config File

 back to top

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.

One way to configure the settings is to use a config file. The config file is a text file in JSON format, which can be easily edited. To create one that already contains the default values for all the available settings, use the command write_config with a filename. Example:

         rpdx --write_config rpd_config.json         

Additionally it is possible to just use the short command write_config without an argument. The resulting file will always be named as default: rpd_config.json Example:

         rpdx --write_config

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:

         rpdx --read_config someDirectory/myConfig.json         

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:

             [...]
             "decimation:method" : "quadric",
             "rendering:imageWidth"  : 1024,
             "rendering:imageHeight" : 1024,
             [...]

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.

 

Changing Settings using the Command Line

 back to top

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:

         rpdx -i myMesh.ply -s decimation:method edgeLength --decimate v:10% -e myMesh-decimated.ply         

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:

         rpdx --read_config decimation_config.json --read_config rendering_config.json ...         

Finally, to print the current value of a setting, there is also a get command (shorthand: g).

 

Changing Logging Verbosity

 back to top

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:


Available Settings

 back to top

The following table lists all available settings of RapidCompact CLI, grouped by the related functionality or command.

 
Ambient Occlusion

Name Type Default Valid Range Quick Description
ao:enabled Flag false {true, false} turns AO (Ambient Occlusion) generation on/off
ao:replaceMissingAlbedo Flag false {true, false} turns replacement of missing base color by AO map on/off
ao:textureSamples Int 32 {0 .. 64} number of samples per texel for AO map generation
ao:vertexSamples Int 100 {1 .. 1024} number of samples per vertex for AO generation
ao:filterRadius Real 3 {0 .. 16} filter radius for smoothing the AO map (if any)

 
Texture Baking

Name Type Default Valid Range Quick Description
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: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
back to top

 
Compact

Name Type Default Valid Range Quick Description
compact:removeInvisibleGeometry Flag false {true, false} remove invisible triangles after decimation, but before unwrapping
compact:pixelsPerUnitLength Real 0 {0 .. inf} number of pixels per unit length (e.g. per meter)
compact:atlasingMode String separateAlpha {'single', 'separateAlpha', 'separateNormals', 'separateAlphaNormals', 'separateMaterials'} mode used to assign meshes to atlases
compact:powerOfTwoTextures String ceil {'none', 'ceil', 'floor', 'round'} compact ensures that textures have power of two dimensions
compact:removeSmallFeatures String or % a percentage or absolute value for bounding box relative to total bounding box below which lumps are removed
compact:splitMode String auto {'auto', 'none', 'byOpacity', 'byMaterial'} mode used to deal with meshes with multiple materials

 
Mesh Decimation

Name Type Default Valid Range Quick Description
decimation:collapseUnconnectedVertices Flag true {true, false} switches collapsing of nearby, unconnected vertices on/off
decimation:preserveCommonMeshBorders Flag true {true, false} preserves borders (vertices) common between meshes
decimation:preserveMaterialBorders Flag false {true, false} preserves mesh material borders during decimation
decimation:preserveNormals Flag false {true, false} preserves vertex normals during decimation
decimation:preserveTiledUVs Flag false {true, false} preserves repeating texture coordinates during decimation
decimation:preserveTopology Flag true {true, false} switches computation of new normals after decimation on or off
decimation:preserveUVs Flag false {true, false} preserves texture coordinates during decimation
decimation:recomputeNormals Flag true {true, false} switches computation of new normals after decimation on or off
decimation:boundaryPreservationFactor Real 0.5 {0 .. 1} factor to steer preservation of boundaries during decimation
decimation:collapseDistanceThreshold Real 0.005 {0 .. 0.10000000000000001} threshold w.r.t BBox diagonal for collapsing nearby vertices
decimation:tiledUVThreshold Real 1.5 {1 .. inf} UV extent after which a UV channel is considered repeating (= tiling texture)
decimation:defaultTarget String f:20000 ; f:; %; f:% target parameter for decimation during compact
decimation:method String quadric {'quadric', 'edgeLength'} method to be used for decimation
back to top

 
Model Export

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:displacementToNormalMapAlpha Flag false {true, false} bakes displacement values into the normal map's alpha channel
export:excludeTangents Flag false {true, false} prevents export of tangent data, expects render client to compute them in MikkTSpace
export:forceDoubleSidedMaterials Flag false {true, false} export all materials as double sided
export:preferBinaryFormat Flag true {true, false} turns export in binary format on/off (if available)
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: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:scaling Real 1 {2.2250738585072014e-308 .. inf} asset scaling before export, does not affect asset for further processing
export:baseColorMapFormat String auto jpg; png; ktx-basis-etc1s; ktx-basis-uastc desired output file format for base color maps
export:clearcoatMapFormat String auto jpg; png; ktx-basis-etc1s; ktx-basis-uastc desired output file format for clearcoat maps
export:clearcoatNormalMapFormat String auto jpg; png; ktx-basis-etc1s; ktx-basis-uastc desired output file format for clearcoat normal maps
export:displacementMapFormat String auto jpg; png; ktx-basis-etc1s; ktx-basis-uastc desired output file format for displacement maps
export:emissiveMapFormat String auto jpg; png; ktx-basis-etc1s; ktx-basis-uastc desired output file format for emissive maps
export:geometryCompression String none none; draco; dracoLossy desired geometry compression (currently only available for GLTF/GLB export)
export:metallicMapFormat String auto jpg; png; ktx-basis-etc1s; ktx-basis-uastc desired output file format for metallic maps
export:normalMapFormat String auto jpg; png; ktx-basis-etc1s; ktx-basis-uastc desired output file format for normal maps
export:occlusionMapFormat String auto jpg; png; ktx-basis-etc1s; ktx-basis-uastc desired output file format for occlusion maps
export:roughnessMapFormat String auto jpg; png; ktx-basis-etc1s; ktx-basis-uastc desired output file format for roughness maps
export:sheenColorMapFormat String auto jpg; png; ktx-basis-etc1s; ktx-basis-uastc desired output file format for sheen color maps
export:specGlossMapFormat String auto jpg; png; ktx-basis-etc1s; ktx-basis-uastc desired output file format for specular+glossiness maps
export:specularMapFormat String auto jpg; png; ktx-basis-etc1s; ktx-basis-uastc desired output file format for specular maps
export:textureMapFilePrefix String prefix to be used for texture map names
export:thicknessMapFormat String auto jpg; png; ktx-basis-etc1s; ktx-basis-uastc desired output file format for thickness maps
export:transmissionMapFormat String auto jpg; png; ktx-basis-etc1s; ktx-basis-uastc desired output file format for transmission maps

 
Flattening

Name Type Default Valid Range Quick Description
flattening:mode String auto {'auto', 'byOpacity', 'byMaterial', 'full', 'none'} mode to be used for flattening

 
General

Name Type Default Valid Range Quick Description
general:maxConcurrentThreads Int 0 {0 .. inf} maximum number of concurrent threads. 0 means no limit (adapts to number of cores), other numbers act as fixed maximum.
general:normalsHardAngleDeg Real 60 {0 .. 180} hard angle (degrees) used for normal generation (0 = everything flat, 180 = everything smooth)
general:normalsComputationMethod String area angle, area weighting method for computation of mesh normals

 
Geometry Compression

Name Type Default Valid Range Quick Description
geoCompression:normalQuantization Int 10 {1 .. 32} bits per normal vertex attribute (if geometry compression is enabled)
geoCompression:positionQuantization Int 14 {1 .. 32} bits per position vertex attribute (if geometry compression is enabled)
geoCompression:uvQuantization Int 12 {1 .. 32} bits per UV vertex attribute (if geometry compression is enabled)
back to top

 
Model Import

Name Type Default Valid Range Quick Description
import:discardAnimations Flag false {true, false} if true, discards any imported animations
import:discardUnusedUVs Flag false {true, false} if true, discards unused UV sets (if possible)
import:recomputeNormals Flag false {true, false} if true, discards the original normals and recomputes them
import:rotateZUp Flag false {true, false} turns rotation to z-axis pointing upwards on/off
back to top

 
UV Inpainting

Name Type Default Valid Range Quick Description
inpainting:radius Real 32 {0 .. 32} radius, in pixels, for texture inpainting

 
Log

Name Type Default Valid Range Quick Description
logging:infoLevel Int 3 {0 .. 4} logging verbosity (0 = quiet, 4 = debug)

 
Material Settings

Name Type Default Valid Range Quick Description
material:defaultMetallic Real 0 {0 .. 1} default material metallic property
material:defaultRoughness Real 0.5 {0 .. 1} default material roughness property
material:defaultBaseColor String 1 1 1 , , default material base color

 
Chart Packing

Name Type Default Valid Range Quick Description
packing:pixel_distance Int 2 {1 .. inf} distance in pixels packing will keep at reference packing resolution
packing:resolution Int 1024 {0 .. inf} resolution at which packing will be computed

 
Remeshing

Name Type Default Valid Range Quick Description
remeshing:quadDominant Flag false {true, false} switches remeshing from creating quad meshes to quad dominant meshes

 
Rendering

Name Type Default Valid Range Quick Description
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:background String transparent {'transparent', 'white', 'black', 'gradientGray', 'vignette'} 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', 'diffuse'} rendering method
back to top

 
Mesh Segmentation

Name Type Default Valid Range Quick Description
segmentation:maxPrimitivesPerChart Int 10000 {1 .. inf} limits max number primitives in any UV chart
segmentation:chartAngleDeg Real 130 {0 .. 360} threshold (degrees) for overall curvature of 3D charts
segmentation:cutAngleDeg Real 88 {0 .. 180} threshold (degrees) for cutting sharp edges

 
Mesh Unwrapping

Name Type Default Valid Range Quick Description
unwrapping:cutOverlappingPieces Flag true {true, false} turns removal of UV self-overlaps through cutting on/off
unwrapping:method String isometric {'isometric', 'forwardBijective', 'fixedBoundary', 'fastConformal', 'conformal'} method to be used for UV unwrapping
back to top

 
Visibility

Name Type Default Valid Range Quick Description
visibility:quality String default {'default', 'fast', 'thorough', 'extreme'} specify how fast or thorough triangle visibility should be determined



< previous page next page >