Unsolved CTRL+F what do these three things mean?

Discussion in 'Mod Support' started by krallopian, Feb 8, 2019.

  1. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    820
    Sorry if this isn't the right place to post this but I'm curious what these three things are.

    First arrow: What are state changes and is that important?

    Second arrow: I use these as reverb zones as they have a nice fade in and fade out control, but should I use actual sound zones instead, is there any effeciency gain/loss?

    Third arrow: what do I do to get lights and OTHER things culled? I read somewhere recently that culling was currently broken or something? Right now when I look towards the center of my map from the outside of it, basically across everything, fps drops 50% as a result of nothing being culled. What is my best option here?
    --- Post updated ---
    Should probably add the picture :D
    --- Post updated ---
    HAH! Here's a reason why I ask about effeciency:

    upload_2019-2-7_21-41-33.png

    I just found my new WORST part of the map: 23451 drawcalls! (I saw 23456 once)

    Now that's at 4k with a wide FOV, and 1080 with a normal fov it's about 15,000 there, but that's still extreme. Frame rate goes from 80-90 down to 25, and that's...... all because there is no occlusion going on, so I need to figure that part out still.

    At first I thought it was because I deleted all the LOD meshes for my curbs and rock faces, but adding them back in, maybe 1fps difference, so I keep them all at max detail so it looks good, and still runs virtually the same. Surprisingly.
    --- Post updated ---
    Again, this is my AVERAGE scene here:
    upload_2019-2-7_21-45-14.png

    But going from 5000 calls to 25000 is a bit extreme.
     

    Attached Files:

    • whatDoesThisMean.jpg
  2. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    820
    I'm asking. . what I asked =D

    First arrow: What are state changes and is that important?

    Third arrow: what do I do to get lights and OTHER things culled? I read somewhere recently that culling was currently broken or something? Right now when I look towards the center of my map from the outside of it, basically across everything, fps drops 50% as a result of nothing being culled. What is my best option here?Second arrow: I use these as reverb zones as they have a nice fade in and fade out control, but should I use actual sound zones instead, is there any effeciency gain/loss?
     
  3. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Well, 25 000 is way too much, not good going much over 5000 as while you can get away with it, that seriously starts limiting number of vehicles you can use on map.

    Try this one for state changes, you can find ton more about programming openGL and state changes which might help to increase understanding of how to optimize your content:
    http://www.gamedevpensieve.com/graphics/3d/architecture/state-changes

    Essentially you have much better chance of getting map to perform when using big texture atlases.

    Essentially it comes down to UV mapping, you can make UV map that looks similar, but is about million drawcalls, that is each UV polygon is it's own island, or you can join UV polygons to be large islands, you want as few as possible and avoiding seams as seams are doubling everything up.

    So If you have each UV polygon separate next to each other, you get seams between each so you 1000 poly object is suddenly something like 3000 poly which makes 3000 drawcalls instead of 1 or something like that.

    Keep number of textures low, keep number of UV islands low, us identical geometry and UV map on same texture as much as possible. That will bring everything down.

    Turn shadows off and see what happens to your 25000 drawcalls then, if it drops more than half, then you need to start killing lights and their shadows.

    Don't rely on culling, that might not work much, it just does not behave, I think.
    For example meshroad objects ignore culling afaik, can be so with lights too, visual distance setting might be only culling those respond to.

    Decal roads, well, those can get super heavy too, I think they use their own draw distance setting, not sure if they get culled away either by anything else.

    You have certain number of textures you can use, you can use pretty unlimited number of polygons etc. with high end GPUs, but there is no CPU that can feed those GPUs unless you limit to X number of textures, where X being highly variable depends from number of cars you want to run, amount of LUA you want to run, amount of other CPU power robbing stuff that even I don't know about.

    Bigger you keep your batches, more you can build, smaller batches and GPU is just waiting CPU or just struggling to compute with those tiny drawcalls. Reading link and researching more from stuff learned from link will likely give you best results.
    --- Post updated ---
    Oh and culling might get improved maybe, I have no idea, but devs usually do improve stuff, so it might start working at some point.
     
    • Like Like x 1
  4. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    820
    Culling is what I'm most interested in.

    My models all use a max two texture atlases and are decently low poly.

    I'm pretty sure my draw calls are related to shadows and decal roads/decals and ground cover/vegetation.

    Deleting my assets, lights, and objects I've removed lod on barely makes a dent in performance - 6fps.

    25k is insane as I was saying and it happens when looking at a rock.. Meaning culling is the culprit again.

    Since I'm making this fit videos and recording at slow motion and it's only a couple camera angles that exceed the 10000 draw call Mark I'm not too worried yet.

    I'm going to open Italy and check on its numbers!
     
  5. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Occlusion volume seems not to be working though, I just tested and it does hide terrain, but not static objects, same with zones, only terrain gets hidden.

    As there were performance improvements in recent update, it probably is that those are just not yet adapted to performance improved objects, when those will start hiding static objects again, then they should give more options to control performance.

    Occlusion volumes have never hidden forests I think, so I'm not sure if they zones and occlusion volumes will work on forest items too when they are updated to work with static objects, that would be cool as it would remove pretty much all limitations on detail amounts, you would just put occlusion volumes clever places and play with zones so that you can limit size of scene to something quite small, then there is possibility to add much more details.

    No idea when or if any of those will happen though, I think @LuisAntonRebollo might know or then not if there are other priorities before such?
     
  6. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    820
    That's a really good point about the new static objects improvement causing them not to be blocked anymore!

    When you @fufsgfen do they actually get notified!? I had no idea haha.

    The last time I deleted all vegetation, static objects, sounds, and shadows, fps didn't increase much. I'm going to delete the decals and decal roads (only using 1 low detail mesh road in the entire map) and see if THEY are what's causing the limit - even though the roads all fade out at about millimeters as of recently =D
    --- Post updated ---
    So I deleted all decals, and FORTUNATELY no performance change. HOWEVER I deleted my vegetation and most IMPORTANTLY: Water reflections, and a scene reading 13000 calls went to 5000.

    Well there we have it =D

    Makes sense that reflections cause double calls, I just didn't think they were so . . reflective =D I'll just play with their detail settings, I'm sure there's some sort of, "reflect only bits of the bits you see" and that should help tremendously, this explains why there is such a performance hit when looking towards the center of the map too, basically all the water - which isn't culled, even though there's an option that says it should be - is reflecting all the things!
    --- Post updated ---
    Well I deleted EVERYTHING except the terrain, sun, ocean - draw calls were 4100 at 4k with a wide fov and reflections on the water.

    Added vegetation back and blamo 11,000 draw calls. So that's where my issue lies - wanting beautiful scenery into the distance. I have about 6 vegetation types, all with a range of 4-500 and 1-6 MILLION assets each, when I was setting these up I was never facing the center of the map, I was IN the center looking outward so I never noticed a difference until after placing more and more trees, decals, items, etc..

    Well looks like I'll have to . . cut the grass =D
    --- Post updated ---
    Wow draw calls are reduced TREMENDOUSLY when playing at a peasantry 1080p! As in, 4500 draw calls at 1080p vs 8500 at 4k! So that explains why I'm getting such a massive amount, and on top of that. . make sure you don't have "auto save" on when you're deleting things, because when it crashes and you reopen your work, this is what you get, which also kills your cache so you need to clear it annnnd fix all the other things that brings with it. Uh yi yi!
    --- Post updated ---
    OMG I FOUND IT!!

    There was a random vegetation node by itself - not grouped - and it was doing 3d objects, shadows, with a 500 range cull AT 5,000,000 items!! 14,000 draw calls went down to 5600 and there was ZERO visual difference because of their scale/z-depth settings.

    OMG OMG OMG =D Hahaha, I was getting really ticked off! "I remember this always running so much smoother, what .. the hell .. CHANGED!?" Apparently some random 3d mesh crap, must have been one of those up till 7am changes I made.

    There we have it.
     

    Attached Files:

    • oops.jpg
    • Like Like x 1
  7. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,782
    Drawcalls are per scene and scene is what you have on screen, LODs etc change as resolution change as it is how many pixels object is on your screen that defines LOD level used.

    Think about reflections, reflection reflects a shadow that is in shadow that shows reflections and .... See, it can kill a scene quite easily and water reflects itself, shadows etc. Water settings are especially such that you can't go prettyness, you have to mind performance, use block of water instead of plane if possible etc.

    Well, then there are those freak things you found and eliminated, so when building it is best to be constantly aware of changes when you add something, sometimes things happen.
     
    • Agree Agree x 1
  8. DuneWulff

    DuneWulff
    Expand Collapse

    Joined:
    Apr 25, 2016
    Messages:
    1,034
    Honestly, that's so ridiculous that it is impressive. Just for that I applaud your efforts. ;)
     
    • Like Like x 1
    • Agree Agree x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice