0
\$\begingroup\$

Am creating a low poly game in Unity 3D for PC. The terrain is made in Blender, so it's a fixed size, but quite large for the player to explore. I want to add things such as grass and flowers, but am not sure the best practices are for creating those types of assets.

Is using a mesh for small clumps of grass the wrong way to do this if there will be 1000's of them?

I will likely be using the occlusion culling system Unity provides, but I'm not sure if I still need to look at doing things such as grass in a different way for performance sake.

\$\endgroup\$
2
  • \$\begingroup\$ Have you tried it yet? \$\endgroup\$
    – Sturlen
    Commented Sep 10, 2016 at 20:25
  • \$\begingroup\$ @ZEKE Yes, I added 1000's to the terrain. It sat at around 1.3 million verts, and ran fine. But the terrain is quite large, so that 1.3 million only done a very small amount. Am not sure what I should be doing, so right now I'm attempting to bake grass to a plane in Blender so I can make simple meshes for the grass instead of having a detailed mesh. I may try some sort of LOD for it as well so that it looks nicer the closer it is to the player. Having to teach myself Blender at the same time, it's been quite fun, but challenging though, as I'm not an artist. \$\endgroup\$ Commented Sep 12, 2016 at 10:05

2 Answers 2

1
\$\begingroup\$

Don't create the terrain in Blender. Use the Unity Terrain engine instead.

It has a lot of advantages over using an imported 3d model:

  • Collision handling is far faster. A 3d model will force you to use a very complex mesh collider. But the terrain system can use some optimizations which speed up collision handling a lot.
  • Unity can not render a different LOD (level of detail) for different parts of the same model. That means every single vertex of your whole Blender terrain mesh will always be rendered, even when it is so far away that it's not even a pixel in size. But Unity's terrain system has automatic LOD. Those regions which are further away will automatically be rendered in lower detail. That drastically improves render performance with larger terrains.
  • When you try to add your own grass, then each patch of grass would have to be an own GameObject. You might have millions of grass patches around your terrain which results in millions of GameObjects to manage. That will be too much to handle for even the strongest computer. But Unity's terrain editor also allows you to easily place grass and trees. These have automatic LOD, So only the grass near the player will be rendered. The Unity grass patches aren't individual game objects, so it has virtually no overhead.
\$\endgroup\$
2
  • \$\begingroup\$ I did give the Unity Terrain Engine a go, but struggled with it. Am attempting to make islands (some will be very big to explore) in the sky that the player can navigate between. Some islands will be lower / higher, so you will be able to see the underneath / sides. My biggest problem though, was making it low poly, that's the art style I'm trying to go for, but the Terrain Engine wants to smooth everything I do. \$\endgroup\$ Commented Sep 12, 2016 at 15:44
  • \$\begingroup\$ @JacketPotatoeFan The look can be controlled by using a different terrain shader and the heightmap resolution can be controlled through the terrain properties. But those floating islands might indeed be a dealbreaker. I don't think the Unity terrain engine can do that. I will still leave this answer for others who find this question and have more conventional requirements. \$\endgroup\$
    – Philipp
    Commented Sep 12, 2016 at 16:09
0
\$\begingroup\$

If you're making a large enviroment, you're probably going to need LOD along with max viewdistance. I would also recommend making use of planes, but from the comments I see you've already begun.

\$\endgroup\$

You must log in to answer this question.

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