Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generative multiresolution demo #597

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Generative multiresolution demo #597

wants to merge 13 commits into from

Conversation

kephale
Copy link
Member

@kephale kephale commented Jun 21, 2024

This PR provides an entry point for stress testing multiresolution volume rendering.

It provides this multiresolution generative volume:

image

You can run it with the main in this class: https://github.com/scenerygraphics/sciview/blob/bd9530a987765b238d0ae0ac818f134f1a4eea5c/src/main/java/sc/iview/mandelbulb/MultiResolutionMandelbulb.java

Adjust maxScale at the top of that main function to increase the resolution pyramid. I have been able to get to maxScale=4 comfortably and 5 works as well on my M1.

Please note that when testing this mandelbulb dataset in pure BigVolumeViewer I was able to go up to maxScale=18 without significant issues.

The current limitations that I see are related to how many blocks are loaded into memory (per frame and in total).

  • See scenery's VolumeManager.updateBlocks for the way fillTasks are created to see where this is happening and how the scenery camera is used to determine which blocks to fetch.

The mandelbulb can be slow because it is a fractal, too test larger volumes try this in MandelbulbCacheArrayLoader:

// int iterations = mandelbulbIter(coordinates, maxIter, order);
//img.getAt(x, y, z).set((int) (iterations * 65535.0 / maxIter)); // Scale to 16-bit range
img.getAt(x, y, z).set((int) (( 1 - (level / 16)) * 65535.0 )); // Scale to 16-bit range

This simply changes the intensity value to match the scale that is being rendered. When testing this way I was able to get maxScale = 9.

@kephale
Copy link
Member Author

kephale commented Jun 21, 2024

A screenshot from BVV to prove it happened:

image

@kephale
Copy link
Member Author

kephale commented Jun 21, 2024

On Zulip I was mentioning some thoughts on this PR: https://imagesc.zulipchat.com/#narrow/stream/327495-scenery.2Bsciview/topic/generative.20multires

Here is a video that shows the mandelbulb with maxScale=4 (for speed). What I'm showing is how the camera interacts with block loading (mostly toward the end of the video). We would be well served by having some tooling/visualizations that help us:

  • understand which blocks are being loaded
  • which region is being used to determine which blocks to load
  • which blocks would we prefer to load first (this would have to be a new feature because block priority isn't supported to my knowledge? @skalarproduktraum @tpietzsch )
sciview_mandelbulb_scale5_v001.mp4

[@skalarproduktraum or... is that actually just far plane??]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants