.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5. .TH CMGEN "1" "October 2021" "cmgen is a command-line tool for generating SH and mipmap levels from an env map." "User Commands" .SH NAME cmgen \- filament material tools .SH DESCRIPTION cmgen is a command\-line tool for generating SH and mipmap levels from an env map. Cubemaps and equirectangular formats are both supported, automatically detected according to the aspect ratio of the source image. .SS "Usages:" .IP cmgen [options] cmgen [options] .SS "Supported input formats:" .IP PNG, 8 and 16 bits Radiance (.hdr) Photoshop (.psd), 16 and 32 bits OpenEXR (.exr) .SH OPTIONS .HP \fB\-\-help\fR, \fB\-h\fR .IP Print this message .HP \fB\-\-license\fR .IP Print copyright and license information .HP \fB\-\-quiet\fR, \fB\-q\fR .IP Quiet mode. Suppress all non\-error output .HP \fB\-\-type\fR=\fI\,[cubemap\/\fR|equirect|octahedron|ktx], \fB\-t\fR [cubemap|equirect|octahedron|ktx] .IP Specify output type (default: cubemap) .HP \fB\-\-format\fR=\fI\,[exr\/\fR|hdr|psd|rgbm|rgb32f|png|dds|ktx], \fB\-f\fR [exr|hdr|psd|rgbm|rgb32f|png|dds|ktx] .IP Specify output file format. ktx implies \fB\-type\fR=\fI\,ktx\/\fR. KTX files are always encoded with 3\-channel RGB_10_11_11_REV data .HP \fB\-\-compression\fR=\fI\,COMPRESSION\/\fR, \fB\-c\fR COMPRESSION .IP Format specific compression: .IP KTX: .IP astc_[fast|thorough]_[ldr|hdr]_WxH, where WxH is a valid block size s3tc_rgba_dxt5 etc_FORMAT_METRIC_EFFORT .IP FORMAT is rgb8_alpha, srgb8_alpha, rgba8, or srgb8_alpha8 METRIC is rgba, rgbx, rec709, numeric, or normalxyz EFFORT is an integer between 0 and 100 .IP PNG: Ignored PNG RGBM: Ignored Radiance: Ignored Photoshop: 16 (default), 32 OpenEXR: RAW, RLE, ZIPS, ZIP, PIZ (default) DDS: 8, 16 (default), 32 .HP \fB\-\-size\fR=\fI\,power\-of\-two\/\fR, \fB\-s\fR power\-of\-two .IP Size of the output cubemaps (base level), 256 by default Also applies to DFG LUT .HP \fB\-\-deploy\fR=\fI\,dir\/\fR, \fB\-x\fR dir .IP Generate everything needed for deployment into .HP \fB\-\-extract\fR=\fI\,dir\/\fR .IP Extract faces of the cubemap into .HP \fB\-\-extract\-blur\fR=\fI\,roughness\/\fR .IP Blurs the cubemap before saving the faces using the roughness blur .HP \fB\-\-clamp\fR .IP Clamp environment before processing .HP \fB\-\-no\-mirror\fR .IP Skip mirroring of generated cubemaps (for assets with mirroring already backed in) .HP \fB\-\-ibl\-samples\fR=\fI\,numSamples\/\fR .IP Number of samples to use for IBL integrations (default 1024) .HP \fB\-\-ibl\-ld\fR=\fI\,dir\/\fR .IP Roughness pre\-filter into .HP \fB\-\-sh\-shader\fR .IP Generate irradiance SH for shader code .SS "Private use only:" .HP \fB\-\-ibl\-dfg\fR=\fI\,filename\/\fR.[exr|hdr|psd|png|rgbm|rgb32f|dds|h|hpp|c|cpp|inc|txt] .IP Compute the IBL DFG LUT .HP \fB\-\-ibl\-dfg\-multiscatter\fR .IP If \fB\-\-ibl\-dfg\fR is set, computes the DFG for multi\-scattering GGX .HP \fB\-\-ibl\-dfg\-cloth\fR .IP If \fB\-\-ibl\-dfg\fR is set, adds a 3rd channel to the DFG for cloth shading .HP \fB\-\-ibl\-is\-mipmap\fR=\fI\,dir\/\fR .IP Generate mipmap for pre\-filtered importance sampling .HP \fB\-\-ibl\-irradiance\fR=\fI\,dir\/\fR .IP Diffuse irradiance into .HP \fB\-\-ibl\-no\-prefilter\fR .IP Use importance sampling instead of prefiltered importance sampling .HP \fB\-\-ibl\-min\-lod\-size\fR .IP Minimum LOD size [default: 16] .HP \fB\-\-sh\fR=\fI\,bands\/\fR .IP SH decomposition of input cubemap .HP \fB\-\-sh\-output\fR=\fI\,filename\/\fR.[exr|hdr|psd|rgbm|rgb32f|png|dds|txt] .IP SH output format. The filename extension determines the output format .HP \fB\-\-sh\-irradiance\fR, \fB\-i\fR .IP Irradiance SH coefficients .HP \fB\-\-sh\-window\fR=\fI\,cutoff\/\fR|no|auto (default), \fB\-w\fR cutoff|no|auto (default) .IP SH windowing to reduce ringing .HP \fB\-\-debug\fR, \fB\-d\fR .IP Generate extra data for debugging .PP Cubemaps and equirectangular formats are both supported, automatically detected according to the aspect ratio of the source image. .SS "Usages:" .IP cmgen [options] cmgen [options] .SS "Supported input formats:" .IP PNG, 8 and 16 bits Radiance (.hdr) Photoshop (.psd), 16 and 32 bits OpenEXR (.exr) .HP \fB\-\-help\fR, \fB\-h\fR .IP Print this message .HP \fB\-\-license\fR .IP Print copyright and license information .HP \fB\-\-quiet\fR, \fB\-q\fR .IP Quiet mode. Suppress all non\-error output .HP \fB\-\-type\fR=\fI\,[cubemap\/\fR|equirect|octahedron|ktx], \fB\-t\fR [cubemap|equirect|octahedron|ktx] .IP Specify output type (default: cubemap) .HP \fB\-\-format\fR=\fI\,[exr\/\fR|hdr|psd|rgbm|rgb32f|png|dds|ktx], \fB\-f\fR [exr|hdr|psd|rgbm|rgb32f|png|dds|ktx] .IP Specify output file format. ktx implies \fB\-type\fR=\fI\,ktx\/\fR. KTX files are always encoded with 3\-channel RGB_10_11_11_REV data .HP \fB\-\-compression\fR=\fI\,COMPRESSION\/\fR, \fB\-c\fR COMPRESSION .IP Format specific compression: .IP KTX: .IP astc_[fast|thorough]_[ldr|hdr]_WxH, where WxH is a valid block size s3tc_rgba_dxt5 etc_FORMAT_METRIC_EFFORT .IP FORMAT is rgb8_alpha, srgb8_alpha, rgba8, or srgb8_alpha8 METRIC is rgba, rgbx, rec709, numeric, or normalxyz EFFORT is an integer between 0 and 100 .IP PNG: Ignored PNG RGBM: Ignored Radiance: Ignored Photoshop: 16 (default), 32 OpenEXR: RAW, RLE, ZIPS, ZIP, PIZ (default) DDS: 8, 16 (default), 32 .HP \fB\-\-size\fR=\fI\,power\-of\-two\/\fR, \fB\-s\fR power\-of\-two .IP Size of the output cubemaps (base level), 256 by default Also applies to DFG LUT .HP \fB\-\-deploy\fR=\fI\,dir\/\fR, \fB\-x\fR dir .IP Generate everything needed for deployment into .HP \fB\-\-extract\fR=\fI\,dir\/\fR .IP Extract faces of the cubemap into .HP \fB\-\-extract\-blur\fR=\fI\,roughness\/\fR .IP Blurs the cubemap before saving the faces using the roughness blur .HP \fB\-\-clamp\fR .IP Clamp environment before processing .HP \fB\-\-no\-mirror\fR .IP Skip mirroring of generated cubemaps (for assets with mirroring already backed in) .HP \fB\-\-ibl\-samples\fR=\fI\,numSamples\/\fR .IP Number of samples to use for IBL integrations (default 1024) .HP \fB\-\-ibl\-ld\fR=\fI\,dir\/\fR .IP Roughness pre\-filter into .HP \fB\-\-sh\-shader\fR .IP Generate irradiance SH for shader code .SS "Private use only:" .HP \fB\-\-ibl\-dfg\fR=\fI\,filename\/\fR.[exr|hdr|psd|png|rgbm|rgb32f|dds|h|hpp|c|cpp|inc|txt] .IP Compute the IBL DFG LUT .HP \fB\-\-ibl\-dfg\-multiscatter\fR .IP If \fB\-\-ibl\-dfg\fR is set, computes the DFG for multi\-scattering GGX .HP \fB\-\-ibl\-dfg\-cloth\fR .IP If \fB\-\-ibl\-dfg\fR is set, adds a 3rd channel to the DFG for cloth shading .HP \fB\-\-ibl\-is\-mipmap\fR=\fI\,dir\/\fR .IP Generate mipmap for pre\-filtered importance sampling .HP \fB\-\-ibl\-irradiance\fR=\fI\,dir\/\fR .IP Diffuse irradiance into .HP \fB\-\-ibl\-no\-prefilter\fR .IP Use importance sampling instead of prefiltered importance sampling .HP \fB\-\-ibl\-min\-lod\-size\fR .IP Minimum LOD size [default: 16] .HP \fB\-\-sh\fR=\fI\,bands\/\fR .IP SH decomposition of input cubemap .HP \fB\-\-sh\-output\fR=\fI\,filename\/\fR.[exr|hdr|psd|rgbm|rgb32f|png|dds|txt] .IP SH output format. The filename extension determines the output format .HP \fB\-\-sh\-irradiance\fR, \fB\-i\fR .IP Irradiance SH coefficients .HP \fB\-\-sh\-window\fR=\fI\,cutoff\/\fR|no|auto (default), \fB\-w\fR cutoff|no|auto (default) .IP SH windowing to reduce ringing .HP \fB\-\-debug\fR, \fB\-d\fR .IP Generate extra data for debugging