Handmade Terrain vs. Terrain Engine in Unity?
I'm planning a game right now, to be made in Unity, and I'm trying to decide how I'll approach the basic level construction. Essentially, my game takes place on an island in an infinite ocean, very similar to Wuhu Island: My question concerns all the stuff heightmaps can't handle. To use Wuhu Island as an example, note the lighthouse cliff, and the nearby similarly jutting-out cliff. The volcano itself is also empty, and there are some tunnels through it on the other side. I was thinking I would just model the entire island myself in Cinema 4D, but as I read more about the terrain system, it seems Unity has special optimized rendering systems in place for terrain objects. Would I be shooting myself in the foot performance-wise if I just built my island entirely by hand? This will be for mobile, so the little stuff might well count. Am I even approaching this question correctly - if not, how would you best go about creating (something very close to) Wuhu Island as a level in Unity? Is there any reason for me to not do it as one mesh? I have effectively zero experience with 3D game dev - only rendered 3D video/stills for other applications, so this is a learning process.
Polybrush – Polybrush is a free tool, that allows unique terrain sculpting. It may have a feature to blend between terrains. Or you can use this as a main terrain solution.
There are many ways to optimize the terrain. One of them is splitting the terrain in chunks, loading and unloading them on fly if you don’t want loading screens. Divide And Conquer.
In this case I would suggest a combination of unity terrain and custom modeled terrain parts. Most of the time where height map can handle the layout use Unity terrain and for parts where you require more complex layout – use custom terrain parts. This causes a lot of work, like how to make both terrains fit. And additional advanced scripting would be required.
Easiest solution if you
know how to program would be to create a custom terrain, split it in chunks, load and unload them. Implement those unity terrain mentioned optimizations yourself.
Easiest solution if you
don't know how to program would be to buy some plugin that does what you need. Or use built in terrain removing the complex parts of terrain in game design. If it’s not possible then having multiple scenes with different parts of terrain parts could solve this, but you would have to load and unload scenes, which is more or less an easy task that anyone can handle when they put enough effort.
While Unity internal terrain is lacking some features the only way is to create your own terrain solution with features you need if Unity terrain doesn’t allow to access and change its internal behaviour. [Unity now has a dedicated Terrain development team that can add necessary features in the future, but if the main solution for terrain will be heightmap then it would prove difficult to have caves or holes in the terrain (I would appreciate any comments that address issues like caves, holes in Unity terrain, and if it’s possible to do now)]
Creating your whole game world as one huge model is likely not a good idea.
First, it might be too slow. The engine can’t use LOD groups to simplify far away objects and can’t use occlusion culling to not render those parts which aren’t visible at the time.
Second, your world is just one asset. So you can’t have more than one 3d artist work on it at the same time.
The Unity terrain out-of-the-box is heightmap-based, which means it can’t handle overhangs or caves. Possible workarounds could be:
- Minimize the damage by modeling only the terrain itself as one big 3d model, but use separate models for all the objects on the map.
- Create those sections of the map which require overhangs as separate models and then add those as separate game objects to the scene which clip out of the terrain. But if you do that you might run into some issues with the seams between objects and terrain. They might cause visible rendering artifacts or unintended physics gliches.
- Use one of the 3rd party assets from the store which promises to add terrain with overhang capability. A quick search finds a couple of paid assets like Digger, Ultimate Terrains or Voxeland which look rather promising. There is also a free asset endorsed by Unity Technologies called Polybrush which at the time of writing is still in beta status. Unfortunately I haven’t worked with any of those myself, so I can’t tell how well they work.
I am looking forward to exploring your island.
- Database Administration Tutorials
- Programming Tutorials & IT News
- Linux & DevOps World
- Entertainment & General News
- Games & eSport