scenerygraphics / sciview

sciview is a tool for visualization and interaction with ND image and mesh data
BSD 2-Clause "Simplified" License
66 stars 17 forks source link

Volume positioning and scaling parameters are off #178

Closed haesleinhuepf closed 5 years ago

haesleinhuepf commented 5 years ago

Hey guys,

congrats to your beta release! I just tried using it for visualising T1-head.tif. However, after loading the file with File > Open.... SciView just becomes grey: image

The terminal in the background says:

Mar 23, 2019 10:34:37 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Started application as PID 18732
Loaded Deferred Shading (Deferred Shading, with HDR postprocessing and FXAA)
Physical devices:
  0: Intel Intel(R) UHD Graphics 620 (IntegratedGPU, driver version 0.65.922, Vulkan API 1.1.70) (selected)
Creating 1 distinct queue groups
Using AWT swapchain
Renderer initialisation complete.
Waiting for renderer initialisation
Waiting for renderer initialisation
No custom key configuration found, using default keybindings.
No custom key configuration found, using default keybindings.
Recreating Swapchain at frame 0 (SwingSwapchain)
Creating render framebuffer GeometryBuffer for pass Scene
 + attachment NormalsMaterial, RGBA_Float16
 + attachment DiffuseAlbedo, RGBA_UInt8
 + attachment ZBuffer, Depth32
Creating render framebuffer AOTemp1 for pass AO
 + attachment Occlusion, R_UInt8
Creating render framebuffer AOTemp2 for pass AOBlurV
 + attachment Occlusion, R_UInt8
Creating render framebuffer AOBuffer for pass AOBlurH
 + attachment Occlusion, R_UInt8
Creating render framebuffer ForwardBuffer for pass DeferredLighting
 + attachment Color, RGBA_Float32
Creating render framebuffer HDRBuffer for pass ForwardShading
 + attachment Color, RGBA_Float32
 + attachment Depth, Depth32
Creating render framebuffer FXAABuffer for pass HDR
 + attachment Color, RGBA_UInt8
Looking for shaders/DefaultDeferred.vert.spv in Renderer
Looking for shaders/DefaultDeferred.vert in Renderer
Looking for shaders/DefaultDeferred.frag.spv in Renderer
Looking for shaders/DefaultDeferred.frag in Renderer
Waiting for renderer initialisation
Looking for shaders/FullscreenQuadFrustum.vert.spv in Renderer
Looking for shaders/FullscreenQuadFrustum.vert in Renderer
Looking for shaders/HBAO.frag.spv in Renderer
Looking for shaders/HBAO.frag in Renderer
Looking for shaders/FullscreenQuad.vert.spv in Renderer
Looking for shaders/FullscreenQuad.vert in Renderer
Looking for shaders/HBAOBlur.frag.spv in Renderer
Looking for shaders/HBAOBlur.frag in Renderer
Looking for shaders/DeferredLighting.vert.spv in Renderer
Looking for shaders/DeferredLighting.vert in Renderer
Looking for shaders/DeferredLighting.frag.spv in Renderer
Looking for shaders/DeferredLighting.frag in Renderer
Looking for shaders/DefaultForward.vert.spv in Renderer
Looking for shaders/DefaultForward.vert in Renderer
Looking for shaders/DefaultForward.frag.spv in Renderer
Looking for shaders/DefaultForward.frag in Renderer
Waiting for renderer initialisation
Looking for shaders/HDR.frag.spv in Renderer
Looking for shaders/HDR.frag in Renderer
Looking for shaders/FXAA.frag.spv in Renderer
Looking for shaders/FXAA.frag in Renderer
Scene initialization started.
Scene initialization complete.
Waiting for renderer initialisation
Done initializing SciView
Looking for Volume.vert.spv in Renderer
Looking for Volume.vert in Renderer
Looking for Volume.frag.spv in Renderer
Looking for Volume.frag in Renderer
Node activated: graphics.scenery.volumes.Volume@42976b48

I'm running on Windows 10, 64-bit with an Intel HD 620 GPU.

Would be super happy do get some rendering working on my machine!

Cheers, Robert

skalarproduktraum commented 5 years ago

Hi @haesleinhuepf,

please add volumes by opening via Fiji, and then use Edit > Add Volume. Then you can view the T1 Head example. There seems to be something fishy with the alpha blending rendering mode though, so I suggest you switch that to local maximum projection:

Screenshot from 2019-03-24 12-59-34

haesleinhuepf commented 5 years ago

Hey @skalarproduktraum ,

there must be a step missing. I added the volume using the Edit > Add Volume as you mentioned. But I still don't see it: image

When looking up and searching for a while, I can see a single stripe... image

What did you enter as voxel size?

Thanks!

Robert

skalarproduktraum commented 5 years ago

Actually, using File > Open works the same, the problem is that the scaling and positioning is off: See that the scale X/Y/Z parameters and Position X/Y/Z are very high -- if you reset the scale to 1.0, 1.0, 0.5 and Pos to 0.0, then it looks like the following:

SciView - 2019-03-24 13 07 58

skalarproduktraum commented 5 years ago

And of course, that is bad behaviour and we have to fix it. Thanks for the report!

haesleinhuepf commented 5 years ago

I changed position and scale and still don't see it. Also blending is as it is supposed to be, right?

image

skalarproduktraum commented 5 years ago

Hold shift and move around in the window, does it appear somewhere? (Shift activates arcball rotation around the current object, we should probably mention that prominently in the window)

haesleinhuepf commented 5 years ago

No. Still don't see it. However the stripe I reported earlier is gone...

skalarproduktraum commented 5 years ago

Maybe then this is actually a GPU issue, let me drop by tomorrow and have a look :+1: Would that work for you?

haesleinhuepf commented 5 years ago

Sure! Thanks for the excellent service! πŸ‘

skalarproduktraum commented 5 years ago

@haesleinhuepf, a last thing to try: The Game of Life 3D demo -- does that work for you?

haesleinhuepf commented 5 years ago

Found it! Several restarts and an approach on a different computer with same CPU/GPU/OS made it. It is important to set global scale to 1. Sometimes the rendered object is below the surface, sometimes it's upside down. Not obvious to say why.

I would love to have "Reset View" button which focuses on a volume.

image

Thanks again for the support!

haesleinhuepf commented 5 years ago

Game of life looks like this: image

image

Computer fan becomes loud assuming its space launch soon πŸš€ πŸ˜„

skalarproduktraum commented 5 years ago

Okay, that's good then. We will fix the positioning and scaling, the current solution is obviously not good. There's also Reset camera position and Reset camera rotation in View.

And regarding the fan: Well, not much we can do there, volume rendering is quite expensive.

skalarproduktraum commented 5 years ago

Fixed in #186.