item.itemScene.scene asset.entities.find { asset.getName(it)?.startsWith("imagetostl") ?: false }?.also { entity -> val manager = engine.renderableManager val instance = manager.getInstance(entity) val material = manager.getMaterialInstanceAt(instance, 0) val r = item.currentColor.red val g = item.currentColor.green val b = item.currentColor.blue material.setParameter( "baseColorFactor", Colors.RgbaType.SRGB, r, g, b, 1.0f ) } } ... val manager = engine.renderableManager val instance = manager.getInstance(entity) val material = manager.getMaterialInstanceAt(instance, 0) material.material.parameters Name: specularFactor, type: FLOAT3, prec: DEFAULT Name: glossinessFactor, type: FLOAT, prec: DEFAULT Name: baseColorIndex, type: INT, prec: DEFAULT Name: baseColorFactor, type: FLOAT4, prec: DEFAULT Name: baseColorUvMatrix, type: MAT3, prec: HIGH Name: metallicRoughnessIndex, type: INT, prec: DEFAULT Name: metallicFactor, type: FLOAT, prec: DEFAULT Name: roughnessFactor, type: FLOAT, prec: DEFAULT Name: metallicRoughnessUvMatrix, type: MAT3, prec: HIGH Name: normalIndex, type: INT, prec: DEFAULT Name: normalScale, type: FLOAT, prec: DEFAULT Name: normalUvMatrix, type: MAT3, prec: HIGH Name: aoIndex, type: INT, prec: DEFAULT Name: specularFactor, type: FLOAT3, prec: DEFAULT Name: glossinessFactor, type: FLOAT, prec: DEFAULT Name: baseColorIndex, type: INT, prec: DEFAULT Name: baseColorFactor, type: FLOAT4, prec: DEFAULT Name: baseColorUvMatrix, type: MAT3, prec: HIGH Name: metallicRoughnessIndex, type: INT, prec: DEFAULT Name: metallicFactor, type: FLOAT, prec: DEFAULT Name: roughnessFactor, type: FLOAT, prec: DEFAULT Name: metallicRoughnessUvMatrix, type: MAT3, prec: HIGH Name: normalIndex, type: INT, prec: DEFAULT Name: normalScale, type: FLOAT, prec: DEFAULT Name: normalUvMatrix, type: MAT3, prec: HIGH Name: aoIndex, type: INT, prec: DEFAULT Material Parameters