ospray icon indicating copy to clipboard operation
ospray copied to clipboard

Volume inconsistent density based on cell size

Open StasJ opened this issue 4 years ago • 3 comments

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.

StasJ avatar Jul 07 '20 23:07 StasJ

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.

carsonbrownlee avatar Jul 08 '20 06:07 carsonbrownlee

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.

johguenther avatar Jul 08 '20 08:07 johguenther

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.

carsonbrownlee avatar Jul 08 '20 08:07 carsonbrownlee