Hello, i’m trying to improve the performance of my game, but i’m not having much success. I tried to use OccluderInstance3D but it doesn’t seem to have any difference, even with the occluder there are a lot of objects in scene.
Also, i noticed that the fog and shadows are demanding a lot from my GPU.
The LOD of the objects are low, but as you can see, my GPU is about to explode, when i turn the shadows and fog on the fps falls to 14 ~19, when the shadow is turned off i have more then 30 fps.
occluderInstance is for closed spaces and certain levels. in the docs explains that for open areas to take advantage of it you have to use mountains or something to “occlude” the view.
what hardware are we talking about? integrated graphics struggle more with rendering lighting. it would also be helpful to see what the environment node looks like, the lights, and the node tree.
that is not low FPS, but it could be improved.
just from this picture, I notice these things:
1 - there is not much in the scene, and nothing that could cause problems. there are very few lights. it could be the settings of the few lights that could cause problems, like the level of blur or light size.
2 - transparency. for semi-opaque objects like grass it is better to use scissor. alpha transparency will always cause problems with FPS, scissor is a much faster method.
3 - most of the scene is obscured by mist. you could do the silent hill trick and hide geometry behind mist. look for the visibility range to hide nodes far away from the camera.
4 - scene looks low poly, there are probably many materials. try to limit the number of materials per meshinstance3D, and combine simple shapes into bigger meshes in your 3D software like blender.
5 - there is a shader on the screen, this could be causing the performance issues.
using volumetric fog like that over the entire screen space is basically the worst case scenario for volumetrics performance. it doesnt really matter how complicated the fog is or wether it has a texture (besides from vram usage), the performance hit is per-pixel so youre adding that load onto every pixel in your screen. try disabling volumetric fog and just stick to the regular fog. If you really want to use the volumetrics set the fog density in your environment node to 0 but keep it on so you can use a fog volume instead and just make a small ellipsoid around the lights. the full screen volumetric fog is, of course, all of the time spent on “render fog” in this image
but its almost certainly also the opaque pass, and i have a feeling its whats making the omnilight shadows take so long as well as each pixel that marches through the fog and goes through the range of the lights also has to consider the light at every step of the march. the fog’s impact on performance is also heavily influenced by lighting and shadows.
theres also that 4,500 objects is a lot. are you using multi meshes? how many materials are on screen at a time here?
volumetric fog has no impact on performance, it’s maybe 2 frames on an integrated GPU.
also not true. having 20 lights in volumetric fog has no impact on performance.
of course, lights must be small enough and not intersect much.
the number of nodes is not as important. sure, it could be reduced, but it’s not going to cause performance issues unless they are all running code.
aaaand here’s your problem. this PC is very weak. it’s a CPU/GPU from 2014 with 1Gb VRAM. you can’t render a full 3D scene with buffer shadows and PBR, the GPU is just not good enough.
14-19 FPS is expected for this hardware.
you could try going to project settings and doing some changes to reduce quality and increase performance, if this is your target hardware.
1 - changing reflection, GI and shadow options to faster.
2 - disabling things that “have a small performance cost” (read the tooltips)
3 - you can also try upscaling, instead of rendering the scene at 1K, you render it at lower resolution and upscale it. go to the upscaling part in project settings and use either FSR or bicubic, go to something like 99%/90%, and keep trying lower. 50% will look bad but give a huge boost in performance.
now, about the scene:
1 - spotlights are set to a huge range. set the range to the point where they touch the ground and no more than that, it will increase performance. I don’t believe those poles are 50m tall.
2 - not all lights need shadows, only the ones that directly interact with geometry. something like a wall lamp that doesn’t cast shadows on a building with no interior can have shadows disabled with no difference. and lights on distant buildings can do the same.
3 - use materials with emission for some light sources, you can use simpler lights to simulate lighting around them.
4 - use projectors to simulate shadows. for example, a spot that goes into a grill can use a projector with a grill texture instead of shadows. or you can use lower quality shadows overall.
5 - environment is fine, maybe don’t use volumetric fog and fog at the same time and choose one? but test things out, if there’s no difference you can keep it.
@h3lly3r
i implemented these things, i set the scale of the scaling 3d to 0.75 (it’s very good for my game, besides it helps the performance it also gives the game a cool aesthetic), i turned the shadows of the lights off and i set a rendering distance to a lot of objects, now i’m having much more fps even with the shadows, fog and volumetric turned on, now there are 4300 objects in scene. Also, i reimported all the textures with the lossy mode turned on. You can see the final result in this video, thank you guys, you helped me a lot.
VRam Compressed will probably do you better than Lossy. Lossy might help the on-disk file size, but once it’s in your GPU it’s re-inflated to large data, unless it’s VRam Compressed.
Have you tried compatibility mode instead of forward+?
i tried using this mode, but i think the graphics looked really bad, and for some reason, it causes my GPU usage to drop to 0% while my CPU usage spikes to almost 100% when I run the game