RenderKit / ospray

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

wrong transparency for rendering of large datasets through ParaView 5.6.0 #308

Closed jhgoebbert closed 5 years ago

jhgoebbert commented 5 years ago

Hello ospray,

we came across a rendering issue of large data sets (resolution: 12000x10000x243) with OSPRay through ParaView 5.6.0

OSPRay (through ParaView 5.6.0) shows a big jump in the transparency level when the resolution exceeds a specific size (not fully tested yet, but maybe it is at 4096=2^12).

This is not the case for OSPRay through ParaView 5.5.2

Best, Jens Henrik

johguenther commented 5 years ago

Hello Jens Henrik thanks for raising this issue, we will investigate. To better understand: you see different transparency when rendering the same volume data set (using the same transfer function), when the data has just been resampled to different resolutions?

Best regards, Johannes

jhgoebbert commented 5 years ago

Hello Johannes,

we have resampled the data set to a lower resolution (2000x2000x243) and the transparency looks fine then.

Here is a screenshot with correct rendering (but lower resolution): https://fz-juelich.sciebo.de/s/H9d7tQo3D5coLu7

and the same settings with wrong rendering result (with higher resolution): https://fz-juelich.sciebo.de/s/U8A9yHmp5tB9YTs

Best, Jens Henrik

jhgoebbert commented 5 years ago

Yes, everything else stays the same. Just the data set is resampled.

jeffamstutz commented 5 years ago

I think this is due to sampling weight mismatches in our volume rendering code because each volume generates very different numbers of samples per-ray in the same physical world space. It's possible that some of these issues could be alleviated with more of our rendering parameters exposed in ParaView, as well as having some better controls of our volume rendering to tweak different sampling/blending schemes.

We are actively working on rewrites of our volume rendering code for v2.0+, so these are important issues to make sure we can address in our current work.

@gregjohnson any comment here?

gregjohnson commented 5 years ago

So long as the physical world space grid projections are the same (which they appear to be from the attached screenshots), the rendered results should be consistent with each other. That is, the differing numbers of samples per ray shouldn't impact transparency as we're seeing here.

I'm going to run some local OSPRay-only tests to attempt to reproduce the issue.

hzilken commented 5 years ago

UPDATE: SOLUTION found, see next post!

Hello, I'm a colleague of Jens Henrik and have been investigating the matter further. The large original dataset (grid size 12000x10000x243) is read with the xdmf reader. When volume rendered with ospray in ParaView 5.6.0, it is very, very transparent (which was NOT the case with ParaView 5.5.2). https://fz-juelich.sciebo.de/s/sRWThAtPVfXGu89

But strange things happen:

When I connect an ExtractSubset filter to the reader and just copy the complete grid, the volume rendering of the filters output is correct again: https://fz-juelich.sciebo.de/s/wahTaLnJq4ZPtph

This is a confusing result. How can the xdmf reader produce wrong rendering results (only since ParaView 5.6.0)? The output of the xdmf reader and the ExtractSubset filter seems to be 100% identical (image data, unsigned char, size=12000x10000x243).

Best, Herwig

hzilken commented 5 years ago

SOLUTION FOUND: After investigating all parameters in the ParaView GUI, wie found out that the value of "Scalar Opacity unit Distance" of the xdmf reader was different compared to the ExtractSubset filter. For whatever reason, ParaView 5.6.0 seems to handle the default value of this parameter (which we never touched) different to previous versions.

Best, Herwig

johguenther commented 5 years ago

Thanks for investigating! Glad we know the reason now – we will talk with Kitware about those differences between 5.5.2 and 5.6.0. And as Jeff mentioned, we will also double-check OSPRay's behavior regarding consistency between resampled volumes for the version 2 rewrite.

johguenther commented 5 years ago

One more note: we're always keen on feedback; thus if you are missing some functionality in OSPRay, or like to get support for specific visualization challenges, feel free to drop a mail to ospray@googlegroups.com (or this issue tracker).