Multitextured mesh

Blitz3D Forums/Blitz3D Programming/Multitextured mesh

Ferret(Posted 2005) [#1]
Hi,

Ive noticed something with multitextured meshes.
I use 3 textures on mi terrain and i disabled one for testing, mi framerate doubled and polycount was cut in halve. Now i combine light and colormap to end up with 2 textures and a doubled framerate.

I think blitz creates a coppy of the mesh for the third texture.
Whats the logic behind this?


big10p(Posted 2005) [#2]
From the docs:
A little note about multitexturing and slowdown. Graphics cards support a maximum amount of textures per object, which can be used with very little, if any, slowdown. For most cards this is two, but for a GeForce3 it is four. However, once you use more than this amount, Blitz will emulate the effect itself by duplicating objects and textures. Obviously, this may then cause slowdown.



Ferret(Posted 2005) [#3]
Oops, i should have checked the docs first.

I'm using a GeForce 4 MX 440???
Should i use 2 textures only just to be sure? I mean it will cut the framerate in half on some cards.


Ferret(Posted 2005) [#4]
Double post


big10p(Posted 2005) [#5]
The choice is yours, Ferret. :)

Your card obviously only has 2 texture units so using more than 2 texture layers will result in the slowdown. Stick with 2 layers, if you can get away with it.


Gabriel(Posted 2005) [#6]
GF4MX's are renamed GF2's and GF2's do indeed only have two texture units. If you want to support TNT2's, GF1's, GF2's, Radeon 7X00's and this level of card, you should stick to just 2 layers. Of course, you could always use a DLL to retrieve the number of texture units available and use 3 layers if the card can support it without mesh duplication.


big10p(Posted 2005) [#7]
Blitz3D has the command HWTexUnits to find how many texture units your card has. However, I believe the command gets the info by interrogating the GFX driver, which sometimes lies about it's capabilities. :/