Surfaces: less = better? I'm not so sure...

Blitz3D Forums/Blitz3D Programming/Surfaces: less = better? I'm not so sure...

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

What Swift said - combining meshes needs careful consideration. You usually want to have as few surfaces as possible per object, so it makes sense to group things and textures that are usually seen together, without "going overboard". Example:

Level with furnitures and objects, few enemies, guns and usual stuff.

1. Level

You should combine textures here as much as you can and use horizontally tiling wall textures bundled together with other details like lighting fixtures. You can use separate texture map for ceiling stuff and keep the ceiling separate object - same for the floor. Reason behind keeping walls, ceilings and floor separate objects is that the will be culled properly... when you look up, there is no need to draw the floor and when you are close to wall you don't see the floor OR the ceiling. All this assuming that you have complex levels with lot's of polygons and high res textures. And of course you should split levels as "rooms" and not keep it one huge lump.

2. Furnitures

These are separate stuff like tables, chairs control desks, soft drink machines etc. It makes sense to group these together somewhat like table & chair pairs, but since they are probable separate entities anyway they are also automatically separate surfaces. But if you have static group of chairs and tables they will be then single surface entity.

3. Players & enemies

These should be one surface entities if possible, but sometimes you want to make different sets of enemies easily by mixing and matching legs, upper torsos and faces - they will be then separate objects and surfaces, so it might not be usable to combine legs, torsos and face to the same texture map at all.

4. Weapons

As these will be separate objects for sure, you can just concentrate keeping one spesific weapon as much single surfaces as possible - it's no use to combine EVERY weapon in the game to a same map.