Original Post
I am encountering several problems with my terrain engine and would appreciate some help. Any and all pointers are welcomed.
I have a height-mapped terrain. I want to texture this in the normal way (grass/rock/etc), but NOT according to the height. Instead, I want to be able to paint the texture onto each terrain quad (as with the Warcraft III editor). This I can currently do with no problem by just having a base texture with multiple edgings, such that when the primary point is painted, all surrounding quads receive an edge texture. In order to allow any texture to be painted over any other texture, my edge textures are alpha-mapped bits that get overlayed on the base texture already existing at that point during a second-texture pass.
My problems at the moment are:
1: To get the texture blocks small enough to look cool, the terrain has to be fairly tesselated. With the extra tessellation, I have to drop the maximum view-distance to maintain speed.
2: I can switch the texturing method to use in-block edges (i.e. instead of using a center block with 12 edge pieces, I can create a texture set that contains the requisite 32 edge pieces to cater for all possible edge scenarios... eh, what?). The problem here is that I am currently using a single terrain texture file that is 2048x2048 pixels, split into 16x16 mini-textures, with each row corresponding to a different terrain texture. Each row contains 4 ''alternate'' base textures, plus the 12 requisite edges. If I switch to using in-block edge pieces, I''m going to have to lose terrain texture types because I''ll need to use 3 rows per texture type just to handle the required variations... I can reduce this by using rotation and only keeping 16 edge pieces, so that I only have to use 2 rows. But still, this limits me to 8 terrain textures, which seems quite limited. I have also toyed with keeping the edge masks seperate, but the performance hit is massive because of the texture swapping.
3: How can you get irregular blends other than by tiling? For example, in Unreal Tournament 2003, the outdoor areas (particularly antalus), seems to have very smooth and irregularly blended textures. Is this a case of generating the textures when you compile the map, or just very nifty tiling?
4: If I switch to a generated texture, how on earth do I represent the creation of that in the map editor without turning every map creator into a programmer?
OK, that''s quite a chunk. Hope my issues make sense. Hope even more that I''m missing something really obvious.
Learning to fly is easy, but as a tortoise, the landings are really rough.