Skip to main content
GameDev.net gamedev.net
🔒 Locked

Texturing terrain

Started by ArchMiffo Jun 20, 2002 at 12:51 AM 2 replies 250+ views
Original Post
ArchMiffo
ArchMiffo
Hi I've written a simple terraingenerator. It works fine and I have no trouble rendering it or anything, only problem is it looks like crap . I only have one texture and this results in a nice square pattern. My question is this, can anyone point me towards a tutorial of some sort to help me make the terrain look sweet (either by using multiple textures or drawing one texture in a way that doesn't produse a pattern). Or if you would like to contribute with advice yourselfs heres som info: For the moment I'm using a grid of vertices and then I make indices to those vertices and draws the whole thing with (I think, I'm new to directx so you will have to forgive me if this is wrong) Drawindexedprimitives Thanks [edited by - ArchMiffo on June 20, 2002 2:03:06 AM]
Jack Sniper
Jack Sniper
Hi !

I''m using the same technique.
I made a grid of vertices and a Index of TRIANGLE_STRIPS.

If you now have a texture you need the texture coordinates in the vertex format (tu & tv).
Now it is easy to make a seamless texture on it when you set the tu and tv values correct.
Here the code for it:

CurrentVertex.tu = CurrentVertx.x
CurrentVertex.tv = CurrentVertx.z (if you have the plane in x and z direction)

Thats the whole thing. Now it should look fine.

MfG Jack
Ecko
Ecko
look into detail textures. On www.gametutorials.com there is a good demo of this (only prob is it''s in OGL). with a good detail texture you can get away with a pretty low resolution base texture depending on your needs. Also I''d suggest breaking up your terrain mesh into a bunch of patches and performing some frustum culling to keep poly counts down.

gl
-ecko
-----------------------------------------------------------"People who usualy use the word pedantic usualy are pedantic!"-me
ArchMiffo
ArchMiffo
Jack Sniper, That is sort of what I'm doing now. Sure it's seamless but it's still the same texture over and over, it looks realy boring. Thanks anyway.

Ecko, I checked the site and thats the kind of texture I'm talking about, but not the multitexturing, that I could have found out in my DirectX book. However, the landscape on that site has very varying textures, it doesn't look like the same texture repeating itself. That is what I want to learn. If someone could show me a similar tutorial for directx it would be much appreciated. (If anyone would like to help me but don't understand what I'm talking about, please check the site Ecko provided and go to the OGL-tutorials)

[edited by - ArchMiffo on June 20, 2002 6:42:12 AM]

Topic Locked

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

Sign in to reply to this topic.