Skip to main content
gamedev.net
🔒 Locked

[help] Texture mapping

Started by RP Smith Jan 23, 2005 at 7:05 PM 0 replies 250+ views
Original Post
RP Smith
RP Smith
I'm working on a terrain generator. I've got everything complete on gererating the terrain. The problem I'm having is applying different textures to polygons in a triangle strip. Do I need to start a new strip evertime I wish to change textures. Example as the terrain goes up in elevation I might change from grass to snow.
Namethatnobodyelsetook
Namethatnobodyelsetook
Optimally, yes, you'll break rendering into groups of polys that share the same texture, or textures. In reality, as long as you're using less textures and available texture stages, you could get away with blending the other textures in with a weight of 0. Our heightmap system uses 4 textures, and requires hardware with 4 available textures, so we just choose a percentage of each texture encoded as color on each vertex. It works. It's cheap and easy to code. I'm pretty sure we could get better performance if we actually split up the map instead of using 4 large, tri-linear filtered textures (well, 5 actually, a first pass does just lightmap and fill in Z) over everything.

Topic Locked

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

Sign in to reply to this topic.