Skip to content

Conversation

V2iDanAbend
Copy link

Description

Summary:
This PR adds a new Async function to Cesium3DTileset that will generate a top down silhouette of the tileset geometry. The callback returns the tileset actor and a TArray FVector defining the polygon points of the sampled tileset geometry. The function calls the already existing SampleHeightMostDetailed to sample the calculated grid points for simplicity.

Context:
This is extremely useful for runtime applications where a new tileset can dynamcially be added. Using this function we can calculate a rough outline of the tileset and use this for spawning a CesiumCartographicPolygon to clip the tileset into surrounding tilesets. Additionally the generated polygon can be used to create other geometry that can be wrapped around the tileset. Another use case would be to use the polygon shape to define a player or NPC moveto/path around a tileset to automate a cinematic fly around.

Screenshots:
image

Issue number or link

Cesium forum post: https://community.cesium.com/t/adding-a-function-to-automatically-generate-a-polygon-shape-of-a-3d-tileset-geometry/43453

Author checklist

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

Remaining Tasks

No remaining tasks that I am aware of

Testing plan

Function was tested in blueprint call and C++ call. The tasks can take several seconds for very large tilesets that cover hundreds of kilometers but the callback can be bound to a UI element that will reflect completion.

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.

1 participant