Scaling a volume breaks rendering when the camera orbits around the volume
See original GitHub issueBefore solving #295, this issue did not exist. Now this is what happens when I scale my volume by a factor of 100. Pyvista has the very same problem.
When you click and hold the left mouse button, VTK switches to a low-fidelity rendering to go faster but it seems this part is not scaled and it’s far away close to the origin at a scale of 1 (that’s what I guess is happening).
Releasing left mouse button shows the volume correctly.
Another view of the same effect:
Code to reproduce this:
import nrrd
import numpy as np
import vedo
volume_data, header = nrrd.read('./annotation_100.nrrd')
vol = Volume(volume_data, mapper='smart').shade(False)
vol.cmap('viridis').alpha([0,1]).addScalarBar()
vol.scale([100, 100, 100])
vol.show(axes=1)
Associated volume data can be found in #295.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Volume Rendering for Developers - Scratchapixel
We will learn about volume rendering through a series of lessons: in this lesson, we will study the foundations of volume rendering and...
Read more >Large scale volume lights - Blender Stack Exchange
An enlarged object set with volume scatter will seem denser, as the camera rays will need to traverse a larger space.
Read more >Volumetrics in Octane: Overview and Volume Object - Behance
Scattering bounces light around within the object which creates a hazy, semi-translucent effect (think jade, skin, milk, and wax). The more ...
Read more >Basic Lighting Exercise - Washington
Volume Lights only illuminate objects that are within the bounding volume of the light. As such, the scale and position of the light...
Read more >Production Volume Rendering - Sony Pictures Imageworks
The course begins with a quick introduction to generating and rendering volumes. We then present some of the most fundamental parts of a ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can close this, thank you for your help!
Perfect if there’s no added computation and memory usage. Do you mean to say that alphaUnit should be also scaled to 100? Your guess was right, I used alphaUnit(100) and now the rendering looks like when the volume is not scaled (“spaced up”).