Why a cube ground instead of terrain?

Self explanatory, but curious as to why that choice?

I think a terrain does not fit the scope of the first lectures. I think this will be handled in upcoming design lectures.

Certainly could be, but for an intermediate course. “Drop in a terrain” is easier than drop in a cube, scale and reposition. I hope for a more technical reason I guess.

We can also talk about performance, though scope of the lecture is the more likely case. Unity terrains are heightmaps, while a cube is a primitive type in Unity that can be optimized for. Not only will a heightmap take up more space in memory, but it will also take longer to render. Terrains contain all sorts of stats for draw distances and detail, not to mention that even the nature of being a heightmap makes them more complicated to draw (more shadows to compute, more occlusion to worry about, etc.) Even if the terrain is flat, Unity still needs to check the heights of each portion, whereas with a primitive like a cube it can assume that a face is flat.

So, in a game where a the ground is basically flat or angled, it makes sense to just use a primitive for computational reasons. Now, why we don’t use a plane, I’m not sure.

1 Like

Ok, I could see performance, but I am not sure 4 cubes or a terrain will tax the engine, if it does we should switch engines. So I am back to a more compelling reason, and in all truth it might just be that is what decided to do. A plane makes a lto of sense too. I was thinking that as well.

My guess is the scope of the lecture. We’re setting up a simple scene so we can work on player movement and cameras. Adding a terrain would have taken more explanation and time than just putting in some cubes.

It’s definitely not performance. There is a lesson or two about terrain in the Zombie runner game on the unity course.

I guess I am just referring to the ground, and not the other obstacles which would require to Terrain deformation. That I could understand, but the ground is as simple as adding a terrain

@Stephen_Crookes – Just curious if there’s some optimization or trick that I’m missing, but why is it definitely not performance? Or do you just mean, since it’s a very simple scene, that performance wouldn’t be a concern?

I would say simplicity of the scene, my arguement earlier. Truth is, I would expect bad models and code before the terrain

I’m fairly new to this, I’ve done most of the the unity course. So just from the Zombie runner game in the unity course. The terrain I created would have been well above what would be needed for this lesson and I experienced no issues with performance.

Maybe “definitely” was a bit strong but I still suspect that terrains were out of scope and will probably be coming later.

If you add terrains then there are more questions about terrains which aren’t relevant to what the lesson is trying to teach,

That’s my take on it anyway :slight_smile:

@Stephen_Crookes

That makes sense to me :slight_smile: I just figured that it’s best to save performance where you can, even if it’s not necessary, to form the habit. But it certainly is a more complicated thing to worry about that just using a cube or plane, and probably not super necessary!

We are just prototyping a game at the moment and there is no reason to use more complex items than is necessary.
I have made a couple of prototypes with a friend and the first thing we put in the scene is a cube for ground and a cube for the player that’s all that is needed to start working on movement etc.

If we are going to go in to some gamemaking theory, if you cant make the game fun with simple objects it probably wont be fun with more complex objects.

1 Like

what complexity does a terrain introduce?

Hi Bryant, Rick will be starting with terrain before long. Just want to focus on the real basics for now. Terrains aren’t complex, but it’s easy once it’s there to find yourself getting distracted sculpting it when the focus is simple movement.

Re the plane, the challenge is if the character falls onto it fast enough for their collider to pass through in one frame, they are more likely to fall through. Also they can be hard to see in the editor from certain angles

Awesome. Those answers make sense and I could certainly see people fiddling with the terrain and losing focus.

2 Likes