Sign in to follow this  
BrianMJC

Seamless Tile Dilemma

Recommended Posts

BrianMJC    152
Hi all, In my isometric tile game engine, I want to have natural looking seamless tiles with alpha blending. And I would like to know, from more seasoned alpha blenders than I, which of the following methods would be more efficient to use: METHOD A) Make around 30 versions of each of the 41 unique tile textures, where five are variations of the same texture with full opacity for variety purposes, and the remaining 25 versions are the same texture with different alpha maps. METHOD B) Make around 5 versions of each of the 41 unique tile textures, where each is a variation of the same texture with full opacity for variety purposes. Make a universal set of 25 alpha maps to be blended in runtime with the textures as needed. Given my (somewhat limited) knowledge of DirectX graphics, I have determined that METHOD A will be less computationally intensive, but will eat up approximately 90 MB of RAM, while METHOD B will require more computations per tile texture rendering, but will take up a mere 21 MB of RAM. This means that (taking into consideration 50MB+ of 3D models and 8-12MB of other graphics), anyone with a 128MB video card will have all graphics fit in video RAM with METHOD B, but only someone with a 256MB RAM card will have all graphics fit using METHOD A. So basically what I'm asking is this: Is it better for graphics performance to have simpler computations or to have all textures reside in video RAM? Thanks much. :)

Share this post


Link to post
Share on other sites
rjackets    270
Personally, I would go with method B and implement it using a pixel shader. Have however many tiles you need for your terrain, then a couple of black-and-white maps that you can use to generate alpha blending and combine it all in a shader should give some nice results. Plus, a pixel shader doing this would put "slightly" less strain on the CPU (in this day and age you want to share the load nicely between the GPU and CPU) -- although there likely wont be much of a noticable difference.

Second: I don't quite see why you need 5 "slightly different" versions of each tile. If it is properly seamless then it should look fine with just one. You may want to consider only switching type when it's going to be noticable. ie. You probably dont need green_grass1, green_grass2, green_grass3, etc. Grass is grass [wink] Now, this is considering your memory problem. If you REALLY need all these variations on essentially the same texture then feel free to do so. It's a trade off between what works, and how much you can fit in. Perhaps consider having an option for high or low resolution textures? You can fit a lot more "variation" into the high textures if you want.

Share this post


Link to post
Share on other sites
BrianMJC    152
Thanks rjackets,

I'll have to check out some online articles about pixel shaders, since I've never worked with them before.

The five variations are for aesthetics only. It's varied enough to be fairly noticeable, and obvious if studied. It does lend a bit of fine quality to the graphics appeal, I think, when you have several different tiles instead of one repeating pattern where stretches of the same tile reside. I'm using three levels of texture depth (32x32, 64x64 and 128x128), for three different zoom levels. I guess it could be wasted on the smallest (farthest) textures, though it would make for simpler computations to keep it universal for all zoom levels (and the small textures don't take up much memory anyway).

Thanks again. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this