Im using Final Color capture source with post process material to remove background. There is 1 static mesh and 1 skeletal mesh set to capture. Any possible solutions?
The problem becomes noticable in a packaged game. In editor everything at least seems to be fine.
Exacty what im using. I only have 2 components there. In unpackaged project its all good, but in a packaged version GPU STAT shows unacceptable raise from 7 to 12. The only additional thing i use is my post process material to remove background out of the Final color capture source, but it does not affect performance. And yeah, i cannot change the size of the image, it has to be exactly the same size as a space it takes on screen.
Strange. I’m doing a capture in game and it’s not affecting performance much (maybe 10 fps reduction). Just tried it in a packaged build.
I called SetVisibleInSceneCaptureOnly(true) on the static mesh components. I also used the second light channel (turning off the first channel) for the camera and assets being captured. I updated the main lights to also support the second light channel.
You could also try “Max View Distance Override”.
Ohhh… I forgot I also disabled “Cast Shadows” on the directional lights that are used only for the capture as there’s only one actor and I’m already getting shadows from the main light. Turning on shadows in my two directional lights reduced my fps by another 20 fps. So total reduction of 30fps.
And if you have “Cast Cloud Shadows” on any directional light, your performance will tank.
Well, it didnt help. I switched 0 lightning channel to a 1st one, only added a single lightning source there (point light) and made my meshes to be visible only in a scene capture, max distance is 1000. Didnt help, i still get drops from 90 to 50 fps when i place second capture, and 160 to 90 when i place first capture. Still just 2 meshes.
My capture resolution is 1420 x 1680 (even if i set it to be 200 x 200 it still does 160 to 100 fps drop tho), and i cant set it lower cuz the image’s quality will get potatoed. And my custom solution in C++ eats even more FPS than a scene capture, so i guess ill just try to find some other methods to add a 3D model into a widget.
Also, i get 140 → 110 fps drop EVEN when every single show flag is disabled, and my texture’s resolution is 1 x 1. I think that this might be some bug. The texture aint being used nowhere, and to test i just turn on and off the Capture Every Frame setting. Again, in a Built version of the game
WOW! 5ms for TSR is crazy. Maybe TSR doesn’t play well with capture cameras?
I don’t use TSR. It was too slow for me overall (even without captures) and I find TSR is terrible for straight edges. I have a lot of hard edges in my game so I switched to TAA. But in my capture camera, I have TAA disabled. I think it uses FXAA instead.
Is there an option to turn off TSR in your camera? It should be in the “Advanced Show Flags”. Maybe it would still have acceptable quality. If you absolutely want to stay with TSR in your captures then I don’t know.
I looked at my stats. I have a screen with 3 captures (One actor each with lots of Niagara effects). I’m getting high times on Basepass (3), ScreenSpace AO (1.5) and all lights. TAA is 0.4. Postprocessing is 1. Still getting 60-70 fps. In game with one capture, I’m getting well over 90 fps. 100-110fps without capture. The only difference in stats were lights.
Now I have to look up what Shadow Depth is. I’m getting 5ms in game.
edit: Ah, I’m now seeing your post that you turned off all the show flags. Was there one to disable TSR? That did nothing?
I dont really think that TSR in that situation means anti aliasing to be honest, this might be some kinda compression of an image. I tested with both FXAA and TAA, same results. Here are the results with EVERY single flag disabled (literally shows nothing right now) and a SINGLE pixel resolution ( 1 x 1) of a texture.|
Well, testing on an RTX 4090 and I9 14 gives pretty same results but scaled. Current PC that is used in displayed tests is an RTX 2060S with I3 10100f. Im gonna test it in a pure project as well, but i think it will give me the exact same result.
Yes, if you are using the scene capture for an equipment menu mannequin (like in PUGB) then the scene captures should be turned off whenever the menu is not visible. If used, then scene captures must be very strictly managed.
I experience i huge performance impact as well - especially in the final package using unreal 5.5.
my “scene capture component 2D” only renders 2 simple cubes (static meshes using “Show only Actors”) to “Device Depth in RGB”.
i disables pretty much anything on the “scene capture component 2D” (like shown in the screen shot) but still get a huge drop in FPS activating it: from 80fps it goes down to 60fps!
and this for just rendering 2 cubes into depth!
the scene itself it quite simple as well: just the 3rd person map plus a nanite tessellated terrain using RVT. so i wonder if the “scene capture component 2D” simply can’t do better or if i am doing something wrong.
looking at a capture from nsight (frame times area bit off here ) the actual execution time for the scc2d still is high (< 10% of the overall time) but maybe acceptable. so what concerns me most is the “padding” to the right before the actual scene rendering starts: here the GPU just seems to idle before the nanite visibility buffer starts to render.
I’ll just throw this in here. Not sure if it’s relevant. While I never had a severe drop in performance, one thing I did struggle with was that my shadows would flicker. Basically, my capture camera was in a far away land with its own surroundings. This caused the lighting near the main camera to switch to distance field shadows, but it couldn’t keep up. So the main camera would display bad shadows. The two cameras were fighting for what shadows to use and the engine couldn’t keep up when the switch happened twice per frame causing flicker.
I moved the capture camera closer to the main camera and everything was fine.
I’m not using Nanite, but I’m wondering if Nanite isn’t more sensitive to camera location changes.
I’d be curious what happens if you just put your capture camera NEAR the main camera and also aim it in the same direction, but only render what you have set up for the capture (2 cubes or whatever). This would ensure nanite visibility shouldn’t change, lighting shouldn’t change (though you may need to keep the same lights on/off), shadows wouldn’t change, etc.
Just a thought… possibly futile, but thought I’d mention it.