How many AI before fps drop?

Discussion in 'General Discussion' started by Fleskebacon, Jun 11, 2019.

  1. fufsgfen

    fufsgfen Active Member

    Joined:
    Jan 9, 2019
    Ratings:
    +29 / 0 / -0
    These days performance tends to be bit complex subject, graphics options so often affect also CPU load and to know what is affecting which is not always so easy as effect can be to GPU and CPU load, so for example with gtx1060 it is possible to add graphics options so that GPU becomes limiting factor, with faster GPU like gtx1080 that change causes CPU to hit limit.

    Takes bit of time and effort to figure out eventually, but yes, shaders can cause CPU load too, shadows and reflections can add to both CPU and GPU load, depends a bit how those are done, but only way to find out is to experiment and monitor load on each CPU core as well as GPU power usage and core load both.

    I don't know if AI and CPU graphics are fighting from same thread or if they are completely separate thread, in 1st case lowering CPU load on either graphics or AI would give boost in FPS, with 2nd, it still might be somewhat similar, I'm now sure if things can be completely separated, something waiting for other to finish etc.

    So it could be possible that lowering visible AI car count reduces CPU load from graphics and allows more room for AI physics, that is what makes it tricky to know for sure, I have found out with other games that testing vsync on and off might give some idea while monitoring each CPU thread, but with some games thread residency is low and pretty impossible to tell anything.

    You probably know much better how it is with Raceroom, but thought it is good to bring up that even with separated threads it might still be hard to tell which CPU load decrease made improvement to fps.
     
  2. fufsgfen

    fufsgfen Active Member

    Joined:
    Jan 9, 2019
    Ratings:
    +29 / 0 / -0
    Project cars 2 have one CPU core maxed out for me, not really sure why, can't remember there being any drop downs in fps though.

    What you describe though is pretty much what I have found with most sims or simcades (or pretty much most games having DX9-DX11), I doubt there will be 8ghz CPU based on silicon technology, so only logical route for any game in future is to start using all the cores or reduce amount of work done on CPU.

    4K, future VR, faster refreshrates, all that is challenging developers to find new ways to keep up with growing demands of visual quality while achieving desired performance levels. Things have gotten to this point as GPUs have improved so much more than single threaded performance of CPUs.

    In rF2 they did improve batching to my knowledge, also they are using threading capabilities of DX11.

    Good batching saves CPU cycles a lot, it can be 200% fps or even more even when using single thread for CPU. Problem comes with different cars, if having 50 cars that are completely different without shared UV maps, textures etc. you can't batch them very much.

    For example 50 000 3D trees can be very low CPU usage as long as they are same kind, but put 300 totally different trees with unique textures, shaders and no batching to scene and CPU maxes out.

    Then there is overhead and all that for each batch, which can actually be much higher than actual work in small batch.

    Way computer graphics works is that CPU makes batches that are sent for GPU, each batch can contain various number of triangles, UV mapping largely defines how much stuff single batch can contain, also different engines use different ways to group triangles to single batch.

    Having less than 1000 triangles in single batch was bad at 2003 or so, now we are at 2019 with insanely higher GPU performance and that 1000 triangles might be 10000 or something like that, having smaller batches chokes CPU.

    With Vulkan you can use all cores to process those batches, so it is not so important to have big batches, however there is more to it, memory bandwidth etc. With DX11 you can have only so much better performance than with DX9, that really is not giving insanely boost by threading alone, but saving amount of work CPU has to do by using bigger batches, that can help a lot.

    I might remember wrong, but my memory lies to me that Vulkan could achieve 10 times more drawcalls than dx11 single threaded in my system. With other stuff like shaders, AI, etc. running difference in practice might be even higher, if GPU power would not become limiting factor that would be something like 8-10 x of cars in DX11 or maybe even more?
    Yeah, GPU power and other CPU processing aspects 'may' limit number of max cars to 'slightly' lower number than 500 or so, but at least current bottleneck of games could be removed for many years to come.

    That is why people are bringing up Vulkan as an option and why DX11 is like beating a dead horse, it was great for it's time, but if looking 5 years to future which Raceroom probably wants to look, DX11 is really bad choice, it might work as stepping stone to UE4 for example, but I don't think that 5 years from now DX11 being any better than DX9 is today.

    My understanding is that developers are working on UE4 version, hopefully it will be Vulkan equipped variant, but I guess we see what wonders they will craft when enough time has passed.