Saturday, August 27, 2016

Unreal Performance Testing with the Vive

Unreal Vive Performance Testing


I've been doing some performance testing to see how to increase the number of objects on the screen.

Here is what I found:
1. Turning off casting shadows has a huge impact on performance.
2. Objects with 2 textures and few triangles (12) hurt performance more than objects with 1 texture and more triangles (156). I'm glad I learned that now. Multi-texture objects are out!
3. Distance without LOD has no effect on performance. To be expected but good to know.
4. Scale has no impact on performance
5. Static vs moveable has no impact
6. Turning on the tick for an object has no impact
7. scaling/rotating/moving an object has a HUGE impact on performance. Very very bad.
8. A material with color versus an image has no impact on performance. This was surprising to me.
9. Executing code each tick without affecting the object had no impact on performance.
10. The sky box had no impact on performance.

With no shadow casting, 1 texture UV mapped on the object and no movement, I was able to put 19x19x19 (6859) objects on the screen without a stutter.

This was a huge increase from before.

Now... I can't just be adding objects without shadow casting but I will try to avoid it when at all possible.

I also did testing of what felt visibly acceptable for the number of generated landscape regions/squares. I found that 10x10 felt very reasonable. I will allow players to customize that area so we'll see what works as things progress.

This scene was produced from my automatic object generation blueprint. I just tweaked the scale and only allowed one vertical row of objects to be created.


Next steps:
1. convert the code to pure c++
2. start adding shadow casting objects
3. look into using landscape mesh grouping to allow more of the same object on the screen at one time.

Update:
Since everything in my game will be built on the fly, I needed to figure out where exactly that should happen. I had a false start by creating a blueprint function and hooked it into my level start. That works but it isn't the correct spot for it. The correct place appears to be "Game Mode". I create a custom game mode, tell the world to use it and this acts as the "overseer" to landscape, item and player spawning/destruction.

Here is the documentation for how the Unreal Engine works. I hate spending all my time reading but this is pretty important stuff:
https://docs.unrealengine.com/latest/INT/Gameplay/Framework/index.html

No comments:

Post a Comment