Modify or Distribute Physics Workload?
Posted: 25 Apr 2018, 20:15
Hello,
I've been spending a lot of time tweaking various settings to strike a balance between quality and performance; making sure that both the CPU and GPU have something to work on instead of waiting on the other to finish. One thing I've noticed is that physics (and culling, but I don't know enough about how that works to say anything about it) becomes the main user of CPU time as I push exterior cell load distance (ECLD) higher. Specifically, this is true when I hit 3, and overwhelming at 4 and above. The amount of physics demand per cell will vary, but on average the total should increase quadratically with ECLD. I want to be clear that I'm not referring to the positive feedback loop wherein the physics time explodes to hundreds of ms.
I guess I'll phrase this half as a question and half as a suggestion. How feasible would it be to:
1. Reduce, simplify, or altogether stop physics calculations at a certain distance from the player (uncoupled from ECLD or view distance), or
2. Parallelize the physics workload and send tasks to other cores
I've read other threads here about multi-core support, so that's why I'm asking about feasibility rather than saying "Omg guys just use more cores pls". I also realize that this sort of optimization might be slated to occur post-1.0, but we don't really need to have a discussion about that. This is a volunteer project, so an easy task with an interested dev might happen overnight, and a difficult task with no support might never happen. I guess I'm just curious about how this works under the hood, and I don't have coding experience to draw any conclusions from the source.
I've been spending a lot of time tweaking various settings to strike a balance between quality and performance; making sure that both the CPU and GPU have something to work on instead of waiting on the other to finish. One thing I've noticed is that physics (and culling, but I don't know enough about how that works to say anything about it) becomes the main user of CPU time as I push exterior cell load distance (ECLD) higher. Specifically, this is true when I hit 3, and overwhelming at 4 and above. The amount of physics demand per cell will vary, but on average the total should increase quadratically with ECLD. I want to be clear that I'm not referring to the positive feedback loop wherein the physics time explodes to hundreds of ms.
I guess I'll phrase this half as a question and half as a suggestion. How feasible would it be to:
1. Reduce, simplify, or altogether stop physics calculations at a certain distance from the player (uncoupled from ECLD or view distance), or
2. Parallelize the physics workload and send tasks to other cores
I've read other threads here about multi-core support, so that's why I'm asking about feasibility rather than saying "Omg guys just use more cores pls". I also realize that this sort of optimization might be slated to occur post-1.0, but we don't really need to have a discussion about that. This is a volunteer project, so an easy task with an interested dev might happen overnight, and a difficult task with no support might never happen. I guess I'm just curious about how this works under the hood, and I don't have coding experience to draw any conclusions from the source.