# Alternative methods for terrain texturing

**URL:** https://discussions.unity.com/t/alternative-methods-for-terrain-texturing/401744
**Category:** Terrain
**Created:** [November 16, 2009, 10:18am UTC](https://discussions.unity.com/t/alternative-methods-for-terrain-texturing/401744 "2009-11-16T10:18:51Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![anon\_67956455](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@anon\_67956455](https://discussions.unity.com/u/anon_67956455)
#### Post date: [November 16, 2009, 10:18am UTC](https://discussions.unity.com/t/alternative-methods-for-terrain-texturing/401744/1 "2009-11-16T10:18:51Z")

</div>

My first post 🙂

I’ve previously used [L3DT](http://www.bundysoft.com/L3DT/) to generate terrain heightmaps and textures, and really love using it. I’ve imported a RAW heightmap from L3DT into Unity without any trouble, but I’m a little confused about applying the generated textures to the terrain.  
I have the base map from L3DT that I want to apply to my terrain in Unity. I can see the Base Map Dist. parameter when editing the terrain settings, but I can’t see anywhere to choose the actual base map. Generating a light map and replacing it with my base map texture worked, but surely that’s not the ‘proper’ way?  
Also, L3DT generates layer masks, which show exactly where each detail texture (grass, dirt, rock etc) should be applied on top of the base map, and I was wondering if there was a way to utilise these masks in unity, rather than repaint all the textures in unity?

cheers,  
Cam

---

<div class="post-metadata">

### Author: ![Dreamora](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/dreamora/32/91058_2.png) [@Dreamora](https://discussions.unity.com/u/Dreamora)
#### Post date: [November 16, 2009, 10:26am UTC](https://discussions.unity.com/t/alternative-methods-for-terrain-texturing/401744/2 "2009-11-16T10:26:15Z")

</div>

you could import them but need scripts to replace the splat maps with these textures to work

---

<div class="post-metadata">

### Author: ![anon\_67956455](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@anon\_67956455](https://discussions.unity.com/u/anon_67956455)
#### Post date: [November 16, 2009, 12:37pm UTC](https://discussions.unity.com/t/alternative-methods-for-terrain-texturing/401744/3 "2009-11-16T12:37:00Z")

</div>

Sorry, but I don’t really understand what you mean. Are the splat maps the textures applied to the terrain? (ie the thing that is seen in the end result)  
Or is the splat map Unity’s internal representation of where to show the different textures on the terrain?

---

<div class="post-metadata">

### Author: ![Eric5h5](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/eric5h5/32/44225_2.png) [@Eric5h5](https://discussions.unity.com/u/Eric5h5)
#### Post date: [November 16, 2009, 12:38pm UTC](https://discussions.unity.com/t/alternative-methods-for-terrain-texturing/401744/4 "2009-11-16T12:38:55Z")

</div>

[Fractscape](http://www.starscenesoftware.com/Fractscape.html) includes a script which applies a splatmap to the terrain. Most of this area (applying pre-made textures and splatmaps to terrains) relies on undocumented scripting APIs.

–Eric

---

<div class="post-metadata">

### Author: ![anon\_67956455](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@anon\_67956455](https://discussions.unity.com/u/anon_67956455)
#### Post date: [November 16, 2009, 12:50pm UTC](https://discussions.unity.com/t/alternative-methods-for-terrain-texturing/401744/5 "2009-11-16T12:50:44Z")

</div>

Thanks Eric.  
When you use the term ‘splatmap’, are you referring to the pretty colourful thing that gets painted onto the heightmap and rendered? Or do you mean the black and white texture that shows where a certain pretty colourful thing should and should not be applied to the heightmap?

Yeah, I was beginning to think that it might be undocumented stuff, seeing as I wasn’t turning up much in the manuals or references. Is there anywhere I can look to read about undocumented things? Do you have any idea about what I could be fiddling with?

cheers,  
Cam

PS- I’m aware that undocumented things are subject to removal or change in future versions etc etc 😛

---

<div class="post-metadata">

### Author: ![Dreamora](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/dreamora/32/91058_2.png) [@Dreamora](https://discussions.unity.com/u/Dreamora)
#### Post date: [November 16, 2009, 1:19pm UTC](https://discussions.unity.com/t/alternative-methods-for-terrain-texturing/401744/6 "2009-11-16T13:19:31Z")

</div>

Neither

The splat map is the “color full thing” that defines where which of your textures will be painted to which degree at a specific pixel position. You can see it if you open the terrain asset in the resource tree where it will list the splat maps

---

<div class="post-metadata">

### Author: ![Eric5h5](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/eric5h5/32/44225_2.png) [@Eric5h5](https://discussions.unity.com/u/Eric5h5)
#### Post date: [November 16, 2009, 1:27pm UTC](https://discussions.unity.com/t/alternative-methods-for-terrain-texturing/401744/7 "2009-11-16T13:27:20Z")

</div>

> [@""](#):
>
> When you use the term ‘splatmap’, are you referring to the pretty colourful thing that gets painted onto the heightmap and rendered? Or do you mean the black and white texture that shows where a certain pretty colourful thing should and should not be applied to the heightmap?

There isn’t a black and white texture actually…a splatmap uses the rgba channels of a control texture, with each channel controlling a different terrain texture. If you have grayscale textures, you’d have to combine them into a proper splatmap before you can use them for anything in Unity. You need one splatmap for every 4 textures. The script I mentioned only works for 1 splatmap though.

There’s a topic somewhere on the forum that deals with more of the undocumented stuff, which should turn up in a search.

–Eric

---

<div class="post-metadata">

### Author: ![anon\_67956455](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@anon\_67956455](https://discussions.unity.com/u/anon_67956455)
#### Post date: [November 16, 2009, 1:34pm UTC](https://discussions.unity.com/t/alternative-methods-for-terrain-texturing/401744/8 "2009-11-16T13:34:11Z")

</div>

Got your email, thanks so much Eric, I’ll go have a play with that now.  
Good luck with starscene 🙂

---

<div class="post-metadata">

### Author: ![anon\_67956455](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@anon\_67956455](https://discussions.unity.com/u/anon_67956455)
#### Post date: [November 16, 2009, 2:04pm UTC](https://discussions.unity.com/t/alternative-methods-for-terrain-texturing/401744/9 "2009-11-16T14:04:04Z")

</div>

Oh I think I understand now.  
So the splat map is an RGBA, where each colour channel is a number that corresponds to the degree to which each of 4 textures is applied to that point.  
What about determining which texture is being used by which channel of the splatmap? Do I just have to ensure I add my textures to the terrain in the correct order?

---

<div class="post-metadata">

### Author: ![Eric5h5](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/eric5h5/32/44225_2.png) [@Eric5h5](https://discussions.unity.com/u/Eric5h5)
#### Post date: [November 16, 2009, 2:16pm UTC](https://discussions.unity.com/t/alternative-methods-for-terrain-texturing/401744/10 "2009-11-16T14:16:01Z")

</div>

> [@""](#):
>
> Oh I think I understand now.  
> So the splat map is an RGBA, where each colour channel is a number that corresponds to the degree to which each of 4 textures is applied to that point.

Yep.

> [@](#):
>
> What about determining which texture is being used by which channel of the splatmap? Do I just have to ensure I add my textures to the terrain in the correct order?

Yep again. 🙂 R = first texture, G = second texture, etc.

–Eric

---

<div class="post-metadata">

### Author: ![anon\_67956455](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@anon\_67956455](https://discussions.unity.com/u/anon_67956455)
#### Post date: [November 16, 2009, 3:47pm UTC](https://discussions.unity.com/t/alternative-methods-for-terrain-texturing/401744/11 "2009-11-16T15:47:32Z")

</div>

OK, that makes sense now.  
Now I just have to turn my 4 greyscale png’s into 1 png…  
Hopefully there’ll be a simple way to do this with [paint.net](http://paint.net). Unless anyone else has a better suggestion?
