I created a couple mountain meshes with world machine and then imported them to Unity 5, but I can't figure how to use terrain shader with it. If I create a new material with said shader no texture slots show, if I had a terrain component no dice either, I cannot trick Unity into thinking my mesh is a terrain. Is there a solution for this?
I could use standard and a detail map but I would be limited to 2 textures and I would like to use at least 3... And I have that nice splat map exported from WM that I would like to use as well
Thanks for pointing me in the right direction.
Replies
So you're suggesting to actually turn that mesh into a little terrain in itself? This can be done easily - I think I can just use a height output node after a mesh output one. Then use that to create a secondary terrain in unity and adjust the size to my liking. It sounds a bit convoluted though, I wonder if I shouldn't be looking for a custom shader with some of the propriety of Unity's built-in terrain shader, including the possibility to use externally made splatmaps...
Eric:
No, I'm not 100% sure about the key words, tbh. Also, I stumbled over this course at Gametutor and it seems to be covering how to make custom splat map shaders. What Farfarer said made me realize it might not be so hard to make yourself, plus it's about time I started looking into node-based material editors. Shader Forge is cheap and reportedly almost as robust as Unreal built-in editor.
So I will be watching this today and posting what I figured afterward. Maybe this thread will be useful to others in the end!
[ame="https://www.youtube.com/watch?v=K9WTKK9f1b8"]https://www.youtube.com/watch?v=K9WTKK9f1b8[/ame]
Steer clear of triplanar, it's fantastic for concepting but bad for production -- typically very expensive.
The most obvious option is to do a 4-splat shader, either with vertex colours or a rgba texture -- green for grass, red for rock etc. --- but this can be fairly expensive depending on exactly how you're doing your shader. If the terrain itself is front and center you're probably wanting PBR and POM and this is likely going to be at least 12 texture reads and very bad.
You could consider 2-splat which is much cheaper, and split your mesh up intelligently, and cover the seam. Don't forget a 'base map' over the top, world machine can generate these.
Ultimately, I'd suggest going with the simplest shader possible and letting foliage/grass/prop meshes do a lot of the work.
Here's some fun terrain shader features we've experimented with lately that you might want to look into if performance aint a worry:
- multi-uv blending in the distance to hide tiling
- directional and oriented blend textures for things like 'dynamic' snow
- you may want to consider blending in a perlin style normal map in the distance or up close or multiple times at different scales or whatever. noises do wonders.