How to combine terrain and geometry?

I try to combine terrain with geometry to fit my level for a platformer. Which needs sharp corners. But i came across some issues that i cannot really solve. The seams between geometry and terrain are always distrubingly visible. In the one case because of the lightmapping. In the other case because it seems that the terrain seems to use another shader. And because of the smooth shading. This one always bleeds through at some places. But even without those issues, i always have a visible seam from grass to grass. Not to talk about the disortion by the heightmap. But this can be solved by the triplanar terrain shader.

Question is, am i even at the right track? Should i better go with a completely geometry based level with a platformer? But then i loose all terrain features like splatting and trees and grass. On the other hand, i really need this sharp corners and platforms for the game mechanics.

What are your thoughts, how would you solve this issue?

This is one of the reasons why I don’t like to use the terrain engine, there are too many limits. You can’t just import your own mesh and replace it with the unity terrain and put trees on it (it can I believe with third party software). You can’t use normal maps on it (again you can with third party software), making roads on it is so tedious you wish you never thought about it in the first place. I mean, how am I supposed to make roads on it? All those road scripts (and again third party software) lack accuracy/possibilities to do what you want to do. Making a mesh in one program, and importing it in Unity never turns out to be 100 percent accurate for the given circumstances. So I gave up on the terrain features, I just use any common 3d tool to do this cause it’s obvious they didn’t really thought this through at unity studios.

So that`s a clear +1 for pure geometry. Thanks for your feedback :slight_smile:

I agree, but don’t be disappointed. I know the terrain engine works pretty sweet, but it’s useless when you want more precision.

Hm, but how do you deal with trees and grass then?

I’m thinking of writing my own script that does the same as the default terrain engine. When you are on a certain distance trees should be bilboarded, and after a bigger distance they should disappear. I’m not this far yet, but I see no other option to do this. As a temporary solution I place a terrain underneath my mesh and place trees and grass on the terrain, but still that’s very far from ideal. And I’m not even sure it’s meant to be used that way, who puts a terrain under a terrain just for trees/grass hehe.

Heh. Have thougth about that idea too. But to put a terrain underneath a mesh just to use the terrain features is no good solution for me. Too drawcall heavy :slight_smile:

I think i have meanwhile found the solution for my dilemma at the asset store. The tool is called T4m. With that you can convert a Unity terrain to a mesh, or even use a mesh as the base at all, and continue at it like it would be a terrain. You can paint with splatmaps like at the original Unity terrain. And the tool provides some terrain functionality then when it comes to trees and grass. It has of course a few limits. Like just 6 textures to mix per mesh. And it is missing the animations at the grass and the trees from what i can see. But that`s something i can live with for now. Maybe that missing features are coming too in the future.

Biggest plus is that it works with geometry and not with a heightmap. Means i can even work with caves here. And it produces just one drawcall. Compared to that Unity terrain is a little drawcall monster :slight_smile:

doesnt unity give out there source code

because i want to make this terrain combine or bigger either way there seems to be some problem