Jump to content
  • Advertisement
Sign in to follow this  
AshDawson

Terrain Mapping in DirectX

This topic is 4847 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, I'm in the middle of building a new 3D engine for use in 3rd person applications, much like that of Final Fantasy X (See Attached Images). The problem I'm having now is selecting an efficient method to map blended textures to the terrain without producing tiled or aligned patterns - giving a more realistic effect. Any ideas? Also, would it be possible to have these blended textures follow curved paths on the terrain? Sample Images: http://www.ashleydawson.co.uk/samples/sample_ffx_01.jpg http://www.ashleydawson.co.uk/samples/sample_ffx_02.jpg http://www.ashleydawson.co.uk/samples/sample_ffx_03.jpg

Share this post


Link to post
Share on other sites
Advertisement
hi there,

Moon-labs has some resources available which covers that technique.
follow this link.
and check out basic terrain rendering part II.

it's focused on heightmapped terrain but it should give you an idea for a non-tile-based approach.

hope this helps!
good luck!
regards,
- christoph -

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Excellent. I will check out that site. Thanks very much Chris!

Share this post


Link to post
Share on other sites
You could look at something like this too : http://www.gamedev.net/columns/hardcore/splatting/

Share this post


Link to post
Share on other sites
I was struggling with the exact same thing. And a few people told me to do more dynamic blending, but I didn’t pay much attention. Once I finally decided to add more blending it made a huge difference.

What I did was to create a blend map (similar to a light map) and I used a pixel shader to apply it. In the blend map I used a simple algorithm using height to blend such that:


Height <10 = texture 1
Height<20 = blend texture 1 + texture 2 with more texture 2 as you get closer to 20
Height<50 = mostly texture 2, but randomly add some of texture 1 and some of texture 3
Height < 200 =mostly texture 3 but randomly add some of texture 2 and some of texture 4

I used something similar to this: (mod(rand(),8)==0) to randomly choose when to blend a different texture


The use of mod(rand….) did the trick. I had to play with the algorithm a bit to get the look I wanted, but it worked great. Realize, I only do this once when the engine starts, I don’t do it every frame, so for the duration of the program running the blending is constant.

See some screen shots here: http://screenshots.3dmuve.com


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!