Optimizations for VR in UE4

Hey guys, posted this in reddit and thought here would be an ideal place to post.

I’m talking about tips & tricks to optimize for VR. General things, specific things, all things. There’s documentation here and there when I search, but lots are out of date. Would be nice to hear your experiences and input on this topic.

THINGS I’VE LEARNED:

Keep Dynamic Lights to a minimum

Use Stationary Lights sparingly

Bake using Static Lights as often as possible

Easy on the Post Processing

Keep Tesselation to a minimum

Turn off Cast Shadows when unnecessary

Keep Translucent materials to a minimum

Play with Scalability settings to find the right balance

I’d say all of this is even more important when developing for Gear VR and mobile. Good advice.

I’m dealing with single models with polygon counts in excess of 30k - 3d scans for realistic museum exhibits. Trying to get between two and three of these models in view at any one time is a challenge to say the least. All of the above tips correlate with what I have discovered too by poking around.

I’m not convinced that occlusion culling is working correctly on Gear VR. Can anyone confirm? Think I’m going to have to use trigger volumes to switch my exhbit models on and off as vistors enter each room.

This is my mobile VR Jam entry by the way:

/

Should hopefully have a more coherent video explaining what this app is before the final deadline, though force Lollipop update today has not helped in giving me any extra time for this!

Brilliant robeastham! Thanks for sharing, and can’t wait to see it.

Similarly i’m working on an experience for an art exhibit (can’t share details quite yet), and am working with high poly models. Lowering the poly’s definitely help, especially when having multiple in view at once!

Also I’d like to hear more about your 3D photogrammetry scanning techniques :smiley:

Robeastham, Volumes would work, But maybe have your LOD’s set to a set distance. I don’t know what 3d model program you are using but if your using 3ds max here is a tutorial and other stuff.
https://forums.unrealengine.com/showthread.php?56777-TUTORIALS-Photons-Be-Free-Mini-tutorials-and-other-curiosities

Yep I looked in to Cull Distance Volumes, but I don’t think they work on movable meshes.

LOD’s would help, but even with them I’d need to hide and show actors if no automatic culling is going on. Poly count would still be quite high across the scene even with the lowest count LOD for all objects.

I originally planned the level to use rooms you could walk in and out of hoping that automatic culling would be taken care of by the engine. Seems to not be the case - at least on a Gear VR deploy.

No matter, in trying to get around the problem I may have stumbled upon something that makes my experience much more fun anyway :slight_smile:

Vertex count is not as big of a performance bottleneck as having to many Material IDs on your Meshes. Remember that for each Material you introduce to a model requires that mode to be rendered again. So while having LOD’s is good, having LOD’s that reduce both Material ID’s and Vertex count is even better and whats even better than that is using a few Material ID’s as possible.

I don’t know if you have done this, but how about Instancing them. so instead of a static mesh, make a blueprint of them and use a instance static mesh. then if you do use trigger volumes you can then reference them via that. I got better performance with instancing. with my game, with instancing on a low end graphics card, at 500,000 poly’s is the choke point for my system.