Professional Services
Order outsourcing

Using Terrain Shaders in Open World Games

Here’s a very good overview of how to use Jason Booth’s MicroSplat terrain shading system in Unity-based projects.

Sine Wave has added support for Jason Booth’s fantastic MicroSplat terrain shading system. They kindly allowed us to post their quick tutorial to help you get started with MicroSplat in SineSpace.

Let’s Get Started With MicroSplat

Diving right in, I am using a test region that I created in Unity 2018.4. I have created a default terrain, and use the standard tools to add hills and a few bumps. Then I added a grass and sand terrain texture. I had already created a coconut palm using Speedtree 8 (click here for more info) and placed a few using the standard Unity Terrain component.

Take a look at the image above. You’ll notice the standard Unity terrain blending in the circled areas in the scene and game camera views. It’s okay, but not great.

Just Add MicroSplat

The first step couldn’t be easier. Simply select the terrain in your Scene Hierarchy like I did in the image above. After that, go to the Inspector panel and scroll to the bottom.

Click on the Add Component button (see the red arrow above) and then start typing MicroSplat into the search box (see the circled area in the image). You will see a MicroSplat Terrain component – click to add it.

After you add the component, click on that big Convert to MicroSplat button (see image above).

The process will take a few moments, you will see a progress bar like the one pictured above.

It’s that simple, you just added MicroSplat to your terrain. If you do nothing else at all, you will notice that your terrain blending has improved (see those circled areas above). However, if you’re willing to dive a little deeper you will get really great results!

Dive A Little Deeper

There are a couple really simple things you can do to make a big difference. The first is to add any other texture map data you may have. If you’re using PBR materials (and you should – they look great), you may have more than the basic albedo and normal map supported in Unity terrain. MicroSplat lets you add the maps you have, and will generate the other channels automatically based on the maps you do have.

To locate your texture maps, click on the Diffuse map icon. In the image above, I clicked on the grass texture as shown in the red square in the upper right, and it highlighted the material in yellow (see the red arrow in the lower left).

Just Fill In The Blanks

Whether you’re using materials you made or something from a library, they are probably stored in the same folder and share similar names (like mine do). Just drag and drop the maps into the empty slots.

A smoothness map may also be labeled as glossiness. You can also use a roughness (the opposite of smoothness) map, but if you do then check the Invert box (I circled the box you need to check if you use a roughness map). If you have one, your AO map may also be called ambient occlusion or simply occlusion. If you don’t (like I don’t in my region), don’t worry – MicroSplat will generate what it needs and still get pretty great results.

Once you finish adding maps, click the Update button (I’ve outlined it in red on the right in the image above). Once it finishes processing, you’ll notice that your terrain blending improves quite a bit (see the arrows). It now uses the height information along with the shape of the terrain to blend the edges more naturally.

MicroSplat Can Do So Much More

Aside from great performance and being fairly easy to use, MicroSplat takes a modular approach. The basic MicroSplat core module is free, and you can add inexpensive modules for just the features that you want for your project. It is important to note that SineSpace doesn’t support all the features and modules – check out this post for a breakdown.

Select your Template Material in the MicroSplat Terrain Component

To get further into what you can do with MicroSplat, select your Template Material. To do that, select your Terrain in the Scene Hierarchy and scroll to the bottom. In the MicroSplat Terrain component, select your Template Material and it will locate and highlight them in your Project Panel. Click on the material there, and your Inspector will change to look something like the image below.

As I point out in the image above, your options will vary. You will see icons for the modules you have not purchased, and as you add modules you will see more features and options below.

Use Only What You Need

MicroSplat is generally much faster than Unity’s terrain, but it is worth noting that the more features you use, the higher the performance cost. To get the best performance in your SineSpace region, use only the features that you need. I also want to point out that you should adjust your Max Texture Count to reflect what you’re using. Lower numbers do speed up performance a little. In my example I am only using grass and sand, so reduced the Max Texture Count to Four. Adjust yours as needed for your region.

Great Results In No Time

After clicking on a few options that I had with the modules I owned, I was getting pretty good results in just a few minutes. See the manual (you can find it in Assets/MicroSplat/Core/Documentation in your Project panel) to help you get started with MicroSplat. You can get additional support from the MicroSplat community and asset developer Jason Booth on either the Unity Forums or on his Discord Server. You can also often pick up some useful tips and interesting info from his Youtube channel.

Before using MicroSplat

After using MicroSplat for just a few minutes

Once I finished tinkering, I added a little bit of Post Processing. My Post Processing Tutorial will show you how to get great results in your SineSpace region.

After using MicroSplat for a few minutes, then adding Post Processing

A Word About The 2019.2b2 Client

While the 2019.2b2 client is on the staging site for creators to use testing content, it is pretty terrible and I do not recommend using it. It takes a few steps forward, but also takes several steps back. Are you a content creator who has the time and need to test specific issues? Are keen to file bug reports on the tracker? If so, then you may care to grab it and start testing. Most users should avoid it, the development team has been working hard on an update that should be out soon.

That’s It!

You should now be able to get started with MicroSplat in your SineSpace regions, and have much better terrain in your scenes.

If you’re brand new to SineSpace and need help with the basics, check out this tutorial article. You can also check out these tutorial videos. It will help you get set up to use the Unity Editor to prepare and upload your creations to the SineSpace servers. Check the SineSpace Youtube channel for tutorials, and you can also watch this space for more tutorials in the future!

If you have questions or comments, then please post in the comments below! If you want personal help or private training, please see this post. Good luck with your projects!

You can find the original article featuring Jason Booth’s fantastic MicroSplat terrain shading system in SineSpace here.

Join discussion

Comments 0

    You might also like

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more