-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MRG: Improve lighting in 3D viz #8182
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
Conversation
|
is there a lighting result (eg from pysurfer) that you are aiming for?
|
|
The goal is to reproduce the lighting method used by Mayavi. Should I maybe update the table to integrate it? |
|
Yes I have noticed that they are different. The right still doesn't quite look like Mayavi, though -- the contrast is too large. Maybe the ambient light level is higher in Mayavi? |
|
I agree it requires some adjustment for mayavi like figure.
… |
|
Difference in light follows camera vs not? Default light locations? |
|
It's trickier than it seems. It's technically 3 lights (of type |
|
Updated table after e23c884
Note: Locally, I had to downgrade my VTK to 8.1.2 to get Mayavi to plot without z-fighting |
|
I like the way it looks !
|
|
@larsoner I pushed 4df834b to integrate #8182 (comment) |
| x = np.sin(theta) * np.sin(phi) | ||
| y = np.cos(phi) | ||
| z = np.cos(theta) * np.sin(phi) | ||
| return x, y, z |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably use mne.transforms.sph_to_cart
|
I'll merge this, let's take care of |
|
Thanks @GuillaumeFavelier ! |
* Improve lighting * Turn off the headlight * Orient lights













This PR reworks lighting in 3d viz scenes:
Related to #6731 (comment)