Improve voxel memory distribution among metadata attributes
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 15.8k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
Feature
VoxelTraversal constructs a Megatexture for each metadata field coming from the VoxelProvider. The megatextures are sized rather simplistically:
- Maximum size is set to 512 MB. The
VoxelTraversalconstructor takes amaximumTextureMemoryByteLength, but this parameter is not set when theVoxelTraversalis constructed inVoxelPrimitive. - Each metatadata field is allowed the full
maximumTextureMemoryByteLength. There is no option to limit the total memory of the wholeVoxelTraversal
After constructing the megatextures, the VoxelTraversal then uses the maximumTileCount from the first Megatexture, to compute things like the length of the priority queue. However, if different metadata fields have different sample sizes in memory (e.g., single float vs RGBA float), the different megatextures could potentially have different maximumTileCount values--because they were all allocated with the same maximum memory.
Some ideas for improvement:
- Expose maximum memory limits to the user, similar to Cesium3DTileset.maximumCacheOverflowBytes.
- Divide the maximum available memory among the metadata properties proportionally to the different byte sizes of a single sample in the property
- Compute a valid
maximumTileCountthat is the same for allMegatextures
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading VoxelTraversal construction in VoxelPrimitive and how it creates Megatexture instances from VoxelProvider metadata fields. Trace how maximumTextureMemoryByteLength and maximumTileCount are set and consumed across the metadata fields. Done means the selected memory policy is explicit and all Megatextures provide a valid, consistent basis for VoxelTraversal calculations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100