Skip to content
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

Add documentation for 3D Tiles integration into Cesium for Unreal #1601

Merged
merged 11 commits into from
Feb 2, 2025

Conversation

kring
Copy link
Member

@kring kring commented Jan 31, 2025

Fixes #1542

It basically explains how the Cesium Native integration points for 3D Tiles rendering are implemented in Unreal Engine.

As always, there's probably a lot more that can be said here, but I think this hits the most important points.

This PR also has some light refactoring, because sometimes it's easier to fix weird things than to describe them:

  • Moved UnrealResourcePreparer out of Cesium3DTileset.cpp and into its own source files. Also renamed it to UnrealPrepareRendererResources to match the interface name.
  • Renamed LoadModelResult and other similar types to LoadedModelResult. This is to match LoadedTextureResult, which is the only one among this family that is public.
  • Separated FCesiumUseExistingTextureResource into two classes, the other called FCesiumPreCreatedRHITextureResource. Previously this class had two constructors that were used in two entirely different ways, for no really good reason.

@kring kring added this to the February 2025 Release milestone Jan 31, 2025
@azrogers azrogers self-assigned this Jan 31, 2025
* Physics meshes are generated, if required.
* Mesh vertex and index data for each `MeshPrimitive` are copied into an instance of Unreal's `FStaticMeshRenderData`.
* An `FCesiumTextureResource` is created for each texture. This class is derived from Unreal's `FTextureResource` and is Unreal's low-level, render-thread representation of a texture.
* Feature IDs and metadata that are made available to a material via the [UCesiumEncodedMetadataComponent](\ref UCesiumEncodedMetadataComponent) are turned into additional textures.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link fails to resolve because it's not named UCesiumEncodedMetadataComponent anymore - it's UDEPRECATED_CesiumEncodedMetadataComponent. I believe UCesiumFeaturesMetadataComponent is what we're using now instead, but @j9liu would know better than me.

@azrogers
Copy link
Contributor

Besides the one comment, it's looking good. I made a couple of copy edits but nothing major. Feel free to merge this once that comment is resolved!

@kring
Copy link
Member Author

kring commented Feb 1, 2025

Thanks @azrogers! It turned out UCesiumFeaturesMetadataComponent was missing from the docs, too, but for a different reason. Apparently constructs like this confuse the Doxygen parser and so any class decorated this way won't show up in the docs at all:

UCLASS(ClassGroup = (Cesium), meta = (BlueprintSpawnableComponent))

However, this works fine:

UCLASS(ClassGroup = Cesium, meta = (BlueprintSpawnableComponent))

So I changed a bunch of occurrences of this, and now a handful of types that were missing are showing up. Not sure if there's any way to make Doxygen report problems like this, rather than silently excluding the type. I couldn't find a way with a brief look.

@kring kring merged commit ff64bb7 into main Feb 2, 2025
23 checks passed
@kring kring deleted the architecture-doc branch February 2, 2025 07:37
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.

Create architecture diagram illustrating how 3D Tiles are streamed from Cesium Native
2 participants