Extremum: new extremum plugin family for coarse majorant and minorant superstructures. - #1960
Open
frettini wants to merge 1 commit into
Open
Extremum: new extremum plugin family for coarse majorant and minorant superstructures.#1960frettini wants to merge 1 commit into
frettini wants to merge 1 commit into
Conversation
Coarse structures of majorant and minorant values over volumetric data. At runtime can be traversed to perform tracking algorithms (e.g. delta tracking or ratio tracking) using the `traverse_extremum` function. Built from sigma_t volumes in media, but intentionally decoupled to allow for different volumetric representations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR proposes an implementation of majorant supergrids, extending it to also contain minorant values and to extend it beyond grids. We named those Extremum structures.
I did my best to extract the relevant part of work on Extremum structures from other changes on our fork. I open this PR with the intention of advancing the discussion on finding a suitable interface for Extremum structures/majorant supergrids, rather than to merge this work directly, as I believe it could be dramatically improved, especially for
llvmandcudavariants.Our requirements:
Main design points:
The new
Extremumplugin family:VolumeandMediumplugins, but expected to be owned by aMedium.buildfunction builds the structure from a volume. Expected to be called from the owningMedium. A newextremumfunction has been added toVolumeto query the local extremum in a givenbbox. The volume also exposes aparametrizationfunction that contains information describing the volume's frame and coordinate. Our fork extends this further to accommodate Cartesian and spherical coordinates.update_extremumrebuilds, and updates the bbox, and scale. Thebboxcorresponds to theMediumbbox, and indicates the domain over which the extremum must be valid. The scale permits an easy way to update the densities without rebuild the Extremum structure.traverse_extremumtraverses the structure along a ray. Accepts a callback function that is called at every encountered extremum segment. This structure allows to traverse the whole structure in one virtual call instead of having repeated virtual calls in the hot loop. The callback is expected to be passed from the integrator, so that we don't make assumptions on the type of tracking performed (delta, ratio, residual ratio), and are compatible with all integrator types. The callback signature and payload are defined intracking.h.Two
Extremumplugins were added:extremum_globalwhich reverts to the previous approach andextremum_gridwhich creates an extremum supergrid.I tried to keep elements as decoupled as possible and not make assumptions on the representation of volumes or extremum structures. This can cause some inefficiencies, and the way forward might be to find some way to further constrain the problem e.g. assume DDA-like traversal.
Benchmark
Here is a small benchmark over a rendered scene that contains the volume in
./tutorials/scenes/volume.vol. It reports the results using a global extremum and grid extremum with increasing resolution, overscalar,llvm, andcudavariants. We can see these changes improvescalarvariants much more than other variants.Testing
Ran and passed all tests except two render tests that seem to report wrong max value in the srgb spectrum. Added tests for the new global and grid plugins.
Checklist
cuda_*andllvm_*variants. If you can't test this, please leave below