Static geometry optimization - use vao


Internal change to use VAO (Vertex Array Objects) for render, depending on environment, could be a smaller performance increase.

Instance models also work so far with static geometry, one caveat, if using template models, the first model (used for the template), must render for a few frames to cache the static geometry before instantiating/loading other objects from the template model.

Files

3DObject-2-63-1.c3addon 116 kB
Jun 21, 2024

Get Construct 3 3DObject Plugin

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

So I tested with bigger models, and the lag was definitely from the amount of objects. It was better with few larger models. Also if nothing moves on screen the cpu seems to be 1%. I guess that's why you added those rotating sprites.

Right, if the image is not changing (all c3 objects don't change), then no rendering is required. This is why I have rotating sprites or rotate the model. It is currently much better for doing 10-100 objects that are somewhat complex vs a lot of objects. This is because of the cost of draw calls. For a lot of small objects, try using it without static set.

Try the 2.63.2 version, it should have some perf increase for many smaller objects. Also add a spinning sprite in your project to keep the draw active to help with consistent benchmarking.

(12 edits)

Moving the green player around after pressing the spawn around 3 times(3000 objects), seem to make the cpu jump from 11% to 90%+. Everything starts to lag.

LAG TEST