Straightforward Blending Question


(Flippy) #1

Yep its me again with a blending question…

this time i decided to ask it very simple:

How must this be done:

Right, i made this picture in photoshop, it’s supposed to be a small terrain template with blended textures, and ill explain a few notices at each letter and each number:

A: Normal (unblended) grass texture
B: Grass to Rock blended texture
C: Normal (unblended) rock texture
D: Rock to black texture (it’s supposed to be a pit that seemingly goes on forever, the black texture should not be lightmapped etc, it should be pitch dark in there…)

1: Is it possible to blend here between the “blended grass” and the unblended grass so you don’t get a “line” there where the textures don’t align?
2: Same as 1.
3: Same as 1.

So how do i do this? If anyone could explain it in detail i would be very glad :slight_smile: A sample map would be nice too :smiley:
If it takes too long to explain or if you dont care to explain, np… :stuck_out_tongue:


(Shaderman) #2

You could use an alpha faded terrain. Sock explained that very well in his Terrain Blending Article.

It should work with two shaders. One for blending grass/rock and another for rock/black.

The primary textures used should be grass in the first and black in the second shader, the secondary texture for both shaders should be your rock texture with an alpha channel. If you use the grass/rock shader on A, B and C and the rock/black shader on D, you can blend between the primary and secondary textures with socks alpha fade bruhes and should get what you want.

It’s a short explanation but I hope it helps.


(Flippy) #3

thnx i think that will help :smiley:

So i have to use 2 shaders for the blending + also the normal shaders for normal grass and rock… right?

but will it also “blend” between grass (normal) and grass (blended with rock) ?


(RayBan) #4

here are the alphascale shader and textures, unzip to your etmain, then add
the shadername to the shaderlist.txt

these are the ones i use, but they are the common ones that most ppl use. i’ll try to post
a follow up shader for textures and explain how to use them for blending, although that
tutorial of socks pretty much covers it all.

http://rapidshare.de/files/29517450/alphascale.zip.html


(Shaderman) #5

Theoretically yes, but you’ll see a difference between both shaders. You should get a very good result if you only use these two shaders for the whole terrain (or maybe more blending shaders of the same kind if you want to).