Creating Terrain

Started by
19 comments, last by wiselogi 11 years, 10 months ago
Is it possible to do that in 3Ds Max and use the mesh as .x file in DirectX 9?
Advertisement
Try looking up samples of texture splatting for height map terrain.
It would give your areas more detail.
Splatting(blending 2 textures together over some of the terrain like grass to rock) will help some but ultimately you'll need to determine what is going to be on the terrain. A building of some sort? trees? These elements help hide the repetition from the eye. Also, try using a texture (material) that has noise in it instead of sever color changes. It’s these sever color changes that lead to the repetition. Smaller pixel color changes and variation on a texture can give you a great looking terrain with low overhead. Experiment with noise.

Depending on the distance the camera will be from the outer mountains you can give the illusion of depth by adjusting their scaling of the texture. This could help with the repetition too.

Cheers!
I tried to add noise to the texture using Photoshop, I still see repetition, the repetition is well noticed on the mountains, however it's not noticed on the ground.
Hmm, it's a shame that (to my knowledge) hardware rendering requires power of two texture sizes. If arbitrary texture sizes were allowed, you could for example blend a texture of width 97 with one of width 103 (both primes) to get an effective texture of width 9991 (97 * 103) which would reduce the appearance of repetition. I think the best you could do that way is blending rectangular textures aligned in different directions, e.g. blend a 64 x 256 texture with a 256 x 64 texture to effectively get a 256 x 256 texture.

Hmm, it's a shame that (to my knowledge) hardware rendering requires power of two texture sizes. If arbitrary texture sizes were allowed, you could for example blend a texture of width 97 with one of width 103 (both primes) to get an effective texture of width 9991 (97 * 103) which would reduce the appearance of repetition. I think the best you could do that way is blending rectangular textures aligned in different directions, e.g. blend a 64 x 256 texture with a 256 x 64 texture to effectively get a 256 x 256 texture.

You would still get patterns doing this though, as the blending would change by very tiny steps. Uniformily distributing the blending around the terrain could help (via a hash function?) but you might get seams. I think most recent hardware supports arbitrary textures but it's probably a bit slower than ordinary textures (or maybe they resize it to the nearest power of two anyway).

A good way to do it is to take 2-3 similar textures, and blend them at runtime using some kind of noise inside the shader (or whatever you are using to render the terrain). That way there is very little repetition if you tweak it right (and you can get some cool effects like blending a stone road into grass in a more or less realistic way if you define a blendmap which indicates how much blending there should be at a given position). Does that make sense?

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

Absolutely, you would still get patterns, but larger patterns for your texture-size buck, so less noticeable.

Good suggestion on the shader, I tend to forget that as I'm not a shader guru. You could use Perlin or Simplex noise as your blend function for the different textures, based on position hashing.
[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

[background=rgb(250, 251, 252)]> A good way to do it is to take 2-3 similar textures, and blend them at runtime[/background]

[/font]

[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

[background=rgb(250, 251, 252)]Any example on blending 2-3 textures?[/background]

[/font]



[background=rgb(250, 251, 252)]> A good way to do it is to take 2-3 similar textures, and blend them at runtime[/background]




[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

[background=rgb(250, 251, 252)]Any example on blending 2-3 textures?[/background][/font]





I'm not sure about runtime but you can in the shader. Add a blend weight in your vertex structure and pull the pixels color from each texture based off the weight.
@DJTN: Any example on creating a Shader file to blend textures on the terrain?

This topic is closed to new replies.

Advertisement