Closed wilsonCernWq closed 7 years ago
Hi, you are right: multiple volumes are currently not well handled in OSPRay (even more so when they intersect). The SciVis renderer is about to be refactored, also with the goal to better handle your situation. We'll keep you posted when the improvements are available. Best regards, Johannes
Hi I noticed my issue is here still. Actually I found the bug a while ago and updated it inside my fork already I just want to make this as a reminder so that the issue will be fixed in the next release :smile:
In ospray/ospray/render/scivis/SciVisRenderer.ispc line 212 (devel branch)
volumeColor = SciVisRenderer_computeVolumeInterval(renderer, v, ray, tBegin, tEnd, .98f - color.w, 0, rayOffset, sampleID, 1.f);
The 6th argument should be changed to 1.0f or 0.99f. The early termination opacity should always be one for each volume. Otherwise the ray will exit too early and go directly into the second volume.
hi Wilson, this actually was fixed already but is currently in a merge request for devel. That merge request should likely be merged with devel very soon.
I'll go ahead and close this issue, and thanks for reporting it!
Hi
I found OSPRay will give wrong rendering result when there are multiple volumes in the scene. What I did was simply putting four identical volumes next to each other, and rendered them using one ospModel.
In the result, some volumes seemed to be skipped by the ray and became transparent (volumes supposed to be visible were missed). Look at areas near volume boundaries in the attached images.
I tested my code with both block_bricked_volume and shared_structured_volume. They gave me identical results. My code is uploaded here: https://github.com/wilsonCernWq/OSPRayTinyLoader/blob/volume-debug/src/otv_main.cpp
Can anyone help me with that? Thanks!