Archived

This topic is now archived and is closed to further replies.

billybob

better method of multitexturing?

Recommended Posts

right now, the three stage method isn''t very efficient. what if there was a way to set the textures in each square? like you could make each square have its own texture, this way you couldn''t blend entire squares with textures, but i don''t care about that. all i want is smooth transitions from one texture to the other. is this possible? or is the number of texture changes far higher performance hit than just doing three textures at once?

Share this post


Link to post
Share on other sites
quote:
right now, the three stage method isn''t very efficient.

Multitexturing is the most efficient way of blending textures period. Your only other option is multipass texture blending and of course that requires a full render for every (blended) pass.
quote:
what if there was a way to set the textures in each square? like you could make each square have its own texture, this way you couldn''t blend entire squares with textures, but i don''t care about that.

Eh? I must assume by ''square'' you mean a quad or a group of quads. "a way to set the textures in each square"? I don''t get it, you just use 1 texture (one pair of tex coords) for each ''patch''.
quote:
all i want is smooth transitions from one texture to the other. is this possible? or is the number of texture changes far higher performance hit than just doing three textures at once?

I think you need to give a much better explination about what your trying to accomplish.


_____________________________________________
Come join us on IRC in #directxdev @ irc.afternet.org

Share this post


Link to post
Share on other sites
ok...based on all the posts you have made about multitexturing on the terrain for last few days, i have gathered this much...

You wish to have your terrain textured using different textures. But you want them to be blended (or transition) seamlessly whenever a change in texture.
I think you are trying to get a dirt terrain with patches of grass here and there. Also since you mentioned snow (in some post!), i presume you wish to have some snow patches here and there. right?
I also believe that you have decided to use three textures (grass, sand and snow, right?) and do a *weighted* blending.
Well this method may provide you with the effect you need, but i think the actual success of this method largely depends on the actual textures themselves (i mean the content!).

An alternate method would be (this is more frequently used, and i''ve used this in several occasions) to create another set of smaller textures which sorta have the necessary transitions in them. Then map these textures on to the required polys (or quads) where ever necessary.
I also presume that you are not using any art package to do the mapping and you are doing a brute force mapping, right?. Well ideally i would suggest using an art package (milkshape would do!) to do the mapping (including the transition texture mapping) and then load the terrain mesh into the engine off the disk. If you insist on using a height map data and generating the terrain on the fly, then you will need to create some additional information along with the height map data. for example, create the height map data as a 24bit image, let the Red component provide the necessary height information, and the green or blue component can provide the texturing information. For mapping all you need to do is to analyse the green/blue component and generate the corresponding mapping and assign a correct texture. For assigning textures, you can set a range of blue values. if the value lies between some range the corresponding texture is assigned.
This method is far more easier and efficent than the 3 texture weighted multitexture one (which you are using now), since you need to render only one texture per quad. Also since the renderstate change will not be a problem, since you already have enough... Also this method also gives you an option to have a second texture as lightmap texture without much performance hit. including a lightmap texture to the existing 3 texture stage will result in a huge performance hit...

hope this helps... (if what i understood from your posts are not correct, then please elaborate what exactly you intend to achieve...)

Share this post


Link to post
Share on other sites
yeah, thats good enough. ok then, i found a number of ways to get big performance increases, use the retail instead of the debug dx libs, draw distance, and a few others. it looks AWSOME, so i don''t want to give that up.

Share this post


Link to post
Share on other sites