readMaterial function
Syntax
string[] readMaterial(filePath)
Parameters
- filePath (string)
Name of the material file to read. See Asset Search for information about search locations. Supported extensions are .cgamat and .mtl.
CityEngine's CGA Material Encoder allows for writing cgamat files via model export.
Returns
The decoded material in filePath as 2D string array of cga material attributes.
Description
The readMaterial functions reads the material file filePath into a 2D array of material attributes, similar to the one returned from getMaterial(). Referenced textures are resolved. The returned array can be used to set the current shape's material with the setMaterial() operation.
Related
- getMaterial function
- setMaterial operation
Copyright ©2008-2024 Esri R&D Center Zurich. All rights reserved.