texture blending


(garv284) #1

i’m working on a map right now and at the moment i’m working on the terrain. my problem is i would like to know how to blend the different terrain textures so the terrain looks mre realistic. right now you can easily tell whrere different textures meet.


(MadMaximus) #2

you should try easygen to do your terrain, it makes it easy to “paint” your textures onto the terrain so they blend nice into the next.


(Apple) #3

I’ve also been curious as to how you would do this, manualy. I have some areas which I want textures to blend together which aren’t terrain, so Easygen isn’t in the question for me.


(Loffy) #4

I agree with Apple.
Let assume I have a nice map, created with EasyGen. The terrain textures are rocky for the moutains, and grassy for the lowlands. In the terrain, I Ctrl + Alt click on a couple of terrain brushes, and I add a cement/stone texture. I want to make it look as if it is road that goes through the terrain. Now, if I want this texture to blend with the rest of the terrain (the grassy terrain), is it possible?
Otherwise, the edge will be too sharp (the border between the cement/stone texture and the grassy textures) I think.
// Kent L.


(lennyballa) #5

nope, you must do that with easygen :frowning:


(Loffy) #6

Ok. I can live with it.
It is not the first or last time one has to “adapt and overcome”.
:rocker:
// Loffy


(chavo_one) #7

You don’t have to use easygen. Easygen is only a tool to make terrain generation easier. It’s not the end all, be all. If you understand what easygen does for you, then you could do it yourself. Terrain blending is controlled by the alphamap (aka indexmap). If you load the alphamap into an image editor, then you can change where the blending occurs yourself, without easygen.


(lennyballa) #8

uhm ok you try that :stuck_out_tongue: , i dont see shit in those alphamaps :stuck_out_tongue:


(redfella) #9

I thought the blending was produced by an option located somewhere in the text of the metashader. Although, I haven’t check this out personally, so don’t take my word for it.

I may give it a look-see when I get home.

:chef:

oh and btw, nice new avatar chavo!


(G0-Gerbil) #10

I may be wrong but yes, I think the blending information is contained in the shader info of the terrain - hence why you end up with lots of terrain_X_to_Y shaders - they are every permutation of one used terrain texture to another.

If you want an easy-ish way, I should imagine making a version of the texture with an alpha channel fade and using blendfunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA would get your top layer blending nicely enough (erm that was off top of my head, so check shader manual of course).


(chavo_one) #11

Well, yes…the blending work is done inside of the metashader (ie. terrain_0to1), however isn’t it the alphamap/indexmap that dictates where the blending shader gets applied? So if you wanted to change where the blending happens, you would edit the .pcx file.

@redfella: thanks! :wink:


(G0-Gerbil) #12

Ah good point, yup forgot that rather important bit of info :slight_smile:

I’m about to do some blending to smooth out a harsh terrain edge, and to be honest I am planning on doing it by the way I mention - creating a matching edge texture with an alpha channel - damn sight easier for me to play with that way - terrain really gets on my tits.


(garv284) #13

ok i’m new to mapping and from the information you guys have provided i got a bit confused. so maybe sould someone explain it a bit thoroughly or just point me to a tutorial. thanks a lot for your help guys.


(SCDS_reyalP) #14

The terrain manual:
http://www.qeradiant.com/manual/Terrain_Manual/start.html
(also found on your computer) explains how terrain works. Some of the specifics are a bit out of date for ET, but the general desciption of metashaders and alphamaps is still correct.