-
Notifications
You must be signed in to change notification settings - Fork 0
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
Wireframe meshes are black in software-rendering mode (BrainVISA 5.0.0) #25
Comments
I can't reproduce the problem in any situation (I've tried casa-distro on a machine with a nvidia GPU, on another one with an Intel GPU, and remotely through ssh, all display correctly with opengl=software). |
This comment has been minimized.
This comment has been minimized.
I tried using x2go and I could not reproduce the problem either, in casa-distro or outside of it. Maybe I should use one of your meshes ?
(same as you have)
(something different, thus) |
Try this command in NeuroSpin to reproduce the bug:
I can reproduce the bug every time with these two versions of software-rendering:
The bug never appears with
In case this is related to the data or the way that I am calling the Anatomist API for displaying the mesh, here is the relevant code of the def execution(self, context):
a = anatomist.Anatomist()
aobj_mesh = a.loadObject(self.imprint_mesh)
if self.imprint_texture is not None:
aobj_tex = a.loadObject(self.imprint_texture)
aobj = a.fusionObjects([aobj_mesh, aobj_tex], method='FusionTexSurfMethod')
else:
aobj = aobj_mesh
aobj.setMaterial(line_width=self.line_width)
window = a.createWindow('3D')
window.assignReferential(aobj.referential)
window.addObjects([aobj])
return {'object': aobj, 'window': window} |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
OK I can reproduce the problem now ! |
Okay thanks! I will change the DISCO code to set the property on the mesh then. |
What happens is that the mesh (a wireframe mesh) has normals in it, which is unusual for a wireframe mesh (and probably a bug here), and normals are all set to (0, 0, 0) (which is kind of illegal since they should be of length 1.0). In this situation Anatomist assumes that normals represent a direction that can me mapped on vertices as a RGB color (black here since they are all 0), and activates shaders by default to render it. There was a bug in Anatomist because this was bypassing the config option to disable all shaders. This is fixed now in 5.0.2 so it should not happen if the config is set to disable shaders.
Anyway now this issue can be solved in 3 ways:
|
Textured wireframe meshes (e.g. DISCO sulcal imprints) appear all black when using software OpenGL rendering (
opengl=software
).This can be worked around: open Settings / Anatomist Preferences, go to the OpenGL tab and uncheck Enable OpenGL shaders. Strangely, even if that box is already unchecked when you open the mesh, it may still appear black: you may have to check then uncheck the box to fix it.
The text was updated successfully, but these errors were encountered: