Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display 3D model not only in black and white #1250

Open
kurb70 opened this issue Mar 14, 2022 · 11 comments
Open

Display 3D model not only in black and white #1250

kurb70 opened this issue Mar 14, 2022 · 11 comments

Comments

@kurb70
Copy link

kurb70 commented Mar 14, 2022

The model is displayed very strangely. It is a kind of 3D black and white representation.
I have tried it with the browsers Safari, Firefox and Opera. Everywhere this black and white representation.
Is this behaviour known? Can it be fixed/configured?

Bildschirmfoto 2022-03-14 um 17 57 55

The models are displayed in BIMcollab ZOOM, view.ifcopenshell.org without any problems.

I use an IFC4 model exported from Archicad.

System:

bimserverjar-1.5.182

openjdk 11.0.13 2021-10-19 LTS
OpenJDK Runtime Environment Zulu11.52+13-CA (build 11.0.13+8-LTS)
OpenJDK 64-Bit Server VM Zulu11.52+13-CA (build 11.0.13+8-LTS, mixed mode)

macOS 12.2.1 (21D62) mit Apple M1 Pro

@hlg
Copy link
Member

hlg commented Mar 14, 2022

Do you see this behaviour only for this particular IFC file? If so, can you share it? Or otherwise a minimal example exported the same way from ArchiCAD that shows the same behaviour?

@kurb70
Copy link
Author

kurb70 commented Mar 15, 2022

Apparently all my models are affected. I attach the one from the above screenshots.
AMAZE_Test_1_IFC4.ifc.zip

@kurb70
Copy link
Author

kurb70 commented Mar 15, 2022

Here is a very short movie showing how the 3D model is shot. Here you can see how the surfaces behave during rotation.

Screen.2022-03-15.um.15.18.32.mov

@hlg
Copy link
Member

hlg commented Mar 15, 2022

I can not reproduce this neither in Firefox nor Chromium under Ubuntu.
20220315_chrome

@kurb70
Copy link
Author

kurb70 commented Mar 15, 2022

Thanks for the feedback. I'm beginning to think that it might be due to my hardware. It is still strange that it is displayed correctly with other software.

@hlg
Copy link
Member

hlg commented Mar 15, 2022

@kurb70 Did you try to switch off hardware acceleration, e.g. in Firefox, just to see if that makes any difference?

@aothms Do you know which exact BIMsurfer version is used in BIMviews 1.5.184 (version linked to BIMserver 1.5.182)? Is it the 1_5_182 branch? And in addition, do you have any idea from the top of your head, which differences between the BIMsurfer version in BIMvie.ws and BIMsurfer v2 on view.ifcopenshell.org may cause the difference (which in addition seems to depend on the hardware or OS)?

@kurb70
Copy link
Author

kurb70 commented Mar 17, 2022

@hlg I deactivate Firefox hardware acceleration and restarted Firefox. Unfortunately black and white mode is still present.

@aothms
Copy link
Member

aothms commented Aug 23, 2023

@hlg sorry for the delay in replying, I had overlooked this.

BIMviews uses bimsurfer v1 which only available here https://github.com/opensourceBIM/BIMsurfer-before2019/tree/V1

After that we did a rewrite called v2, which was never really picked up by bimviews

Then we did another rewrite v3 which can be reasonably used with bimserver, just was never integrated with bimviews. That is the one you're referring to.

Bimsurfer v1 uses SceneJS. It would be interesting to see if @kurb70 or @GiacomoManzoli can reproduce these issues on any of the scenejs examples: https://github.com/xeolabs/scenejs/tree/master/examples SceneJS hasn't been maintained for years though so that's a bit of an issue. I'm also not sure if SceneJS could be a factor here.

How sure are we this is (solely) a front-end issue? Did anybody try hosting the bimserver on a non-apple silicon machine and accessing bimviews on the server from an apple silicon machine?

@GiacomoManzoli
Copy link

Hi @aothms,

i've downloaded the lates version of SceneJS from master and on my Mac M1 it works fine, i checked multiple examples with both version of processor (i do have a MacBook M1 and an Intel iMac) and they look identical.

i already tried to run the server on another machine, here are the combination i tested

Server Client Result
Silicon Silicon colors not displayed
Silicon Intel OK
Intel Silicon colors not displayed
Intel Intel OK

and here are some screenshots of the case where the sever is running on a Mac Silicon, first one is from the Mac Silicon and the second one from the Mac Intel

Screenshot 2023-08-24 alle 08 47 07 Screenshot 2023-08-24 alle 08 48 52

Another thing I've noticed is that it somehow the problem is also related to the operating system: with the actual official version of macOS Ventura (13.x), the error doesn't appear with the M1 processor (the first one released), but it does with its successor (M1 Pro/Ultra/Max and the M2 series); With the next release (macOS 14 - Sonoma), which it's still in beta, also the M1 processor has the error.

@hlg
Copy link
Member

hlg commented Aug 24, 2023

How sure are we this is (solely) a front-end issue?

It seems the server-side hardware does not have an effect on the issue. But somewhere on the way from the BIMserver database to the Javascript scenegraph and the final GLTF, we produce something problematic for these processors that BIMsurfer V3 or other viewers don't. I can't pinpoint where, but for further reference, I document the steps that the data takes from database to rendering:

  1. BIMserver's binary serializer produces geometry in custom binary format.
  2. BIMsurfer V1 reads the binary geometry data and creates scene.js scene graph with nodes for the various objects.
  3. scene.js handles the scenegraph and translates it to WebGL calls.

It may be that the hardware or particular combinations of hardware and OS components have issues with particular valid WebGL calls (a quick Google search confirmed existence of processor-specific issues with Apples experimental WebGL 2.0 implementation, but nothing looking exactly like this). It may as well be (less likely though) that there are faulty WebGL calls which are just ignored by previous and other hardware.

If we find the cause and there is an easy fix for this current BIMvie.ws setup, I'd be happy to update it. However, I think I would not invest time in exchanging single bits, for example upgrading the viewer to BIMsurfer V3 in the current BIMvie.ws. Instead, I think the time is better spent for an all new BIMserver web interface.

@zaqifathis
Copy link
Collaborator

Hi, just want to give an update on this.

I tested it with the current latest BIMserver (1.5.185) in Apple Silicon (M1 pro) and I still have the same issue which the model displayed in black and white. I have tested with different browsers (Firefox and Chrome), but the issue still come out.

image

System:

  • MacOS Sonoma 14.6.1 with Apple M1 Pro

  • Browser : Firefox , Chrome

  • BIMserver 1.5.185

  • openjdk version "22.0.2" 2024-07-16

  • OpenJDK Runtime Environment Homebrew (build 22.0.2)

  • OpenJDK 64-Bit Server VM Homebrew (build 22.0.2, mixed mode, sharing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants