RenderKit / ospray

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

Setting the Transfer Function initial valueRange above data minimum results in missing chunks #436

Open StasJ opened 4 years ago

StasJ commented 4 years ago

If you have a volume with values ranging from -10 to 10 and you initialize its transfer function with a valueRange of {0,10}, chunks will be missing from the rendering. If the value range is then set to the entire range, it will not fix the issue. If you initialize the range to {≤-10,>-10}, it will work correctly, even if you then change the value back to {0,10} after the volume is rendered once. Below is an example of the bug (the entire volume should be solid):

tf

Also, if you set the initial range to {-FLT_MAX, FLT_MAX}, it will not render anything even if you fix the values later.

carsonbrownlee commented 4 years ago

Sorry you seem to have run into so many issues with our changes in OSPRay 2, thank you for posting these. It sounds like the macrocells used for empty space skipping are not being updated.

gregjohnson commented 4 years ago

Looking in the code, you will need to re-commit the volumetric model after any changes to the transfer function. This re-commit will update the internal value selector passed to Open VKL, which handles all of the empty space skipping behavior. So this should resolve part of your issue.

For the other issues, we will need to reproduce internally to debug.

johguenther commented 3 years ago

May be related to #437 (in the sense that currently in some situations commits of parent objects are needed).