-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MRG: Enable smooth shading for pyvista backend #6435
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
MRG: Enable smooth shading for pyvista backend #6435
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6435 +/- ##
==========================================
+ Coverage 89.27% 89.27% +<.01%
==========================================
Files 411 411
Lines 74517 74518 +1
Branches 12317 12317
==========================================
+ Hits 66525 66526 +1
Misses 5135 5135
Partials 2857 2857 |
|
What do you think @larsoner , @agramfort ? |
mne/viz/backends/_pysurfer_mayavi.py
Outdated
|
|
||
| def __init__(self, fig=None, size=(600, 600), bgcolor=(0., 0., 0.), | ||
| name=None, show=False): | ||
| name=None, show=False, **kwargs): |
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.
I don't much like kwargs because it's easy to "lose" arguments. Why not just smooth_shading=True here?
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.
I wanted to use this property of kwargs to introduce backend specific parameter actually, you don't like the idea?
Of course, I can just put it to a plain parameter indeed.
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.
what is your opinion on this @agramfort ?
mne/viz/backends/renderer.py
Outdated
| | 3D function: | mayavi | pyvista | | ||
| +======================================+========+=========+ | ||
| | :func:`plot_source_estimates` | ✓ | | | ||
| | :func:`plot_source_estimates` | ✓ | - | |
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.
it's partially implemented already?
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.
Whoops! It's not on this PR but in here with the Brain object, I'll remove it.
| +--------------------------------------+--------+---------+ | ||
| | :func:`snapshot_brain_montage` | ✓ | ✓ | | ||
| +--------------------------------------+--------+---------+ | ||
| | :func:`plot_evoked_field` | ✓ | | |
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.
What happened to plot_evoked_field?
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.
It appeared twice on the table for some reason, I just correct it in here.
|
why not making smooth shading the default unless it's not supported? then no need for a parameter :) |
|
thx @GuillaumeFavelier ! |
What does this implement/fix?
This PR enables smooth shading for the
pyvista3d backend by default. This feature can be disabled by passingsmooth_shading=Falseat the creation of the_Renderer.Additional information
With smooth shading:
Without smooth shading: