I have a question about the display of cesium3Dtileset

I have a question about the display of cesium3Dtileset.
I hope cesium3Dtileset will not be displayed in the main camera, but it can be displayed in the scene capture 2D. I have set up the scene capture 2D now, but as long as cesium3Dtileset is hidden in the scene, the main camera cannot see it, but the scene capture 2D is also invisible.
I cannot use Owner No See in cesium3Dtileset.

Hi @songhua, good question!

SetHiddenInGame (or Actor Hidden in Game in the Details panel) hides the actor from all rendering, including SceneCapture2D, which is why it disappears everywhere, assuming that’s how you hid it. And Owner No See requires the actor to be “owned” by a specific player connection, which isn’t the typical setup for a tileset.

There are a couple of approaches you can try:

Option 1: PlayerController HiddenActors (simplest)

UE’s APlayerController has a HiddenActors array that hides actors only from that player’s view. SceneCapture2D renders independently and shouldn’t be affected. In C++:

APlayerController* PC = GetWorld()->GetFirstPlayerController();
if (PC)
{
    PC->HiddenActors.AddUnique(YourCesium3DTilesetActor);
}

Or in Blueprints, get a reference to your Player Controller, access its Hidden Actors array, and add the tileset actor.

I haven’t tested this specific combination with Cesium for Unreal’s dynamic tile components, but since they’re all children of the tileset actor, actor-level hiding should apply. If it doesn’t, you could try the inverse: leave the tileset visible and use ShowOnlyActors on your SceneCapture2D component to explicitly include the tileset, then hide it from the player view.

Option 2: Set bRenderInMainPass on tile components

You can set bRenderInMainPass = false on the tileset’s primitive components to prevent them from rendering in the main viewport while still allowing SceneCapture2D to capture them. The catch is that Cesium for Unreal dynamically creates and destroys tile components as they stream in, so you’d probably need to reapply this setting each tick on any new components, which I wouldn’t recommend

This exact use case (render only in SceneCapture, not the main pass) is tracked as a feature request: cesium-unreal#1607. Adding a comment on that issue helps if you’d like to see native support.

One note on tile loading: I believe SceneCapture2D actors are registered with the CesiumCameraManager by default, so tiles should load correctly for your capture’s view frustum even when hidden from the main camera.

If this all doesn’t work could you provide some details about your environment such as Unreal Version? Trying the above approaches in a fresh copy of the Cesium Unreal Samples project available on Fab is also a really good idea.

Let me know how it goes!

Unfortunately, I have tried all the methods you mentioned and none of them are available in UE5. Your Option 1 should be the method provided by AI, which is almost always the same, but there is no such option at all. Cesium3dtileset should not have these features set in the rendering pipeline, and I cannot even set the shadow switch. I am using UE5.5 and Cesium version 2.24.1.

As I said in my post, I admit I haven’t manually tested the solution, I am just providing guidance based on my experience with Unreal Engine and Cesium, it is incorrect there is no such option at all. I can confirm that according to the UE docs here (APlayerController | Unreal Engine 5.8 Documentation | Epic Developer Community) you can find the reference for the HiddenActors TArray. I have checked back as far as UE 5.3 and this is referenced for the docs there too (APlayerController | Unreal Engine 5.3 Documentation | Epic Developer Community). You may have to Ctrl + F “HiddenActors” to find it easily.

I didn’t confirm the arrays accessibility from Blueprint. Have you tried C++?

Would you care to elaborate what you mean by “shadow switch”?

Thanks for providing your UE Version and Cesium version, it can be helpful to test these things in a brand new UE Project (I typically reccommend using a fresh copy of the UE Cesium Samples Project available in Fab as a base) as I previously reccommended, this is because the existing environment, assets and settings may have been changed in such a way that obscures what is causing your problem. Did you try that?

Although I do believe this is all possible within UE and your specific versions, this is not a feature we technically support and you can register your interest in the feature here Support additional rendering properties on Cesium3DTilesets · Issue #1607 · CesiumGS/cesium-unreal · GitHub so that the development team can better recognise that signal. Or perhaps, since it’s open source you would be able to open a PR and develop the solution to make it more straight forward

Thank you for your reply. Regarding the HiddenActors feature you mentioned, it is set during scene capture and cannot be set elsewhere. What I want is a feature similar to Owner No See that cannot be seen in the main camera.
Regarding the shadow switch, I don’t need cesium3dtilset to cast shadows, but there is no such setting at all.

Sorry, it’s my problem. This variable was not disclosed in the blueprint and needs to be solved in C++. I have already implemented it and your proposed solution is very good. Thank you very much.