Just having the game open in this one map causes these lag spikes

I've searched for a while and have no Idea what can be the cause, many people were saying about shaders but I don't have a single one in the whole scene. Disabling all of the map meshes fixes the lag, but enabling just one of them causes it again.
I have another bigger map that does'nt suffer from this, runs smooth with no spikes.

Texture sizes are the same, no reflections or transparency, and I'm using occlusion and double checked if it was working. I just have no Idea what to search next.

Suggestions are appreciated.

  • Jesusemora replied to this.
  • Jesusemora

    Thank you for your reply, I got the issue. The problem was a Spotlight node. The map that works (the second) has multiple omnilights, a little more memory consumed but stable, the one that doesn't work had a spotlight for shadows, just changing the node made all the difference.

    The 'map meshes' part, i was wondering if any z-fighting or colliding objects could cause the problem.

    The meshes had materials, no shaders that I had pud on as next-pass or whatever.

    I am using the OccluderInstance3D node for hiding objects that don't need to be drawn.

    1 - i5 8° gen, rx 550, windows
    2 - vulkan
    3 - 4.3
    4 - 30 actually, all 'integer division, rest will be discarded'
    5 - Yes using shadows, idk why the spotlight in specific was causing that problem, but it was set for 300m range, while omnilights with the same settings work fine
    6 - 600
    7 - less than 200 in the scene, logical, meshes and collision shapes
    8 - Actually yes, I'll look more into it now that you mention it as not being suitable, I made the map on trenchbroom, imported to edit in blockbench, and into godot. Multimesh setting came as default and posed no problems until now

    Again, thank you for your time!

    JulianoBZ we are gonna need more information than that.

    JulianoBZ map meshes

    the what again?

    JulianoBZ enabling just one of them causes it again

    does this mesh have materials?

    JulianoBZ I'm using occlusion and double checked if it was working.

    occlusion is for closed spaces, which this is not, so it's a waste. the docs are very specific about this. have you set mesh visibility with distance?

    ok, a few questions:
    1 - comp (hardware) and OS
    2 - is this vulkan, mobile or compat?
    3 - is this godot 3?
    4 - you have 60 errors in console
    5 - you are using shadows, and by the looks of it, more than 1 light. are you using some special settings for shadow? (any changes from default)
    6 - what is the polycount on your models? enable wireframe and show us. your map geometry could just be really bad, like loose vertices, long thin faces, flat surfaces with too many triangles.
    7 - how many nodes? are those CSG? if you made this map from individual meshes instead of modeling different areas in blender, that's a problem.
    8 - are you using multimesh? multimesh is NOT for immovable objects. it should only be used for particles and things like swarms. for repeating the same object multiple times it is better to just create a big model.

      Jesusemora

      Thank you for your reply, I got the issue. The problem was a Spotlight node. The map that works (the second) has multiple omnilights, a little more memory consumed but stable, the one that doesn't work had a spotlight for shadows, just changing the node made all the difference.

      The 'map meshes' part, i was wondering if any z-fighting or colliding objects could cause the problem.

      The meshes had materials, no shaders that I had pud on as next-pass or whatever.

      I am using the OccluderInstance3D node for hiding objects that don't need to be drawn.

      1 - i5 8° gen, rx 550, windows
      2 - vulkan
      3 - 4.3
      4 - 30 actually, all 'integer division, rest will be discarded'
      5 - Yes using shadows, idk why the spotlight in specific was causing that problem, but it was set for 300m range, while omnilights with the same settings work fine
      6 - 600
      7 - less than 200 in the scene, logical, meshes and collision shapes
      8 - Actually yes, I'll look more into it now that you mention it as not being suitable, I made the map on trenchbroom, imported to edit in blockbench, and into godot. Multimesh setting came as default and posed no problems until now

      Again, thank you for your time!