Conversation
|
What do you think @banesullivan, @akaszynski, @keltonhalbert? |
|
nice contribution @GuillaumeFavelier |
| if hasattr(self, 'ren_win') and depth_peeling_supported: | ||
| self.multi_samples = self.ren_win.GetMultiSamples() | ||
| self.ren_win.AlphaBitPlanesOn() | ||
| self.ren_win.SetMultiSamples(0) |
There was a problem hiding this comment.
So I'm starting to think that setting the multi-samples to zero isn't needed... or that it might not matter as the multi-samples need to be set before the first render. I deleted this line locally and couldn't tell a difference in the output.
When I added #365, I remember finding some VTK docs about how the multi-samples needs to be set before the first render. At the moment, all I'm digging up is this thread: https://vtk.org/pipermail/vtkusers/2017-November/100211.html
Make sure you set it before your first render, it is used when creating the
hardware window.
There was a problem hiding this comment.
Okay then, I'll remove it right away
There was a problem hiding this comment.
It didn't change anything in my local example as well 👍
pyvista/plotting/plotting.py
Outdated
| """Disables depth peeling.""" | ||
| if hasattr(self, 'multi_samples') and hasattr(self, 'ren_win'): | ||
| self.ren_win.AlphaBitPlanesOff() | ||
| self.ren_win.SetMultiSamples(self.multi_samples) |
There was a problem hiding this comment.
If anything changes in my above comment, this would need to be updated
akaszynski
left a comment
There was a problem hiding this comment.
Looks great! Thanks for the pr @GuillaumeFavelier.
|
I was struggling to find a good way to demonstrate depth peeling in the doc, thanks for the nice example @banesullivan |


This PR adds
enable_depth_peeling()anddisable_depth_peeling()functions to theBasePlotterAPI. There is alsocheck_depth_peeling()inpyvista.utilities. This is strongly inspired by the material provided in lorensen.github.io about translucent geometry.Closes #437