Unity Community |

I use World Machine 2 to create all the terrains for my game; another happy user here! To get them into Unity I used Tom's Terrain Tools at first, which is good for when you just want to import a single terrain. I've been working on my own tiled terrain importer and streamer for a while now, so that I can chunk a terrain in hundreds or thousands of tiles.
Here's a video showing my latest terrain in action. It uses the excellent Nature Pack for textures and props, and Cloud System for the- well, that's obvious.
And here's some old shots from the tiled terrain system:
It takes some practice, but with tools like World Machine and GeoControl you can really make some visually appealing stuff.
Last edited by Tinus; 10-10-2011 at 10:04 AM.
Tinus very nice stuff in there. Can you explain how do you use diffuse texture from WM2 on custom terrain in Unity? Also do you think it would be possible to use normal map?
That is amazing! Thank you for sharing.
Thanks Janpec!
Actually, I don't use any diffuse maps from World Machine, this is all splatmaps. I don't think you can import single, large diffuse maps into a Unity terrain. When I was doing my research I thought I might be able to store a generated diffuse map as a terrain's base texture, but it appears you can't access this through code. Unity generates one for you using your splats, and that's all you're going to get.
As for normal maps: With hacked terrain shaders such as the one SixTimesNothing provides for free (thanks sixtimesnothing!) you can have normal-mapped splat textures. But again, you cannot use a normal map that spans the entire terrain.
The way I've learned to avoid the tiling look you quickly get when you use splatmaps is to have plenty of noise in them. As an example: For large patches of grass I try to have two grass textures setup, each with different scaling so they loop at different intervals, and have a splatmap alternate their placement with some perlin noise. If you want to be mathematically perfect, use prime numbers for scaling to ensure the two splat textures never ever match up.
Here's a sample from one of the splatmaps featured in the video:
I first filtered the heightmap by slope angle and overall height to get the general areas where grass would appear. Then I took this area, and split it into two maps using perlin noise as a filter, making sure the two added up perfectly. I use perlin noise instead of white noise because it gives you much more interesting patterns to look at compared to the uniform distribution white noise yields. This makes it so the huge patches are broken up fairly nicely, with some added visual complexity to boot! You can see these two grass channels represented as blue and green in the above picture.
It results in ground patterns like these:
There's still loads to improve. For example, that level currently lacks a lot of contrast! Pretty much every section of the island has about the same distribution of assets. In the future I'll introduce different kinds of rock and foliage in different areas, making sure they all have a slightly different color palette.
So a good rule of thumb I found is: Avoid large areas covered by a single splat texture like the plague. *Always* try to break them up, if not by using fancy natural effects, then by using noise or something else.
Furthermore, use your splatmaps to generate all kinds of interesting meta patterns that are not present in any of the individual splat textures. Erosion, perlin noise and other nature-like effects are your friend in this area just as much as they are for the shape of your heightmap.
Hope that helps!
Last edited by Tinus; 10-10-2011 at 01:37 PM.
Very nice results, probably the nicest painting result in Unity terrain so far Tinus. I totaly agree that you have to avoid using large areas painted with only 1 texture. Your terrain from last picture looks really nice and all assets also blend with texture really well. I will still go with custom mesh probably rather than use Unity terrain, dont know i will see. I am just really rather impressed with diffuse and normal texture that you can put on custom mesh for terrain that overall splat maps. The bad thing is only that i havent thought how to paint grass on that mesh o.O
After watching this tutorial about terrain creation in Worldmachine and Mudbox (guess janpec might have seen it aswell considering his workflow) I was also wondering about storing a large diffuse map as the terrain base map and did not find a way to do it.
You can however setup a terrain texture with a tilesize that is a bit less than your diffuse texture (setting it to the same size did not scale it properly). This might or might not be useful, depending on your project. You can also use splatmaps on top of it, so you'll have nicely textured mountains in the distance and higher resolution splatmaps near you on the ground.
Here's a quick test scene
![]()
Hey thats good news sjordN. How big can be resolution of that underlaying texture map? Is it possible to use 2048?
That's a 2048 map, however, the tiling had to be set to something around 2000 otherwise it would not show the whole map, don't know why though.
A 2048 map usually doesn't look to good in first person (depends on the size of the terrain ofcourse).
Haven't done that much testing, so don't know about performance and other problems.
Oh thanks for that sjoerdN, that is what i was looking for. It doesnt matter to me if it doesnt look that good with first person since it will be used for strategy game. Oh this means that i will also be able to put normal map on with custom ter shader? Awesome!
http://www.polycount.com/forum/showthread.php?t=88933
This is probably worth a look. Aimed at CE3 and UDK, but it's applicable to anything that uses a terrain system. About 4 hours of video tutorial.
Yep thats where i learned pipeline from. Probably the best terrain tutorial on net, whorth every second to watch.
That tutorial looks amazing! I have only watched the first few minutes of it (at work). Is he using Maya and World Machine to do his terrains?
Are there any problems bringing a Maya terrain into Unity?
Yes he is using Maya, Mudbox and World Machine 2.
Yes there are problems since this tutorial is written for CE3, but it does work with a bit tweaking in Unity too.
This is so awesome. SjoerdN thanks again for the tip of texture use, i never thought that you can stretch texture perfectly with this basic terrain layer system. Solved all feature problems with this![]()
Here is just basic example what i have achieved. Basically it has everything that is followed on above tutorial for Cry engine 3. (Custom imported heightmap, custom base diffuse texture, normal mapped terrain-whole, specular map-whole terrain, and 4 different splat textures to improve detail on terrain). Splat textures have to be used very carefully though with low opacity otherwise you ruin base texture.
You can see that closly from ground there are splats visible, while mountain is all hand painted and there are some visible splats too.
![]()
Vertex Painter 1.1.3 with desktop and mobile blend shaders: --> Click Here <--
Available on the Unity Asset Store
-------------------------------------------------------------------------------------------
Road Network Generator v.1.1 : --> Click Here <--
Available on the Unity Asset Store
-------------------------------------------------------------------------------------------
Histogram v.1.0.1 :
Available on the Unity Asset Store
They look great and all... but how do they play? They seem better served for backdrops than fun, playable environments. I don't think I ever played a game that used realistic heightmap terrains as much more than a backdrop.
I use World Machine 2 to create all the terrains for my game; another happy user here! To get them into Unity I used Tom's Terrain Tools at first, which is good for when you just want to import a single terrain. I've been working on my own tiled terrain importer and streamer for a while now, so that I can chunk a terrain in hundreds or thousands of tiles.
Here's a video showing my latest terrain in action. It uses the excellent Nature Pack for textures and props, and Cloud System for the- well, that's obvious.
And here's some old shots from the tiled terrain system:
It takes some practice, but with tools like World Machine and GeoControl you can really make some visually appealing stuff.
That looks great Tinus, any plans to release your "tiled terrain importer and streamer"in the asset store?
Yep! I'm just making sure it's actually usable for real-world problems though. That, and squashing bugs left and right.
And oh my, that CryEngine tutorial is great. I'll have to send that to so many people!
The terrain generator in milkshape is cool