Up-Votes Needed Performance Issues (Solution)

Discussion in 'Arkham Asylum (Bug Reports)' started by RTX, Feb 14, 2023.

  1. RTX Well-Known Player

    I´ve seen a few people noticing and/or expierincing lags/stutters, increased with the latest update?.

    I also been talking about it in the "Infernal Kahndaq Test Feedback" thread last year. However it seems that i´m still unheard as indie-developer.

    Let´s take a look at the issue and solution.
    Screenshots to show hardware behavior/stats in specific environments.

    CPU: 11th Gen Intel(R) Core(TM) i7-11800H
    GPU: Nvidia GeForce RTX 3070 Laptop GPU Unlimited


    House of Legends, looking to the Main Observation Deck (Field of View) [72 FPS]
    [IMG]

    Same spot turned around (Most models out of view) [369 FPS]
    [IMG]

    Full map view from outside [45 FPS]
    [IMG]

    Metropolis random spot (Medium to long view distance) [161 FPS]
    [IMG]

    This let me come to the conclusion/prove that the newer locations/enviroments don´t use a max draw distance method. (also had checked drawcalls in infernal kahndaq back then)

    In the Full map screenshot you can see that all models/objects are drawn which means that if they´re seperate and not batched (combined to one mesh) we have hundreds of drawcalls at all time which isn´t needed and been done different back in the day in DCUO (Screenshot of random spot in Metropolis, we have model/object fade out -max draw distance-)

    However when not using max draw distances, not only the model/object itself will be a drawcall, also the materials asigned to it. Therefore we end up with thousands of drawcalls if materials not getting batched. This will increase the CPU usage massivly and the tranfer from CPU to GPU will become slower (Result: Higher load on CPU, performance drop, less GPU usage, it gets less data to process)

    All Models/Objets with Materials also means that the GPU mem clock will raise up, which i´ve mentioned in General discussions. (Faster heat production, and slower loading times)

    At the end this will reduce both the CPU and GPU load, and since i´ve seen that the game only utilize 3-4 cores effectivly, each % less on the CPU is needed, otherwise DCUO will become a stutter party in a bit. Or you´re reworking the game thread, render thread splits + cores, which i dont know been done before? Since all cores getting utilized correctly at loading times.

    A simple code i´m using, in gdscript, obviously you would have to convert to C
    extend
    class_name ModelName

    export var enabled := true

    export(float, 0.0, 100.0, 0.1) var max_draw_distance := 10.0

    func _physics_process(delta: float) -> void:
    if not enabled:
    return

    var camera := get_viewport().get_camera()
    if camera == null:
    return

    var distance := camera.global_transform.origin.distance_to(global_transform.origin)
    if distance < max_draw_distance:
    $ModelName.visible = true
    else:
    $ModelName.visible = false

    Not to heavy and therefore could be used for each model with a individual distance, however a global variant would also do the job as you did in Metropolis and Gotham? Therefore you should have it done already.

    In general working in clusters isn´t really a benefit if we look back at unbatched materials.

    Alright, i hope this helps and we can enjoy going into populated areas again, with surely enough hardware specs to not get down anywhere near the 60 fps.

    Thanks.
    • Like x 3
  2. BUDOKAI101 Committed Player

    These drops in frame rate cause a massive issue when you have a revamp that is based off player experience and not players stats. Very hard to move out of the way from a one shot mechanic when your frame drops/lag
    • Like x 1
  3. Limey Committed Player


    I've died more to 1-shot moves because of pets having player collision physics than stuttering/render lag. Just sayin'.
  4. RTX Well-Known Player

    For clarification:

    I´m talking about all mesh objects with material slots including walls and low poly mesh. The solution will require both, reworking max draw distances optimally from model to camera position not clusters and thread splits, so that all cpu cores getting used.
  5. RTX Well-Known Player

    In addition:

    Even with the optimizations i´ve written, there is something more going on, one of it is AA (Anti-Aliasing) which is not getting overwritten as mentioned here.

    https://forums.daybreakgames.com/dcuo/index.php?threads/pc-client-hotfix-february-3-2023.326670/

    Secondly, i strongly believe that there is a code issue, may even giving out errors. Since technically i don´t see or would know anything which could cause the general high cpu usage, since we´re talking about basic processing in this game. However would have to get code insight, otherwise it´s guessing.

    While talking about cpu processing, make sure the world collisions are batched (you only want moving objects to have seperate collisions)
    Negative aspect of it is another step in the workflow, meaning you become unable to adjust/move objects after batching or merge, if you do it via Maya, Blender, Autodesk. If it would be to tricky to implement within the engine editor (code). This reduces the cpu utilization around 50-60% in most cases, already mentioned that before.
  6. myandria Item Storage

    True. I experience lag too on the console side. In my opinion, this is a repeat of what was happening before the game moved away from the PS3. The solution posted here is interesting and might work for the PC; not so much for the consoles. Since the PC is on the same server as the PS, I can only assume that the server has to be optimized for both PC and PS as evenly as possible. So, I think that when DCUO fully migrates to the PS5, many of these issues will be resolved.
  7. RTX Well-Known Player

    We have to differ lag and stutters/fps drops, i´ve used that term as people without knowledge in this area would do.

    "The solution posted here is interesting and might work for the PC; not so much for consoles"
    Well, if it comes to developing a game or more specificly a 3D Enviroment, optimizations will apply on all devices, a PS is nothing else as a "OS locked PC". The only benefit of such devices is that you can create your game for the hardware in the console, and you will know that it will run equal on every same PS version.

    Obviously there are a few settings which will be made specifically for consoles, but the overall development stays the same.
    Also the solution not "might work" it will work, there are physical rules which apply. In more understandable words or explaination what those things mean, if you put less load on the hardware, you get better performance. That´s what basicly happening when doing these solutions, besides using all cores (more of your hardware getting used - more/faster processing)

    When talking about lag or server lag we enter a different section, mostly lags happen when you put load on your network/ISP(Someone downloading or watching high quality streams etc.) Or simply having a to high distance to the server, then the route of your network packets take longer or beeing discarded. That can be avoided slightly by decreasing the Maximum Transmission Unit (MTU) and increasing it´s Time to Live (TTL)

    Server lag can have many reasons, in most cases the server bandwidth drops or isn´t able to respond to every packet, therefore we´re using tick rates to determ the maximum number of data which will be responded to (Client/You to Server/Them).
    Or simply to low Server hardware, RAM and CPU to process etc.
    If you wanna know if it´s really lag, you can test it by buying alot of things from any vendor like soder cola, if the response take multiple seconds its either you or server. Or use your blockbreaker and jump shortly after (response of canceling). If thats fine, it will be client side stutter/fps drops.

    I don´t wanna sound arrogant, just practically proved knowledge and nothing against you personally or the developers of this game.
    • Like x 1
  8. RTX Well-Known Player

    I believe it needs some better visuals to see one of the issues.

    Watchtower Tech Wing (Part of the Map within the red Circle visible)
    [IMG]

    Watchtower Tech Wing (Part of the Map invisible, due to fade out/draw distance - how its supposed to be) Steel and other Objects should have faded out, they do if i fly a few units away. Normally it should be same time or first NPC fade out. However doesnt need this high distance, wouldn´t be visible from any angle inside if steel drawn/visible or not. Therefore don´t draw.
    [IMG]

    Example of where it happens correctly:

    Watchtower Magic Wing (Donna Troy and Doctor Fate, visible)
    [IMG]

    Watchtower Magic Wing (Donna Troy and Doctor Fate, fade out)
    [IMG]

    Now where it happens aswell but without any sense:

    House of Legends, visible (You can even see within the red circle that NPC´s doesnt fade out) [-511 units distance]
    [IMG]

    House of Legends, fade out [-512 units distance]
    [IMG]

    The last 2 screenshots show that there is max draw distance (fade out) going on "in a new environment", but mostly without any sense. Yes i´ve seen seasonal area objects do fade out, aswell as some other objects but inconsistent and way to late.

    Also, i do know that "Character Detail" within the graphic settings will change the max draw distance of players shown, however not NPC´s. Which should also be included, simple export will do.
    For the "World Detail", we have suprisingly no change in distances, only changes blur/glow and other effects.

    I really hope that this is visible enough to see what i mean, devs (look at the distance). thanks
  9. Limey Committed Player

    I hear Dimensional Ink is hiring, maybe you should apply.
    • Like x 1
  10. RTX Well-Known Player

    Well, that doesn´t work due to many reasons:

    Job would be in Austin, Texas. I´m from germany.

    They´re looking for Art Director, Programmer for Tools, Creative Director, Lead Designer and Executive Producer with the respective prerequisite. While as Indie-Dev (Independent-Developer) you´re usually in a small group/team where everyone has some knowledge in overarching areas, for example: A 3D Artist will also do the job of an animator or fx artist etc.

    That beeing said, i´m able to create a small multiplayer game alone, while not beeing "professional" in every area. There are people which are surely better in specific areas.

    Also you need to love your work, sadly the industry changed from that perspective.

    Optimizing the game to run with the best efficiency is where i´m good at, that´s due to how i started. I always wanted to improve it, and lately it will become more and more important, when we´re looking at climate change. However, as you can see from the non response from their side, it´s not important yet. That´s also the reason why i´m holding back alot of knowledge in this section, giving these hints i just do because i once loved the game and saw that it been created with love.

    Alot of changes over the years and things getting improved, however so far i´ve not seen any company/studio which would be on the efficiency/performance level where i am, when it gets important. Sounds arrogant but it´s the truth.

    This been a project i did ~2-3 years ago. CSGO-Inferno port, idea was to keep the original models at first, but then i tought, i can exchange and play around and still have much higher fps while beeing more efficient as valve. Textures etc. also been played around nothing final, performance wouldn´t change after tweaking the visuals (Would be even increased if i retouch it these days, since the tree bark for example is a raw photogrammetry scan with about 200k vertices, if i remember correctly)

    No fps lock, opengl 2.0 (without glss)
    [IMG]

    fps lock to 150[IMG]

    Have to add that browser/youtube been open in the background on both pictures, still the GPU/CPU Watt should speak for themself. Again this is an old project, these days i´ve stepped up the graphics, see it in comparison to CSGO on source engine. If you have CSGO go to the same spot and check it.

    The new project however i can´t post here, since that´s going to be published. Hopefully climate-change will force studios to optimize their software/projects/games to the max. I believe time will show, without power cost reduction, there will be no stop.

    Before i forget, glss is a upscaling method like dlss, however it never reached the results nvidia is capable of, therefore having dlss support with 50% ultra performance, we wouldn´t have 1600 fps...we could end up at nearly 3000 fps. Now lock that to 150, then we´ve reached the point where a internet browser consumes more hardware resources while watching a video in 1080p.

    Alright, i´m out. Watch out for something like this

    Kidding, can´t do that anymore...otherwise people going to have a slideshow.
  11. RTX Well-Known Player

    Have to update this thread aswell, because hardware usage been affected by a third-party program (MSI Center hooking the game). I haven´t notice since it been installed with a windows update. But well, even if you think you know or tought about everything, life will slap you.

    I´m kinda suprised about myself, since i even wrote that the game is using all cores when loading and that there might be another issue with code, but that the code change/hook been on my side...it´s a shame, well it´s important to admit your own faults.

    However it doesn´t erase the knowledge shared. Also MSI been contacted to fix this maybe "game specific" issue.


    CPU: 40W GPU: 100W, 333 FPS (From 72, due to MSI Center - Basicly cores getting utilized correct now, more data for the gpu)
    [IMG]

    I apologies, it´s playable without having to fear 60 FPS, with equivalent hardware. Efficiency is still bad.
    But that´s not my task, i will focus on my projects and things are fine. Piece