We are experiencing issues rendering our terrain in reasonable time on PS4 and we would like to request your help on the matter.
A few things about our project :
It is a VR Game targeting the PS4 (We have been redirected here from the Unity team on the DevNet forums)
We are using the default Unity Terrain
It is an open world with a single big terrain of 3000 * 3000 unity distance units
We are using the MapMagic plugin to design and edit the terrain
We are using 8 terrain layers which translate to 2 splatmaps and 2 render passes
It seems that all of the terrain is rendered on each frame
Optimizations that we have thought about and or tested:
Splitting the terrain into multiple tiles:
→ requires a lot of work for uncertain gain at this stage of development, on hold
Using the Microsplat plugin to render the terrain in one pass with the fewest texture read as possible:
→ positive early results, needs more work
The main question is:
Is there a better terrain renderer with good PS4 performance that we could switch to?
Any help that you could provide will be greatly appreciated.
We’ll be happy to provide GPU traces if you think nothing of scale can be done and we need to optimize it as is.
isolate what’s slowing down - some consoles struggle with culling because their cpu is from the 80s but are fine with GPU load except that due to shared memory you have a finite amount of bandwidth to contend with so textures had to be compressed a lot, @jbooth_1 knows more about this
switched to Draw Instanced was a 2x gain
baked occlusion worked insanely well in this level that had tall occluders. Mountains? I’d do that
baked horizon, this requires sliced terrain, there are asset to automate all that
brutally increase pixel error when framerate drops, that’s done off your performance controller
Well since I was summoned. There’s an optimization guide in the MicroSplat docs folder which will give you information on optimizing terrain and MicroSplat’s shaders. The key is knowing where your bottlenecks are, GPU or CPU, and if GPU what is it actually bound on? With 8 terrain layers, MicroSplat will use less than half the memory bandwidth of the Unity terrain shader, and execute everything in one pass instead of 2, so that should be a pretty big savings.
Lauren and Jason have pretty much covered everything here, but to expand on the isolation.
It can be super key here, since the PS4 GPU doesn’t like overly complicated code being shoved it way, you can work from your basic terrain, adding what “features” you have have included, and see if you have performance alternatives, such as Occlusion culling (PS4 hates it on terrains) Vs Async loading segments (higher potential mem but potentially lighter at one time load on the GPU)
It’s really hard to tell with unity terrain what actually affects it sometimes.
Also grab the GPU/ CPU profiler from DevNet if you haven’t already, since you’ll be able to profile target systems too, prior to brining it onto you test/Dev kits