Voxel artifacts with infinitely thin shapes
Open
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/maxBoundsit 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 formin/maxBounds, notmin/maxClippingBounds. See message previously inconvertUvToEllipsoid.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;

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

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 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