Syntax
- string[] readMaterial(filePath)
Parameters
- filePath—stringName of the material file to read. See Asset Search for information about search locations. Supported extensions are .cgamat and .mtl.
Note:
CityEngine 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.