scenerygraphics / sciview

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

Blending mode and LUT changes not updating properly #441

Closed smlpt closed 1 year ago

smlpt commented 1 year ago

After loading either the SciView Volume demo, the volume timeseries demo or the T1 head from Fiji as a volume, the first blend mode change is applied properly, but all subsequent changes are not. Similarly with the LUTs that won't be applied straightaway, but only after toggling visibility on and off. The LUT preview bar also does not update properly and sometimes only after selecting the next LUT. With the T1 head, the blend mode would sometimes get completely stuck and wouldn't change at all. I haven't found a specific way to exactly reproduce it yet, but something about the blend mode and LUT changes doesn't work like its supposed to do. Can anyone reproduce the issue on their end?

kephale commented 1 year ago

I'm seeing this with the blending mode. I've also seen issues with color map updates being delayed in the past. Currently LUTs seem to be fine for me.

kephale commented 1 year ago

Documenting an example of the LUT preview not being initialized after running VolumeRenderDemo:

image
kephale commented 1 year ago

Ok, so I can verify that the node.renderingMethod is being correctly updated for the Volume, but I cannot see a visual change between any of the renderingMethods. I need to call in @skalarproduktraum @moreApi for that issue.

kephale commented 1 year ago

Multiple metadata keys have been introduced for colormaps it seems: metadata["sciview.colormap-name"] metadata["sciviewColormap"]

smlpt commented 1 year ago

@kephale This was merged into master with #499 right? Because I just pulled the master and the LUTs still don't update. Same with the blending mode. Can you reproduce this?

kephale commented 1 year ago

I get this with the Volume Render demo:

image

Changing the LUT works. Something seems to be funky with rendering still though.

kephale commented 1 year ago

I'm not sure this is on the sciview side for the rendering mode update.

image

It looks like the renderingMode attribute is changing when the UI is updated. When I update the scene, that also does not trigger the renderingMode to change.

@skalarproduktraum @moreApi is this an upstream issue?

skalarproduktraum commented 1 year ago

This is indeed an upstream issue, as there's actually only the alpha blending mode implemented 😅 Maybe remove for the moment?

kephale commented 1 year ago

Will do, but please note that scenery is advertising multiple rendering modes: private val renderingModeChoices = Volume.RenderingMethod.values().toMutableList()