Jump to content

Large world performance - Hints and tips


photo

Recommended Posts

Hi all, over the last week we have been doing some extensive testing of large worlds and terrain tiles with associated grass, trees etc, and i thought i would share these findings with the community to hopefully save someone else some time in the future.

 

Our test case is 60 tiles of 8193 x 8193, at 1 step resolution, in a long line , so 30 x 2 tiles

 

Currently we have this running at a smooth 100 - 120 fps

 

This is probably more relevant to Simulation than a gaming setup for Unigine assets.

 

Test rig:

Intel core i7 @ 3.2ghz

16 gb ddr 3 ram

nvidia geforce 570 gtx

IDE sata HDD

windows 7 64 bit

 

 

Findings:

  • With this many terrain tiles it is advisable to only use a Coarse diffuse and normal map - do not generate patch surfaces! this creates too many files to load and can cause large render stalls, not to mention unmanageable amounts of data.
  • if not configured correctly, Grass will also drop your framerate by a huge amount, and also cause render stalls - advice is to be very carefull with objectgrass and start off with very conservative settings.
  • Dont be scared to use a large LOD distance for your terrain - we are using 120 and flatness 40 and find this to work well, showing no visible seams between tile edges, of coarse tune this to your own system specs.
  • Use the profiler - it has been a hage help for us in finding our problem areas, start with basic terrain and get that running smooth before you add grass and mesh clusters - that way you can add things one at a time and see the performance hit, then tune the settings for each system one at a time.
  • Set your terrain distance to around 6000, this ensures you do not see pop in of patches, but gives acceptable results.
  • We have found terrain occluders to be of little or no help - they just seem to cause more problems, but did not really increase our rendering speeds when we did use them.

 

Another thing we did today that gave us a huge FPS boost was to update to the nvidia

301.42 WHQL drivers, they improve performance, and also add adaptive vsync, plus FXAA antialiasing.. we gained a 20 fps increase from this at least, hovever we had not updated drivers for a while so you mileage may vary.. i do however recommend using adaptive vsync as it has made a big difference in maintaining smooth framerates without tearing.

 

 

 

 

I plan to keep this thread updated as we learn more over the coming weeks, and i have to say i am extremely impressed with Unigines ability to render a world this massive (over 500km long), it has taken a lot of research, testing, tweaking and tears.. i have no fear this will scale up well and look forwards to trying 1000km next.

 

Please feel free anything you may have found to this thread so others can benefit from performance tuning tips in the future

 

 

 

Regards

Shane

  • Like 1
Link to comment

great topic! Will be following this

But may I ask at what resolution you are running it?

 

And can you show a screenshot of the world perhaps? So we can see the actual scope of the world

Link to comment

We have found terrain occluders to be of little or no help - they just seem to cause more problems, but did not really increase our rendering speeds when we did use them.

 

The effectivenes of WorldOccluderTerrain is heavily dependant on the scene content (object complexities and extends, scene occlusion situation, etc.). As all occluders first of all add additional processing burden to the scene it's actually an optimization problem where and when to use occluders (plane/mesh/terrain) to get a real benefit.

 

While occluders might be counter-productive in flat areas (low scene occlusion), they might be highly effective e.g. in mountainous terrain areas or complex urban environments (high inter-object occlusion). Of couse there must be cullable objects in the scenery which are costly to render (a lot of polygons and/or heavy shaders) so added occlusion overhead pays off.

 

Also the scenery object extends shouldn't be too large for effectice culling. Occluders will not be effective in case of very large objects (e.g. single ObjectGrass object covering a complete terrain tile) as this will prohibit culling (there will be nearly always a small part of this large object visible). Nevertheless in certain situations occluders will make the difference especially of you have to use fixed frame rendering rates like in simulation.

 

Also the player position has an influence on the effectivness e.g. for flight simulators. While flying (high) occluders should be deactivated as they will reduce FPS due to missing scene occlusion, but they might be usefull in performance critical landing/takeof situation on/near the ground.

 

So the simple message is: occluders have to be used with care and a very good understanding which part of the scene really impacts performance. Like proper scene partitioning (tradeoff between draw call count and culling efficency) occluder usage is a local/global optimization task. Especially for large worlds best approach is some final automatic world scene analysis to find local performance hotspots and to test for performance improvements by additional occluder usage. While this is easy to write down in a single sentence in practice this is of course quite a complex task and also tightly coupled to the level creation process itself.

  • Like 1
Link to comment
  • 1 month later...

We are in the process of building our first commercial train sim with unigine, it ecompasses 55 tiles of 8193 x 8193, and is in an area of northern western Australia, so very desert like terrain. we are currently in the very time cosuming phase of generating the terain in World Machine. And have identified several posible enhancements we may request Remnant to add for us to save time on future jobs.

 

I will update in a week or so after we compelte delivery with more findings i am sure will come out of it.

 

today i did find that compressing terrain textures improves how they look in the distance.. Is this because the process also generates mip maps?

Link to comment

We are in the process of building our first commercial train sim with unigine, it ecompasses 55 tiles of 8193 x 8193, and is in an area of northern western Australia, so very desert like terrain. we are currently in the very time cosuming phase of generating the terain in World Machine. And have identified several posible enhancements we may request Remnant to add for us to save time on future jobs.

 

I will update in a week or so after we compelte delivery with more findings i am sure will come out of it.

 

today i did find that compressing terrain textures improves how they look in the distance.. Is this because the process also generates mip maps?

 

Could you tell something about the WM enhancements? As we are also using WM

and do you have any screenshots of your desert like terrain as we are working on something similar and I was wondering how you tackeled a large barren environment without ti being too barren

Link to comment

Hi Rob, i will post some pics once done - we are still in the WM Generation phase, and this whole world has to be delivered in 1 week.. really going to be pushing it.

 

The enhancements we have requested are that tiles are written once complete and not at the end - this means if we have to cancel a tiled build for some reason we do not lose the tiles already calculated,

The other thing is being able to select tiles to output from the 2d layout screen itself rather than the picker, this will make it much easier to see where/what features are on the terrain you are picking tiles from.

Link to comment

Hi Rob, i will post some pics once done - we are still in the WM Generation phase, and this whole world has to be delivered in 1 week.. really going to be pushing it.

 

The enhancements we have requested are that tiles are written once complete and not at the end - this means if we have to cancel a tiled build for some reason we do not lose the tiles already calculated,

The other thing is being able to select tiles to output from the 2d layout screen itself rather than the picker, this will make it much easier to see where/what features are on the terrain you are picking tiles from.

 

Those enhancements would be quite usefull cant wait to see the finished terrain, good luck with your deadline!

Link to comment

I have two questions, first what is exact performance difference between world/mesh clutter and cluster? In documetation is note, that world/mesh cluster stores more information than world/mesh clutter and it is less memory friendly. Can we know how big is the difefference (bytes per object....)? Is there any CPU/GPU impact too?

 

Second, I dont get difference between world cluster/clutter and mesh cluster/clutter in terms of usage. In Valley demo, there are only mesh clutters. So what is example and proper usage of world clutter/cluster? Thanks for any answer.

Link to comment

World/ObjectMeshClutter procedurally place instances based on some random algorithmes modulated by mask density textures while WorldCluster/ObjectMeshCluster use explicitly placed object instances. For the later each baked object instance position has to be stored with mat44 transform matrix which is not nessescary for procedurally placed clutter instances

Link to comment

World/ObjectMeshClutter procedurally place instances based on some random algorithmes modulated by mask density textures while WorldCluster/ObjectMeshCluster use explicitly placed object instances. For the later each baked object instance position has to be stored with mat44 transform matrix which is not nessescary for procedurally placed clutter instances

 

Yes, I understand this difference. My question was aimed at difference between world and mesh, not clutter vs cluster.

Btw, is clutter position of objects always deterministic (with same mask and seed)?Thanks.

Link to comment

Does anyone know if lots and lots of foliage would kill the framerate?

We have an 8193x8193 world and its a desert like environment but at the moment its a little barren so I was wondering if I would add lots of foliage similar to the game Red Dead Redemption if it would totally destroy the framerate

 

Ive added a screenshot of what I would like to achieve

post-509-0-67387200-1346052202_thumb.jpg

Link to comment

Does anyone know if lots and lots of foliage would kill the framerate?

We have an 8193x8193 world and its a desert like environment but at the moment its a little barren so I was wondering if I would add lots of foliage similar to the game Red Dead Redemption if it would totally destroy the framerate

 

Ive added a screenshot of what I would like to achieve

 

Foliage will always decrease frame rate (for example grass can be very heavy). But it depends on lots of factors. Complexity of models, resolution of atlases, oclussion possibilities (shape of terrain), visibility, fade distance...Anyway if you look at Valley demo, Unigine can handle quite heavy vegetation scene with reasonable framerate on modern HW.

Link to comment

Yeah the engine does handle quite well with large amounts of foliage as seen in valley but my main issue here is that im using green colored foliage on a sand colored terrain

so as soon you move away the foliage will dissapear and im trying to find a way to overcome this but atm I dont really know how yet,

in the valley demo this really isnt an issue as the grass is green and so is the underlying terrain so the pop-in is less noticable

 

So what would be the best way to increase the draw distance for foliage without losing too much fps?

I was thinking about using 2 grass nodes 1 with full density which is only drawn around the player and another with much less density to use in the distance with a higher draw distance value but I dont know if this would be a good approach

Link to comment

Rob, i guess you could make the last lod distance on your tree model very high.. If you have very few trees it should not be a problem.

 

Ye was planning on setting it to infinite even but we also want lots of small bushes around and we dont want the very noticable pop-in as seen in the valley demo, especially since the color of the foliage differs so much from the terrain

Link to comment

 

Ye was planning on setting it to infinite even but we also want lots of small bushes around and we dont want the very noticable pop-in as seen in the valley demo, especially since the color of the foliage differs so much from the terrain

 

What about baking small vegetation to terrain diffuse texture using grabber? From big distance it should be enough.

Link to comment
What about baking small vegetation to terrain diffuse texture using grabber? From big distance it should be enough.

 

Thats a good one! Havent even thought of that, totally forgot about grabber

Link to comment

A question about grabber, wouldn't this leave then a picture of your trees on the diffuse map under all your tress when viewed up close? wouldn't this look strange?

Link to comment

A question about grabber, wouldn't this leave then a picture of your trees on the diffuse map under all your tress when viewed up close? wouldn't this look strange?

I tried this yesterday and it does and it looks very strange and for a 8193x8193 terrain I can never get a big enough texture to get it to look right as it looks like blurry spots,

I had it grab a 16kx16k texture but the quality still was way too low to use, maybe its useable for a coarse diffuse (thats the distant terrain texture right?) but I havent tried that as for now I just have a very large draw distance on small foliage with a high fade distance so the player always sees something in the distance while the performance stays more or less the same

 

But how much foliage do you use Shane? As you mentioned you were working on a australian desert type of environment, just wondering as our scene still looks very barren

Link to comment

Rob, this is indeed the same problem i am tackling right now, and we have had to make some compromises purely because of our tight schedule, it is a testament to Unigines content creation power that we have been able to create a stretch of terrain 170km long at 1m resolution in a few days.

 

However as you say draw distance of foliage in these circumstances is a real issue... i believe custom content with billboards for final lod will be the answer, however we do not have the time to build this custom content.

 

We have had to make compromises by using only one bush type, with random scale and rotation. This i have a lod distance for the last lod of 300 and a fade of 70. the cluster settings are the same. Yes there is some fade in, but we will live with it in our case.

It does bother me that you cannot see the foliage at a great distance, but i guess this you cannot have everything. Also we are using very sparse settings.. i would love to be able to add more, however if i turn up density the framerate does not drop too much, however i get very bad stuttering and hangs at certain times... unacceptable for a simulator.

 

unigine has a lot of performance tuning options, but that can be its downfall at times, it is a balancing act between many different systems and many different settings. all of them seeming magic in the way the work and exist with eachother.

 

 

I would love to see a complete guide to world content creation at some time in the future for large world handling.

 

It would be great hear if anyone has an idea on how to setup many many trees on a contrasting coloured terrain that are visible at a great distance.

Link to comment
×
×
  • Create New...