mdl_distill_material
Distills an MDL material instance to a simpler model and bakes functions as needed.
arguments
- "baker_gpu_id" : Uint32 (default: 0)The device ID of the GPU to be used for baking. Ignored if baker_resource is set to cpu. 
- "baker_resolution" : Uint32<2> (default: Uint32<2>(- x: 1024
- y: 1024
 The resolution for baked textures. 
- "baker_resource" : String (default: "cpu")The compute resource used by the baker. Possible Values: - cpu
- gpu
- gpu_with_cpu_fallback
 
- "baker_samples" : Uint32 (default: 1)Number of total samples for baking uniform expressions or total number of samples per pixel when baking varying expressions. 
- "datauri" : Boolean (default: false)If true, use datauri format for any encoded textures. Otherwise just the direct base64 encoded image is returned. Ignored if encode_textures is not enabled. 
- "distiller_options" : Map (default: Map(A map of the distiller options to set. The name of the option is used as the key of the map, e.g., distiller_options["layer_normal"] = true. 
- "element_name" : StringThe name of the MDL material instance to perform the distillation on. 
- "encode_textures" : Boolean (default: false)If true, texture parameters will be encoded to base64 and returned in the command response. If false the textures will be written to disk on the server and their path returned. 
- "format" : String (default: "exr")The image format to use for baked texture data. 
- "pixel_type" : String (default: "Rgb_fp")The pixel type to use for baked texture data. 
- "quality" : String (default: "100")The quality setting for the image format used for baked texture data. 
- "target_model" : String (default: "ue4")Material model to target for distilling. Possible Values: - diffuse
- diffuse_glossy
- specular_glossy
- ue4
- transmissive_pbr
 
- "texture_path" : String (default: "")Path relative to content root into which baked textures are written. 
return value
MapA map containing the distilled and baked material parameters and texture references.