Scene component 2D - Multiplayer and Day/Night cycle

Hello,

I would like to have the mesh of the player character displaying in a widget using a SceneCaptureComponent (there’s no other way of doing it, right ?). I created a child blueprint of my main character class, which I can’t use because I want the character in the widget to have a different behaviour, animation in particular.

A general question first: if I’m right, the actor with the component needs to exist somewhere in the level for scene capture to work. Where, then, should it be spawned ? And in the case of a multiplayer game, what’s the best way to handle this ? My first though is to make the client spawn the actor with the capture component.

A second one now: I’m using a day/night cycle in my game and I would like this character in the widget to NOT be affected by these changes. When it’s spawned in the world, it receives the same lighting as the other actors. Maybe I could disable the Channel 0 and add an appropriate lighting, but it feels very dirty.

Thank you!

Bumping this post :slight_smile:

I’m thinking you’ll probably want to make seperate character/actor for the scene capture version, and add a point light or something along with a capture comp to the actor. Then when you open the inventory or whatevs, spawn the actor at player loc -2000Z or something to hide it under the map. The terrain should shade it from the sunlight that way, and would hide it from other players in MP. Could also add a box to the actor to block any stray light if sticking it underground isn’t enough.

To have the clone inherit the player’s appearance, expose some vars to OnSpawn to set them with spawn actor, and have construct script or begin play use them to update the mesh.

Well, that seemed like the right approach to me, thank you. However, now that I’m trying to implement it, I’m facing another issue. I can’t find a way to really block the lighting, even with a dedicated “room” for capture, because of my skylight. The lighting always get through.

Might be able to use post proccess volume in changing room with a black texture in the ambient cubemap section to blackout the skylight? Or if using lumen, maybe build some boxes around changing room with a black unlit material and max roughness?

Sadly, it doesn’t seem to work :

Playing with the Tint and the intensity values doesn’t help (it feels like it’s being additive rather than replacing. My skylight is stationnary, would mobility be the cause? Lighting has been rebuild.

Additionnal information : The room mesh is two sided, with a sufficient thickness. Recreating this room with 6 base Cube meshes of the engine gives the same result. A fully unlit black material doesn’t change anything, and I’m not using Lumen. Obviously, I can’t just change exposure or the capture wouldn’t work. And I can’t set the skylight intensity at runtime as I need to have the normal intensity in the world during capture. Lastly, reflection capture doesn’t help too.

Are you using distance field ambient occlusion? There’s a panel in the skylight comp where you can tweak min occlusion and tint which can make interiors really dark.

True black shadows like that look funky in a normal section of world, but it could black out a hidden area at least.

Dunno if being stationary woudl cause the cubemap to not work, is probably just additive as you said (I mostly used it before to brighten interiors in ue4 lol). Should probably set skylight to moveable if day/night is dynamic tho.

Stationnary skylight really suits my needs so far, and, unfortunately, DFAO is only available for moveable skylights. It feels like I’m missing something to understand skylights here. Especially if the lighting is partially baked, why would it go in a completely closed room ?