-
Notifications
You must be signed in to change notification settings - Fork 4
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
add_volume results in a blank image #175
Comments
Very strange... I have similar hardware but not exactly the same. I cannot reproduce this at the moment Are you using an external monitor? FYI: originally posted on https://stackoverflow.com/questions/62250320/pyvista-add-volume-shows-a-blank-image it appears |
Can you also try this simpler example: import pyvista as pv
model = pv.Wavelet()
p = pv.Plotter(notebook=False)
p.add_volume(model)
p.show() |
I am using an external monitor (LG 27MD5KA), but the same problem happens even if I don't use it. I also tried the simpler example above, but that also shows a blank image. |
This is very, very odd behavior. Let's do some debugging... use this snippet with a box in there so we can see where the volume should be: import pyvista as pv
model = pv.Wavelet()
p = pv.Plotter(notebook=False)
p.add_volume(model)
p.add_mesh(model.outline(), color='white')
p.show() Can you try clicking the scene to move the camera a bit? Also, can you hit the If those two things fail, can you try passing differing arguments of E.g. import pyvista as pv
model = pv.Wavelet()
p = pv.Plotter(notebook=False)
p.add_volume(model, mapper='fixed_point')
p.add_mesh(model.outline(), color='white')
p.show() |
Here is the output for the first snippet. I clicked on it and moved the camera a bit (that's the image below). I also tried hitting However, the second snippet does result in the volume showing up. It only works for |
Aha, then you need to use the import pyvista as pv
pv.rcParams['volume_mapper'] = 'fixed_point'
model = pv.Wavelet()
p = pv.Plotter(notebook=False)
p.add_volume(model) # Note you do not need to specify mapper now
p.add_mesh(model.outline(), color='white')
p.show() |
So set |
huh, I thought you said the default mapper doesn't work for you? I'm not following which mappers work for you and which don't... However, it doesn't surprise me that the |
Hi Bane: I am able to save the image to file using the default mapper, as I had mentioned in my original post, but not able to display it on screen. |
Hi, I've been having a similar issue today but I'm using Windows and found that the volume is only rendered with the |
Description
I am trying a very simple add_volume example:
When I run this, a window pops up, but it only displays a blank image:

On the other hand, if I try to save the image to file, like so:
then it saves an image:

Here is the output of pv.Report():
Example Data
The text was updated successfully, but these errors were encountered: