Skip to content

Add basic support for voxel rendering and styling #1685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 56 commits into
base: property-attributes
Choose a base branch
from

Conversation

j9liu
Copy link
Contributor

@j9liu j9liu commented May 29, 2025

Description

Depends on CesiumGS/cesium-native#1188.
Depends on #1694, so merge that first.

This PR adds support for loading and rendering tilesets with 3DTILES_content_voxels, parsing glTFs with EXT_primitive_voxels payloads.

image

Data courtesy of Swisstopo

This is a meaty set of changes, so I'll add a written walkthrough of the changes in a follow-up comment.

Author checklist

  • I have submitted a Contributor License Agreement (only needed once).
  • I have done a full self-review of my code.
  • I have updated CHANGES.md with a short summary of my change (for user-facing changes).
    - [ ] I have added or updated unit tests to ensure consistent code coverage as necessary.
  • I have updated the documentation as necessary.

Remaining Tasks

  • Improve memory / lifetime management
  • Revisit voxel traversal mechanics. -- See changes in Add support for ellipsoid-based voxels #1711
    • I'm not happy with the way voxels are currently selected for rendering in VoxelResources. It's a weird compromise between CesiumJS's VoxelTraversal and the cesium-native traversal, and it falls apart for larger datasets.

Testing plan

Reach out to me offline for the pictured test data.

  • Load in a voxel tileset (same as any other Cesium3DTileset).
  • Use UCesiumVoxelMetadataComponent to gather its properties.
  • Test out applying custom shaders to the data.

Compatibility checks:

Unreal Version DX 11/12 Vulkan Metal Editor Built
5.4
5.5
5.6

@j9liu

This comment was marked as outdated.

@j9liu j9liu changed the base branch from main to property-attributes June 11, 2025 18:09
@j9liu j9liu changed the base branch from property-attributes to main June 17, 2025 19:54
@j9liu j9liu changed the base branch from main to property-attributes June 17, 2025 19:55
@j9liu
Copy link
Contributor Author

j9liu commented Jul 3, 2025

I could keep picking apart at this, but I think this would benefit more from a fresh pair of eyes. I'm keeping this as a draft but I would appreciate any and all reviews 🙏

@j9liu
Copy link
Contributor Author

j9liu commented Jul 9, 2025

Turns out that UE 5.4 has drastically improved the UX of Custom HLSL nodes in materials!

It's now possible to define extra #include paths in for the shader, so I don't need to use one uber shader anymore. I've reorganized the code so that everything is separated into meaningful pieces. Hopefully this makes things easier to review, too ^^

@j9liu j9liu marked this pull request as ready for review July 10, 2025 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants