cnr-isti-vclab / meshlab

The open source mesh processing system
http://www.meshlab.net
GNU General Public License v3.0
4.67k stars 820 forks source link

Visualization issue with a Quadro RTX 600 graphic card #1138

Open grasel opened 2 years ago

grasel commented 2 years ago

Opening some ply or stl files with pc with a Quadro RTX 600 graphic card, mesh appears black as if it was without normals. image Meshlab shows correctly the same files on all other pcs, but in this pc some other ply files are correcly shaded. The same issue appears with different Meshlab versions, like 2016.12 and 2021.10. Is there some setting to change? Thanks

alemuntoni commented 2 years ago

Hi, I think it is a driver issue. Unfortunately, I am not able to investigate the issue since I don't have the specific graphic card.

Mrurk commented 2 years ago

Hello! Unfortunately I have a similar problem on nVidia Quadro RTX 5000 (tried various MeshLab and driver versions, currently driver v. 472.84). Small meshes work fine, but for larger (about 4,000,000 faces and more) the lighting becomes corrupted (they turn completely black when rotated with vertex color off and become gradually very dark when rotated with vertex color on) and the performance dips drastically (from almost 1000 FPS for a model over with 3,500,000 faces to 2.2 FPS for a model with 4,665,000 faces). Also I noticed a similar behavior with a texture on a model with 2,600,000 faces: when the texture is off, the model looks good and rotates perfectly smoothly (about 1000 FPS) but turning the Texture Corrd on makes the FPS go down to 2.5 [sic!], the model shading disappears, and the texture is displayed as a solid color, with brightness changing gradually when the model is rotated. The texture works fine on a model half this size (1,412,000 faces). This happens both for PLYs and STLs, and the models work perfectly fine on other machines and in other programs (e.g., EXScan Pro, Blender), so I imagine there is some problem in communication between the Quadro drivers and MeshLab. I would be very grateful if something could be done with that. I bought the PC with this card exclusively for work with 3D models for research purposes (3D scanning, photogrammetry, etc.) and the situation now is pretty problematic. Thank you in advance!

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. The resources of the VCLab team are limited, and so we are asking for your help. If this is a bug and you can still reproduce this error on the last release of MeshLab, please reply with all of the information you have about it in order to keep the issue open. If this is a feature request, and you feel that it is still relevant and valuable, please tell us why. This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

Mrurk commented 2 years ago

Still not resolved, replicated on the newest MeshLab version and newest available Quadro drivers (standard and new feature edition alike). The models run smoothly in 3Ds Max 2022, so again, this is not a hardware, system, or particular file problem, just some MeshLab issue.

alemuntoni commented 2 years ago

Sorry about that. As I said, I don't have any Quadro graphic card to make tests, therefore it's hard to figure out what is the issue, it could be everywhere. We are working on some big changes related with OpenGL for future releases, but I can't assure that they'll solve the issue.

grasel commented 2 years ago

The issue still exists but only on some files, as I can see. I am not able to find a clue, they are regular files, not bigger or more complex than working ones. In addition, toggling Fill icon in Layer dialog panel, the models appears correctly shaded for a while, but moving them, they turn black again. I wish it can be useful.

Mrurk commented 2 years ago

Oh, I confirm: turning the Fill off and on in the layer panel or the Vert button in the top panel makes the shading correct and the model run smoothly, and in my case even when rotated! Thank you, @grasel, this obervation will make work much more comfortable until the problem is solved. Curiously, I noticed something strange with that:

  1. When I open the model which works poor and turn the Fill/Vert off and on again, it starts to work well (smooth and with correct shading).
  2. When I turn the Fill/Vert off and on once again, the problem returns!
  3. I can consistently switch between the bugged and correct state of the model that way - the state changes each time the Fill/Vert is turned off and on (tested with several files).

One more interesting observation:

  1. I had a 14043662 faces model which ran poorly.
  2. I used Simplification: Quadric Edge Collapse Decimation (percentage reguction 0.5; preserve boundary of the mesh, preserve topology, optimal position of simplified vertices, planar simplification and post-simplification cleaning on).
  3. The model was reduced to 7021830 faces and started to be displayed correctly with a high FPS count...
  4. ...until I exported it - then it immediately became bugged again (and I mean the state in the same window, without reopening or reloading it - the shading just got corrupted and the FPS plummeted the moment the file was saved).

Perhaps this will help you to pinpoint the cause of the problem.

UPDATE: Both things seem to have the same origin. When the state is "fixed" by turning the Fill/Vert off and on, it gets corrupted after simplification and then gets better again after saving. I guess MeshLab does the same operation in both cases.

phourglass commented 1 year ago

Hello,

same here (model with 6 million faces).

I thought it was because my graphic card was too old or not having enough memory but it is still the same with a recent RTXA2000 (12GB, win 10, meshlab 2022.02 and nightly from 2023-04-01).
Cloudcompare does not seem to have the issue.

Clicking the fill/vert on and off makes the display correct and the rotation faster (thanks for the workaround). Having the normals already computed and saved in the file does not seem to help. Simply saving the layer puts back the black display.

Thanks Philippe