Advices on tree and terrain method and optimization needed.

Hi!

As the title says. I would like to make good looking, but "fast’ trees, I want them to use for dense forests. What kind of technics do you recommend?

I can’t decide, Basic Unity trees are not that bad, I tried to make tree with sprite based leaves, but it wasn’t that fast also, I wasn’t able to put them to Unity’s built in terrain system because “the prefab contains no valid mesh renderer”, I’ll try to make them work. Tested with the Nature / Tree Soft occlusion shaders. Just putting down the trees onto a terrain highly increased the number of drawcalls. (1000+, in case of larger amount of “normal” tree, it is around 250, triangle count of my sprite leaves test tree is 329, 28 rotating planes)

So, I need advices, which one to use, how to optimize trees for big scenes with dense forests.

Also, can I make good performance trees with not using Tree Soft Occlusion shaders? For example, I would like to lit them by a spot light.

Also, Do I need to use the built in terrain? Any solution for a good looking mesh terrain. My biggest problem with mesh terrain is, I can’t paint textures on it. Any shaders for painting textures on an UV mapped terrain?

Yep, so many problems, and questions in one thread, sorry for that!

Hi TensaZangetsu,

Check out these two tutorials … for starters:

http://www.unifycommunity.com/wiki/index.php?title=Terrain_tutorial

http://www.unifycommunity.com/wiki/index.php?title=TreeCreator_Tutorial

Thanks, but I was thinking in an alternative way, using mesh terrain for example. I think I won’t use that because I don’t know any good way for that, so I will use the default Unity terrain. I can make nice result with that too, I think.

But I’m still interested in mesh terrain system. The basic Unity tree system should be good, but it doesn’t work, if I just put down the trees by hand.

Also, I would like to create unique trees. Tree Creator is cool, I know, but I need custom textures. I have some alpha mapped leaf textures (only one leaf), I don’t know a way to make nice branch texture from those leaves. I mean, It is possible to create in photoshop, but Isn’t there a faster, automated way. I don’t care about if all the leaves has the same shape on the textures, I can tweak it in Photoshop.

Hi TensaZangetsu,

You can convert an OBJ file to a Unity terrain with the script named “Object2Terrain” found on the Unity Community WIki here: http://www.unifycommunity.com/wiki/index.php?title=Scripts/Editor

As far as leaves go, there are lots of sources for leaf textures. Here’s one, AsileFx (which charges for textures) http://www.asilefx.net/catalog/product_info.php?manufacturers_id=10&products_id=122

Here’s another http://www.cgtextures.com/ that’s free.

Good luck with your project.

Zaffer