Skip to main content
gamedev.net
🔒 Locked

Blend Map?

Started by hoogie Aug 18, 2005 at 3:37 PM 3 replies 1k views
Original Post
hoogie
hoogie
Hi all, I have been working on a real time terrain rendering program usinf DirectX for a while now I am currently looking at texturing the terrain. Currently my terrain is shaded and as such looks fairly limited, how do I go about texturing the terrain so that different textures are used on different areas? I have heard that the correct way to do this is to use a blend map, one of the things I am unsure of is how to create a blend map that matches my heightmap? Thanks for any advise
ViLiO
ViLiO
Hi,

Texture splatting is the way to go

Moon-labs have source code to download and a pdf for your reading pleasure.

Also there is a gamedev article on this same technique of splatting :D

and of course the forefather of splatting here

[edit]
Oh and for the blendmap itself, you can create that in a number of ways.
You could fire open your favourite paint program and go from there ...or you could generate it yourself by using your heightmap's tile/vertex normals and heights ...then reference a colour lookup table. I can't think of any links to that offhand, but it is quite easy to implement yourself :D

Regards,
ViLiO
Richard 'ViLiO' Thomasv.net | Twitter | YouTube
JTippetts
JTippetts
I did a quick little writeup of how I do my terrain blending in my journal here. (go to the entry dated 6/6/2005 on the second page, currently) I use a custom vertex program for speed, and just maintain vertex-assigned alpha maps for each terrain layer, then draw the terrain in multiple passes.

Example screenshot
Basiror
Basiror
@VertexNormal:

Just one question how do you integrate the path into your terrain?

I am planing to do it this way

Since my engine will be a FPS one and I have a editor in the working

so I wrote a noise library to calculate my terrain,
In order to get some decent results that fit into my map I create a terrain shape maybe 128 units between each control point(the player is 72 units large)

now I apply a heightmap drawn in photoshop or some other graphics program to create a basic height evaluations which are pretty detailless

a tool which sets controlpoints of the roads/path will transform the terrain control points to fit the road height once this is done I generate the terrain with the midpoint displacement algorithm(devide a edge in the center and apply some random height transformation)

the textures are applied depending on the normal.dot(up) the height and so one ...


now in order to do create the rest of the scenery I can select terrain patches and check them out of the large terrain to do micro modifications to the shape
e.g.: adding trenches, bunker entries .....

in the end dependent on the shader I generate small 16*16 noisemaps apply a exponential filter to which i use to generate a realistic looking distribution of grass and bushes
the grass is stored in a VBO and at runtime transformed to fit the terrain via a local heightmap accessed inside the shader/ maybe I just store the controlpoints of the terrain in registers and do the grass positioning accordingly
http://www.8ung.at/basiror/theironcross.html
hoogie
hoogie
Hi,

Thanks for all the replies.

Ive been looking at the Moon-labs code and although it seams very good he seams to be using fx files to achieve the texture splatting.

I have never used fx files before and as such was hoping to avoid them, is there anyway to achieve texture splatting without using fx files?

Thanks

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.