Skip to content

Lighting doesn't work on certain 3D mesh plots #552

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

Closed
monfera opened this issue May 19, 2016 · 5 comments · Fixed by mikolalysenko/normals#2 or gl-vis/gl-mesh3d#5
Closed

Lighting doesn't work on certain 3D mesh plots #552

monfera opened this issue May 19, 2016 · 5 comments · Fixed by mikolalysenko/normals#2 or gl-vis/gl-mesh3d#5
Assignees
Labels
bug something broken

Comments

@monfera
Copy link
Contributor

monfera commented May 19, 2016

Brain looks like a grey blob with undiscernible features. Cause is that specular reflection isn't active. Besides a plotly.js dependency ignoring the lighting parameters (fixed), there was a problem which resulted in very small triangles being omitted in specular light reflection calculation (also fixed). The triangles were very small - except 2-3 larger ones - because the brain mesh is intricately detailed to yield sufficient anatomical representation of the hemisphere surface, with over 300k points in the mesh.

image

In this specific case, lighting isn't working and the result is an indistinguishable grey surface.

@etpinard etpinard added the bug something broken label May 19, 2016
@monfera
Copy link
Contributor Author

monfera commented May 19, 2016

Found a bug w.r.t. lighting; in the process of working on it. A completely independent issue seems to be that upon some navigation steps, the grid lines can go wild:
image

@monfera
Copy link
Contributor Author

monfera commented May 20, 2016

We have a fix candidate; will work on the PR Friday. Hopefully no showstoppers.

image

@monfera
Copy link
Contributor Author

monfera commented May 20, 2016

PRs that fix this issue:
mikolalysenko/normals#2
gl-vis/gl-mesh3d#5
#556 <= this is changed to take advantage of the epsilon config

@monfera
Copy link
Contributor Author

monfera commented May 21, 2016

Internal surface of the hemisphere mesh:

image

@monfera
Copy link
Contributor Author

monfera commented May 25, 2016

With additional lighting configuration and a crude representation of the brain shape to differentially shade / color the inner grooves vs. the outer surface of the folds:

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
3 participants