This topic has been transferred to this forum: Prog Temp Test.

|
Author Topic:   Textures and triangle strips
mlidal
New Member
posted August 27, 1999 08:12 AM            
There seems to be a consensus that using triangle strips/fans is faster than triangles. However I have a bit of a problem understanding how to use them with texturing. It seems that in most circumstances, texture coordinates are not shared between polygons, so I don't see how you can use strips/fans.

Any tips or sample code will be appreciated

Mathias Lidal

IP:

MarkBatten
Member
posted August 27, 1999 08:38 AM            
Right; that is a limitation. You can only use strips/fans where the whole thing shares the same texture. But that leaves plenty of room to use them, because texture coords can be all over the place. As an example, look at the textures Seumas uses for the tanks in Tread Marks, or a Starsiege skin. I'll bet Seumas is drawing each tank as one triangle strip, because the whole tank uses different pieces of a single 256x256 texture.

IP:

LDA Seumas
unregistered
posted August 27, 1999 04:12 PM           
Drawing entire tanks with single strips would be nice, but sadly not possible. For starters the tanks are flat shaded (well, most of them <g> ), and I'm not sure how easy it would be to turn a strip around a sharp corner. That might be surmountable by setting the driver's shading model to flat, though. More importantly are the texture coordinates, which change abruptly for the different faces of the model (front, right, top, etc.). You can see this if you load the tank skin bitmaps from the Test version. It's impossible to share vertices across texture coord changes like that, so my load-time stripping algorithm only gets about 2 triangles per strip on the models. With our 3-level distance based mesh detail reduction (hit F1, F2, and F3 in game to see the levels), I don't find meshes are much of a performance hit compared to terrain. The biggest performance spike (downwards) comes from the pure fill rate requirements of things like the smoke and dust, and huge piles of explosions all blending on top of each other.

------------------
-- Seumas McNally, Lead Programmer, Longbow Digital Arts

IP: