-
Hi, Thank you for the good work in making Filament powerful and lightweight. I have an asset with many instances ( I tried something like this: val material = renderableManager.getMaterialInstanceAt(
renderableInstance,
primitiveIndex
).material
val materialInstance = material.createInstance()
renderableManager.setMaterialInstanceAt(
renderableInstance,
primitiveIndex,
materialInstance
) which builds and runs but does not seem to preserve the original parameters (the materials become invisible). It is possible I did something wrong but I would like confirmation that my mental model of the materials and material instances is correct in the context of an instanced assets. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
What you did is correct, unfortunately an instance only gets its default parameters from the material, and it seems like we only set parameters on instances in @prideout Do you think we could set default parameters on materials for |
Beta Was this translation helpful? Give feedback.
What you did is correct, unfortunately an instance only gets its default parameters from the material, and it seems like we only set parameters on instances in
gltfio
.@prideout Do you think we could set default parameters on materials for
gltfio
? Not clear if it makes sense or not but it sound like it could be useful for cases like this.