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

Drawing normals as lines crashes CC on macOS #1987

Open
tonttu opened this issue Mar 23, 2024 · 2 comments
Open

Drawing normals as lines crashes CC on macOS #1987

tonttu opened this issue Mar 23, 2024 · 2 comments

Comments

@tonttu
Copy link

tonttu commented Mar 23, 2024

When trying to visualize point cloud normals, CloudCompare shows an error message and quits:

ERROR: 0:8: ';' : syntax error: Uniform blocks may not have identifiers in GLSL 140

How to reproduce

  1. Drag and drop the attached cube.ply onto Cloud Compare window and click Apply
  2. Click on the "cube - Cloud" item in the DB Tree
  3. Click on "Draw" checkbox from Properties -> Draw normals as lines

Expected behaviour
I would expect the normals to be visualized, or if the system doesn't support the necessary GLSL features, at least CC could just inform the user, disable the checkbox and continue working without exiting.

Your environment

  • CC Version: 2.13.1 with Qt 5.15.8
  • OS & Version: macOS 13.6 on Apple M2 Pro

Test file (save as cube.ply, GitHub complains "We don't support that file type" when trying to attach this, so copy-pasting the file inline):

ply
format ascii 1.0
element vertex 8
property float x
property float y
property float z
property float nx
property float ny
property float nz
end_header
1.000000 1.000000 1.000000 0.577350 0.577350 0.577350
-1.000000 1.000000 1.000000 -0.577350 0.577350 0.577350
-1.000000 -1.000000 1.000000 -0.577350 -0.577350 0.577350
1.000000 -1.000000 1.000000 0.577350 -0.577350 0.577350
1.000000 -1.000000 -1.000000 0.577350 -0.577350 -0.577350
-1.000000 -1.000000 -1.000000 -0.577350 -0.577350 -0.577350
-1.000000 1.000000 -1.000000 -0.577350 0.577350 -0.577350
1.000000 1.000000 -1.000000 0.577350 0.577350 -0.577350
@rjanvier
Copy link
Member

Hi, it's confirmed. We know this shader is problematic in some aspects. We will rework it. I'll take a look, most probably in the end of next week.

@tonttu
Copy link
Author

tonttu commented Mar 23, 2024

@rjanvier That would be great, thanks. If you are touching the code anyway, perhaps also adjust the minimum normal length. Now the UI doesn't allow entering numbers smaller than 0.01, which is kind of frustrating when working with models that themselves are roughly that size.

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

3 participants