CesiumGS / CesiumGS/cesium

Voxel artifacts with infinitely thin shapes

Open
#11,017 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

category - voxels
Dominant language
JavaScript
Stars
15.8k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

The voxel code allows for creating infinitely thin shapes, which is a handy feature for inspecting individual slices of voxel data. There are some artifacts though:

  • When making a shape infinitely thin via min/maxBounds it always renders the front side. Instead it should render just the side that was hit. This happens for most shape types. Note: this bug only happens for min/maxBounds, not min/maxClippingBounds. See message previously in convertUvToEllipsoid.glsl:
    #if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_HEIGHT_FLAT)
        // TODO: This breaks down when minBounds == maxBounds. To fix it, this
        // function would have to know if ray is intersecting the front or back of the shape
        // and set the shape space position to 1 (front) or 0 (back) accordingly.
        float height = 1.0;

thin-box

  • Ellipsoids only render one side of the shape when the latitude range is zero. This happens for both min/maxBounds and min/maxClippingBounds.

ezgif com-gif-maker (2)

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 with the TODO in convertUvToEllipsoid.glsl and trace how min/maxBounds and min/maxClippingBounds determine the shape-space height for infinitely thin shapes. Reproduce the thin-box and zero-latitude ellipsoid cases shown in the issue. Done means bounds render only the side hit by the ray, while ellipsoids render both sides for zero latitude in both bounds modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.