RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization
http://ospray.org
Apache License 2.0
1.01k stars 182 forks source link

Volume inconsistent density based on cell size #442

Open StasJ opened 4 years ago

StasJ commented 4 years ago

If you create a volume comprised of 100^3 tightly packed regular cells, the volume density will be much higher than that of a volume of the same size comprised of a single cell.

carsonbrownlee commented 4 years ago

hi Stas, volume density is not a function of world space coordinates. You can achieve this by altering the density scale on the volumetric model.

johguenther commented 4 years ago

That the density of the volume depends on its resolution has been the behavior of OSPRay since the beginning. But I agree that this is unfortunate. We have some ideas to rectify this in a future release (around fall). In the meantime please use densityScale as Carson suggested to counter the effect.

carsonbrownlee commented 4 years ago

Johannes, in ParaView this is handled by altering the scalarOpacityUnitDistance variable on the volume, which by default scales with volume size. In paraviewOSPRay we handle this by altering the density scale to map to the scalarOpacityUnitDistance.