opacity not always working
It looks like opacity is not working anymore for me when looking at the LHCb detector. It works for TrackML for example, so it has to be related to the geometry itself.
Could one of you confirm/infirm this behavior ? Just to the main site (http://phoenix-dev.surge.sh/#/lhcb) and try changing opacity on the Detector top level item.
I think I partly get what you mean. I am giving it a try. Hopefully, it isn't that complex.
So it's not about being unable to get the object. We have the object but the opacity isn't being applied to the material of objects. I am not sure why.
Could it be related to some warnings that I get when exporting to gltf ?
GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.
The corresponding code is :
if ( material.isMeshStandardMaterial !== true && material.isMeshBasicMaterial !== true ) {
console.warn( 'GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.' );
} // pbrMetallicRoughness.baseColorFactor
It might be. But the thing is, we overwrite the materials on import and make it MeshPhongMaterial for all meshes.
The issue I see here is that the material.transparent = true we set at run time is not working for LHCbs geometries for some reason (works everywhere else). See packages/phoenix-event-display/src/managers/three-manager/scene-manager.ts:148.
If I set the transparent property to true at material creation time, it works just fine. See packages/phoenix-event-display/src/managers/three-manager/import-manager.ts:352. But the problem with this is that the Depth Test for Event Data (you can check it in Phoenix Menu) stops working.
I am working out a solution, it's a workaround.
Thanks a lot ! Note that I realize we are discussing a different issue than the one of this issue here. This one concerns name clashes. Maybe we just change the title and put 2 in one
Ah okay, I didn't realize that. :D
Yeah, feel free to change the title or create a new one. Fine by me either way.
ok, I've updated this MR to dedicate it to the opacity issue and create #426 for the menu issues
I believe this is fixed (reopen if not).