Jump to content
  • Advertisement
Sign in to follow this  
hoogie

Blend Map?

This topic is 4830 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
@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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!