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

Landscape texturing question

Started by Winterbreeze Oct 15, 2008 at 3:39 PM 1 replies 800+ views
Original Post
Winterbreeze
Winterbreeze
Hello. In case of an index buffer in DirectX 9. How do you make square (2 polygons,6 rows in the index) use a different texture? I have tried to simply draw the index 2 primitive at a time and use offset, but it does not work because an index can come on row after and point back to the vertex from last row, so I must keep locking a large amount of vertices and not only 4 at a time. What I am trying to achieve is texturing like in tiled maps but I do not want to add more and more vertices. Warcraft 3 Landscape's texturing for example. I have heard of texture splatting but I am not sure if it will work here, as far as I heard it only works between two textures and I need to apply the alpha to the indices differently, which brings me back to the same problem I think, unless I am missing something.
LorenzoGatti
LorenzoGatti
Your post doesn't give us the slightest idea about what you want to do and why, nor about the details of your DirectX attempt and what's wrong with it.
In particular, index buffers can be used for any organization in batches of any kind of primitives, such as any tessellation of your landscape with any arrangement of textures.

If you make some effort to explain your question, maybe including a diagram of your vertices and polygons, people are going to help you and you might even solve the problem on your own.
Omae Wa Mou Shindeiru
Haladria
Haladria
Splatting works with much more than two textures. How many textures does your terrain consist of?

Do you want to assign a different texture for each quad in the terrain like old school 2D tile mapping?

I've written some information about splatting (in different ways) here:
Terrain Splatting
Maybe something might be of help.

Topic Locked

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

Sign in to reply to this topic.