In order to bring the material files up-to-date, I have some script to find out what textures are used in the maps. But of course some textures are rarely used and not worth an entry in the material file, while others are very important. So I want to compute on how many 'square units' each texture is used.
In the map files a brush is defined like that:
// brush 0
{
( 128 192 4 ) ( 128 0 4 ) ( 0 192 4 ) tex_nature/desert001 0 0 0 0.25 0.25 65280 0 0
( 128 192 128 ) ( 0 192 128 ) ( 128 192 0 ) tex_nature/flower 0 0 0 0.25 0.25 65280 0 0
( 128 192 128 ) ( 128 192 0 ) ( 128 0 128 ) tex_nature/dirt_se01 0 0 0 0.25 0.25 65280 0 0
( 0 0 0 ) ( 128 0 0 ) ( 0 192 0 ) tex_common/nodraw 0 0 0 0.25 0.25 65280 0 0
( 0 0 0 ) ( 0 0 128 ) ( 128 0 0 ) tex_nature/dirt002 0 0 0 0.25 0.25 65280 0 0
( 0 0 0 ) ( 0 192 0 ) ( 0 0 128 ) tex_nature/desert009 0 0 0 0.25 0.25 65280 0 0
}
I have no problems to extract the coords, texture IDs and the properties from that. But I am lost on computing the info I want from the given vertices. Why there are only three coordinates, even if the face has four or even more? Maybe someone can explain this to me?