filePath—string is the name of the material file to read. See Asset Search for information about search locations. Supported extensions are .cgamat and .mtl.
CityEngine CGA Material Encoder allows you to write cgamat files via model export.
It returns the decoded material in filePath as 2D string array of cga material attributes.
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.
See the following related topics: