What's the proper way to design a level for Unity?

I have 3ds Max and Unity and I’m unsure how to start designing my levels properly. The level I’m making first is a town.
Should I build the entire town, buildings and all, in 3ds and then import that into Unity? Should I use the Unity terrain maker to make the ground and then just plop down buildings built in 3ds? I do feel like the Unity terrain editor may limit me in the kinds of terrains I could make. What about the numerous little props in a town (benches, pots, fencing, trees, etc)?

What’s the general consensus here?
Thanks.

All right, this is a hard question to answer, because it depends on the game.

In most cases, I advise the following stages:

  1. Whitebox modeling: The map should be mapped out in big blocks and lacking nay detail. This allows you to figure out gameplay issues such as how big the rooms need to be, pathfinding issues, and even the normal time it takes to move from area to area.

  2. Low detail modeling: At this point, you start detailing the environment, but just use placeholders for detail items like tables and chairs. You start testing basic lighting and texture choices for walls.

  3. Detail mapping: Now you start loading assets and visual detail into the model. Much of this should be done in unity for a few reasons. First, prefab items like tables, chairs, or even pillars and arches. Even whole buildings can be prefabs on a map. Using prefabs reduces memory and asset sizes. If you export a map with all the details straight from 3dmax, you will not get the benefits of using prefabs, and each of those cloned arches will be stored separately.

Also, when designing levels, you should keep floors, walls, and ceilings as distinct objects, just so you can see what your hitting in code and make it easier on your programmers. Keep track of uniform sizes and scales. If you have a door that’s 3 feet wide, then try to reuse that width in as many places as you can.

I can go on for hours on this subject, but I have to get back to work. Hope this gives you a starting point!

That was an excellent answer, thanks for the insight.
Let’s say you were designing a level like the following:


As you can see, there’s height variation and stairs and a little cliff wall. Would you make the basic ground in Unity terrian generator(with texture splattering) and then model the stairs and cliff in 3ds/maya/whatever and drop them onto the terrain? The scene in that picture is pretty dense and that would be many dozens of prefabs in Unity. It would also be hard to get the cliff to look good dropping onto a Unity-generated terrain. What do you think?
Thanks again.

The thing is that some things should be individual objects, and other things should just be modeled in the program.
I would say model houses individually since you’ll probably reuse them over.

Starting from your idea, I would:

1- Create a city entirely made of blocks (primitives in Unity).
2- Test and improve my gameplay as much as possible.
3- List all the assets I need (from the ground textures to the small props).
4- Plan the production and technical details (such as texture atlas and batching).
5- Create the assets.
6- Replace the blocks by the assets.
7- Explore my city.

Step 1 should be a paper mock up map so that your not just blocking in random ideas. You want a start, end, and path for the player to take, otherwise your just going to spend a LOT of time greyboxing it.

If you feel that your game would be fine using the Unity terrain, then I would definitely say use it. I know in the past it was not supported on Mobile devices, but I don’t believe this is the case anymore.

There is a limit to the number of unique textures a terrain can have, but you should design your terrain palettes around this anyway.

I have heard that “the real pros” use an external program to model their terrain and import it, but then they probably did that because they were familiar with whatever the tool was to begin with and didn’t want to learn Unity’s (probably less powerful) terrain tool. If you know nothing about external terrain modeling, then there’s no real drawback to using Unity’s terrain until you feel invested enough to use a more fancy external program.

As for your example involving the stairs. It definitely looks like they are part of the terrain to me. This is a difficult thing to achieve in Unity, because making right angles like that takes very precise tools. The way the Unity terrain does this is through a height map. It’s basically a texture that goes from white to black. The closer to black you are, the higher you are. (or white, I’m not sure which direction it goes).

It is entirely possible to make a heightmap that creates stairs like that, but it is difficult with the tools Unity provides and I would look elsewhere to make that kind of terrain, or design my game to use stairs as a “prop” and simply create a slope that my stairs would sit on.

Basically my biggest piece of advice is, don’t get bogged down in perfectionism. It’s ok to use an “inferior” tool if it works for what you want to do.

My advice for designing the “props” of your level (buildings, chairs, walls, etc.) is to make them as modular as possible. If you can walk into houses, keep them empty. Don’t bother decorating a house inside of a modeling tool. It will create a unique mesh for each house, where each house may have the same chairs in it. This is wasted rendering and memory.

Same goes for the props around town. Create sections of walls so you can tile them (if your design lets you get away with it).

I also advise you name your materials (aka, shaders in Maya) something sane. I’ve noticed these modeling programs generally don’t give a damn about naming conventions.

Supported, but still not very fast, going by a random pick of threads on the subject.

Making whole levels in a modelling program is a good solution. Design the edge and the fixed terrain, break out portions you want to use as prefabs, design buildings to scale and tear them out too. Terrain can have relatively few polygons and still look good, especially what little terrain sticks out between buildings in an urban scene.

Fixed buildings are fine as part of a level too, at least if you give them moving parts. You can rotate submeshes, so it’s possible to even include the doors without making them separate parts to attach later. I’m not sure about performance in such a scenario, though, where you can reference portions of a level in the hierarchy. One big object with a bunch of polygons might be better for mobile, and separate door objects as needed. But on desktop that could be a valid way to design.

And like tylo said, don’t worry about the little details. Build a prototype, optimise where needed. Do it the way that feels most comfortable. An artist I’m working with is prototyping with Play-Doh :slight_smile: