cables-gl / cables_docs

cables documentation docs.cables.gl
https://cables.gl/docs/docs
45 stars 16 forks source link

Bug in "use material properties" flag in gltfscene when using pbrmaterial #816

Open unkleks opened 3 months ago

unkleks commented 3 months ago

I discovered a strange bug where enabling the "use material properties" flag of a gltfscene op causes all objects connected to a preceding pbrmaterial op to lose certain material properties (like metallicity) until the flag is disabled and the patch is saved and reloaded.

Here's an example patch showing the issue:

https://dev.cables.gl/p/mAbL7k

In this patch there are two identical setups with a skull comprising of two gltfscene objects, and a sphere.

In both cases the two gltfscenes and the sphere are connected to a pbr material op.

In both cases the material is identical.

However on the right side the "SM_mandible" gtlfscene has "use material properties" checked, and the material used for all 3 objects (the two gltfscenes and the sphere) is "broken".

Unchecking "use material properties" inside that op has no effect, until the patch is saved and reloaded.

Note: the gltf files used in this example patch do not have any material set up in the file itself. This might cause the issue? I did not verify with an object that would have a material defined inside the gltf file.