4
\$\begingroup\$

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:

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.

\$\endgroup\$
4
  • \$\begingroup\$ Did you already do a back-of-the-envelope calculation of how many polygon you will end up with? \$\endgroup\$
    – Philipp
    Commented Sep 20, 2016 at 21:42
  • \$\begingroup\$ I have not, no - I'm not quite that far along in the design yet. I've still got a few different ideas for the island layout I'm deciding among. My main thrust here is about the performance differences between using the terrain engine vs. just a normal mesh (if any) - and if there are other methods of building such things I'm not skilled enough to be considering. \$\endgroup\$ Commented Sep 20, 2016 at 22:30
  • \$\begingroup\$ Essentially, assuming terrain of identical polygon count, how big of a difference am I going to see between doing it via the Terrain engine and doing it with a standard mesh? - if any? \$\endgroup\$ Commented Sep 20, 2016 at 22:42
  • 1
    \$\begingroup\$ The best way to answer a performance question is to try it on your target hardware. Pure theoretical answers often miss details of your setup that may be relevant. So, make a simple mesh, and a simple terrain of similar resolution, and profile both cases. I don't expect it will be a huge difference. The bigger gap may come in the ease of doing things like painting repeating textures on your mesh, or scattering grass/vegetation objects - things the terrain system does out of the box for you, but which would require a little more custom work with your own mesh. \$\endgroup\$
    – DMGregory
    Commented Oct 2, 2016 at 15:27

2 Answers 2

2
\$\begingroup\$

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)]

\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .