Jump to content
  • Advertisement
Sign in to follow this  
iron_poopshoot

Heigt Map Texture Question

This topic is 5472 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

I just started learning DirectX a few weeks ago and for my first 'reall' program I am writing a heigt map. I got it loading into a mesh and working with a single texture very easily. I went to add another texture for any polygon bellow a certin 'elevation'. I got the other texture displaying, but there is an obvious edge from the two textures (grass and sand). I was wondering what the best way (performance & looks) to transition between the two textures is?

Share this post


Link to post
Share on other sites
Advertisement
what you are trying to do is a sort of dynamic texture generation based on the shape of the terrain itself, which is a difficult thing if you are trying to get the effect done by a previously generated texture.
I think you should use mutitexturing and control the shape of the terrain by controling the alpha blending values.In this way you can make the transition between grass and sand more smooth.

Share this post


Link to post
Share on other sites
Like I previously stated I have only been doing DirectX for about 2 weeks now so I'm not 100% sure what you are talking about. I had thought about making a transition texture for between the 2 textures and realized that wouldn't be very easy, but maybe it is and I'm just not seeing it. I tried to blend the 2 textures but that looks horible. I was wondering if it would be possible to have the alpha of one texture increase as the elevation moves up and have the other texture drawn underneath so it blends that way, but I cannot figure out how to do that.

Share this post


Link to post
Share on other sites
Well, the best way in my opinion is to use texture splatting, but that's out of reach with your current experience level I think.

If you can program in C++ well, you can probably take the Direct3D programming course part 1 at GameInstitute.com and probably learn how to do it there.

~Graham

Share this post


Link to post
Share on other sites
I'm having sort of the same trouble as you with my terrain generator. The solution I came up with was to use colored and textured vertexes. For the texture, use a tileable gray bumpy texture and then set the vertex color by elevation. I'm in the process of implementing it right now so I'm not sure how well it will work, but it's an idea :)

Share this post


Link to post
Share on other sites
Well, I had the idea this morning and I've been working on implementing it just since the post so the results are kinda rough right now, but I think it has potential. With some better designed terrain (right now it's just random fractal terrain), a better base texture (the current one is just random photoshop noise) and a better color gradient, it could look pretty nice.

Share this post


Link to post
Share on other sites
That looks really good. I'm going to have to try that with my heigt map and see how it looks. Also I will try to play arround with different textures to see what looks good. Thanks for the help!

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!