Best Replacement for Unity Terrain

edit note: This thread is not about Unity tutorials on terrain I know every last trick in that book and they do nothing to get where I need to be. It is about replacements for that system and performance characteristics and toolsets of replacements found on the Asset Store.

I have created a real world motorcycle run that is world famous. The franchise that runs the publicity on this course called “The Tail Of The Dragon” on hwy 129 north of Robbinsville in North Carolina has something like 138 curves over an 11.1 mile run has 10 more local runs they want reproduced. Using various mapping downloads such as bing I have all the displacement maps using Unity terrain and roads using EasyRoads and have the entire 7x7km area mapped to within 5 metres of accuracy for the roads and 1 meter of accuracy for the terrain heights. However I cannot get above 45 FPS and it makes the motorcycle sim jerky and it definitively does not have the look of a North Carolina subtropical rainforest due to severe limitations in how much detail objects and SpeedTrees I can add. The framerates drop rather substantially if i try to get any kind of denseness to the forest and detail features such as grass, roadside pebbles and rocks and terrain boulders and clusters of bush and other smaller vegetation.

Having said the above I understand there are several packages on the Asset Store that do get much better performance and have other outstanding features. I am seeking the best package not to build from scratch but to easily transfer in the minimum time all the displacement maps, splat maps, the EasyRoads highway and secondary roads. As well the ability to rapidly create the surrounding forest with some degree of density to match the look of the actual real world area by painting objects or mass placement tools. I would prefer to use SpeedTree trees as they look so much better than Unity trees. An instancing system for these would probably help with framerates. As well I am using ats Colormap Terrain Shader which gave the terrain a truly varied look and would like to keep close to this.

I believe a lively discussion of pros and cons of these packages will benefit a great many who are unsatisfied with the current Unity terrain system with SpeedTree who wish to go around them and not wait foreever and an eternity for Unity to take care of this crucial part of many games. It will also help the various developers of these packages and maybe give Unity a few more clues so they can click.

6 Likes

Very interesting topic, and quite relevant to what I’m about to fiddle with as well.

Could you please elaborate a bit on how they license their data and what we can do with that in general? What I’m currently working on will be based on Worldmachine, but I sometimes need topographical data and so far I’ve been using GTOPO30, which has the whole world, but isn’t very high res (1 pixel = 1km I think). There are other free data sets of higher resolution out there. Afaik the US Geological Survey is a good source for public domain datasets.

In what format do you have the data currently?

I’ve only briefly tried using the Unity Terrain and my usecase is a bit unusual, since I have almost a topdown perspective and looking far ahead isn’t an issue. I noticed that the Terrain renderer is relatively slow (~5-6ms) and I couldn’t pinpoint why or how to optimize that. I didn’t even use trees or other detail objects. It seems that I get a lot better framerates when I only use the terrain collider and use relatively high-res static meshes for rendering. But I haven’t found a good way to line them up automatically and eyeballing it doesn’t seem right, especially if more than one level is needed. Worldmachine has tiled output options in the pro version. I haven’t used those yet, but I plan to at least try them out. I could imagine that it would be possible to feed your input heightmap and splatmap into WM and output it as tiled meshes with tiled splatmaps. You might even be able to create LODs that way, but I think the edges will not line up perfectly unless you code something for that.

For the dense forest, can you be sure or enforce that the player won’t leave the road? If so, I’d imagine some alpha mapped photo textures for the background behind the modelled trees would give you a good enough result at low performance cost, but I haven’t actually tried it

1 Like

On the heightmap data. Most US mappings were in the 10 metre per pixel range and that was not close enough for this particularly varied terrain. You have to have a Microsoft account to get the data for heightmaps and can only get so much for fee before they ask you to open an Enterprise Account and fork over some cash… The Bing maps had the highest resolution. I used EasyRoads to get to roadmap data and it did a marvelous job but had some tricky stuff with joins and such I was too rushed to get a grip on totally. But it did place the roads properly using OpenStreetMap data and using a quadrangle bounded by real world coordinates with five figure precision beyond the decimal point. It even had the ability to grab some roadside buildings and other objects if the OSM data had it within the dataset. In the US you generally got a block that was mis-sized but apparently Euro OSM data actually had some 3D models of various structures created.

For the splat maps I got the google satellite maps which give a good indication of forest versus rocky versus dirt versus grassy and some roadside non-vegetative areas. I then used those in the same size as the displacement maps and created a pipeline to split out the various colors using the Select By Color tool in PS and layered in various colors (R-G-B-Greyscale) in MultiChannel mode (I forget why that was totally necessary but it was) with a hint of feathering to the selection areas and a hint of Gaussian Blur after filling in the selected areas with RGBA as appropriate for what textures I wanted in the terrain texture maps. A pain in the arse to devise but saved me carpal tunnel syndrome and a pain in the wrist and then converted from MultiChannel to Tiff for import to Unity. It did give me very highly detailed splat maps that would have been near impossible to do by hand. The EasyRoads3D Pro dev sent me a script to import them into his toolset in a readable by terrain shader format, though I think your toolset has a similar PNG to SplatMap tool. I also used the google satellite maps blurred slightly as the main map in the ATS Terrain Shader and the splat maps for individual textures and blending of them. Great shader and eliminated tiling artifacts.

I have a Terrain to Mesh tool from the Asset Store that separates the terrain into as many .OBJ meshes as needed with differing resolution per mesh if wanted but I lose the ability to mass place forests and paint trees and detail meshes and objects as well as adjust road edges to keep them tight to the roads.

Hope this helps you.

2 Likes

Thanks a lot for all the information! I’ve just tried the tiled build in Worldmachine and it feels like a deadend to just have it churn out highres meshes and use those. I keep forgetting how big those get and how long Unity takes to import them. That’s one workflow that doesn’t work out. Either I need to decimate the meshes with zRemesher or something similar, or generate them at runtime from the heightmap data, or even go back to using Unity terrain and trying again if I can find workarounds for all the problems I’m having with it. I like using Substances, but the default Unity terrain material system doesn’t seem to accept their output and I haven’t looked into possible solutions yet. I was hoping to just get around messing with the terrain renderer, since it’s so slow anyway.
Is there even a real alternative to the terrain renderer component on the assetstore? I did a quick search but I can’t find one.

Try the Terrain To Mesh Shader. It spits out .obj meshes which you an then bring into zRemesher and keep the UV mappings intact form the obj and then reimport and use his shader which has several variants and even mobile. I may end up doing that but then I still need some tool to paint trees and etc.

2 Likes

A 7x7km area is way too big if you are loading it up with trees, plants and rocks. It really depends on how your game is played, if it is first person, then just slice up your 7x7 into 49 1kmx1km terrains and put each of them into a difference scene, and then load/unload each scene as the player gets close. If your track is one directional, it makes it even easier because you can unload a scene as soon as the player exits it. The other thing to remember is there is a performance hit after you have used 4 different terrain textures, again, splitting up your big terrain into smaller terrains makes it easier to stay at 4 or under.

The new multi-scene editing tools makes this process pretty painless and you can drastically increase performance.

1 Like

These problems you’ve listed are likely the exact reason he’s asking for a replacement for Unity’s terrain system. :wink:

2 Likes

That looks like a problem of level building knowledge rather than a technical one. Ie carefully planing visual and object placement according to optimizing performance.

Look at the firewatch GDC video (they use unity) to see what I’m talking about.

Relevant part at 10:06 - 12:40 - 13:36 - 16:03 - etc …

I did it all pal. 7x7, 5x5, 4x4, 3x3, 2x2. Never 1 7x7km. Right now it is left at 2x2 because it changed nothing with framerate and I was wore to a frazzle. It cannot go into different scenes due to rise and fall in terrain. It is a motorcycle sim on a real world road if you actually read the OP. I think your suggestion is the lack of reading and I don’t need your tutorial thanks. This is a thread about alternatives, not beginner tutorials for Unity. I know what I am after and it is apparent that you think loading and unloading scenes is the way to go that you do not know alot. I would simply make an occlusion algorithm as the baked OC sucks with terrain and blinks in and out.

On the video. Taking a quick gander at it she still has the same problem I have. Cannot get enough details in to match the real world North Carolina subtropical rainforest. Final conclusion. Not impressed at all. Still looking for the best replacement package.

Note to further posters. This is a thread about replacement packages with their toolsets and performance characteristics. I do not want to hear anything else about Unity terrain tricks and workarounds. I already know them all.

Precisely. I knew all this crap years ago. I refuse to bang my head against the wall any further with the Unity terrain system. I got better performance in 3.x and 4.x but the trees sucked. I used to get sometimes 400FPS in a fairly detailed terrain of 1.5km but you could see tiling artifacts everywhere. SpeedTree trees look great but alot of them give a performance hit which leads me to ask…why call them SpeedTrees and tout their performance if you cannot use them to make a semi dense forest. I can make a mesh tree that performs better… Profiling the ATS Terrain Shader shows it was not a big hit on performance and it certainly removed tiling artifacts when i set it up with my splat map creation pipeline and did imitate the ground around North Carolina fairly closely and I am in N Ga about 60 miles from the place so I can compare…

It’s not about the terrain but the tree then?

Just stumbled over this:

Both. But if I can get good fps on some other meshing/collider system that keeps the heights intact and be able to use SpeedTrees and some custom mesh trees and bushes that match the local vegetation then I may be good to go. I need 60 FPS+ or I will have to kick the snot out of the brat trolls on Steam who are little bitches:) And…I do not want it to look like Unity terrain out of the box either.

You can use a 5.x shader and play with one of the Substances and then right click the shader component and get a dropdown menu to generate all active channels as bitmaps and use those. I actually did that for some of the terrain splatmap layer textures.

ok pal, good luck solving your problem.

1 Like

You see, I am totally lost on this though. What does the rise and fall in terrain have anything to do with cutting up your terrain and loading them additively, they perfectly line up, the slope of the terrain does not matter at all. Are you using an older version of Unity and are not aware of the new tools?

I don’t have the time nor inclination to explain this to you since you can’t even conform to the original posts request but maybe you can get a clue from 138 curves in 11.1 miles in mountainous terrain with lines of sight sometimes tens of yards and sometimes miles. And don’t argue with me about it. If you have information that was originally asked for post it but do not derail my thread with trollbait. Tools indeed.

Thanks. I am hoping for some reviews of the various toolsets on the Asset Store as I thought was clear in the first post.

Have you tried ditching the speed tree trees and just use some of the non supported old tree creator trees as place holder, just to see the frame rate difference? You’re 15 fps below your target, and a lot of people were complaining about speed tree trees performance. Maybe there is just that stuff to swap out to improve the frame rate to what you need.
Sitting there waiting for people to review some of the tools they’ve been using for work around might take too long depending on your deadline…
For some reason you didn’t mention any streaming of assets. I’m no dev so don’t get mad, have you consider this?

Line of sight?

2 Likes