CesiumGS / CesiumGS/cesium

Improve voxel memory distribution among metadata attributes

Open
#13,169 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

category - memory/performance category - traversal & selection category - voxels type - enhancement
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:

  1. Maximum size is set to 512 MB. The VoxelTraversal constructor takes a maximumTextureMemoryByteLength, but this parameter is not set when the VoxelTraversal is constructed in VoxelPrimitive.
  2. Each metatadata field is allowed the full maximumTextureMemoryByteLength. There is no option to limit the total memory of the whole VoxelTraversal

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 maximumTileCount that is the same for all Megatextures

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.