Zeneric escreveu: ↑25 Ago 2020, 14:41
Optimizing them will reduce the draw call work but I doubt this will help with the FPS drop issue. Going to optimize regardless.
It will, but not 100%. It's just half of the way.
Each material is 1 draw call in GTA SA (which use very simple shader with a single pass, I think alpha fix from SkyGfx gives 2 draw calls because of dual pass alphas). And each single object increases it, so, if Grinch_'s trash objects has 2 materials, and the mod have 20 trash objects, it will be 40 draw calls. With alpha dual pass, I think it will be 80.
Both GTA V, and GTA SA with Project2DFX default settings (in ground, which isn't so overkill), have about 5000 draw calls (yes, GTA SA isn't optimized). With Project Props the draw calls count is more than 2X larger and the vertices count is 3X. This slows down the game performance about 2X.
Try to optimize mainly the models you use the most, such as trash, for each object use only 1 material, if originally using 2, the loss of performance of your mod will cut in half (if it is done with all the objects, but only the main ones already helps a lot).
This is a single object for all bridge? If not, this is overkill for draw calls. If so, make a single object.
This is why the game put houses together, also interior props, even if same objects, they are merged to decrease draw calls.
Another reason is that, each object is a new CPU process (it runs all those flags, the position, calculate the occlusion culling etc), so, less instances means less CPU.
My Minecraft Mod runs millions of blocks, and, since is just for fun, I run each block as an object, and each block is a cube with single texture. Creating just the blocks as objects only in surface with 50 or 100 meters away from the player, it's 20~30 FPS in my old i3. If I create all objects, I tested about 100k objects, the game performance become to be measured as FPM instead of FPS.
The most interesting thing is that I make all objects invisible and it keeps the low performance (but not too much).
Zeneric escreveu: ↑25 Ago 2020, 14:41
What is your CPU, @Junior_Djjr? I think draw call is bound to CPU.
My CPU's Intel 6600k overclocked at 4.5ghz and my GPU's Nvidia GTX 970.
i5 9600KF with GTX 1050, it's a pretty good CPU, specially for single core games, but draw calls is CPU + GPU, is in general a way to calculate the graphics performance.