I graphed out how much surface area each texture uses!

Discussion in 'Mapping Questions & Discussion' started by hutty, Apr 18, 2016.

  1. hutty

    aa hutty

    Messages:
    471
    Positive Ratings:
    373
    First some links
    raw data: http://paste.ubuntu.com/15922335/
    sorted/cleaned raw data: http://paste.ubuntu.com/15922345/
    code (processing, a little messy, sorry): http://paste.ubuntu.com/15922354/

    This post shows which textures in all of tf2's (decompiled) maps have the most surface area. Not that these may not reflect in-game values for a couple of reasons. Namely, some large faces are hidden but still have a texture, and displacements are treated as a flat face rather than a bumpy one. Never the less, here are the textures that have the most coverage (tool textures excluded)

    [​IMG]

    [​IMG]
    brick/wall028
    5,502,019,600.00 square hammer units
    yes, 5 billion
    I am as confused as you, somebody please go check my math, I know this texture is popular, but, that, popular? wow

    [​IMG]
    concrete/concretefloor003
    1,120,269,310.00 square hammer units
    This one I can understand, and expected.

    [​IMG]
    nature/blendgroundtograss008
    723,265,150.00 square hammer units
    1 of 3 competitively viable ground textures.

    [​IMG]
    nature/rockwall012
    694,941,950.00 square hammer units
    I'm personally not a fan of this texture, thanks badlands, you ruined everything.

    [​IMG]
    wood/wood_bridge001
    684,980,420.00 square hammer units
    Not surprised.

    [​IMG]
    nature/rockwall013
    622,829,380.00 square hammer units
    Badlands, please, no more.

    [​IMG]
    nature/blendrockground007
    588,767,420.00 square hammer units
    badlands plz

    [​IMG]
    nature/blendgroundtogravel005
    557,572,100.00 square hammer units
    plz

    [​IMG]
    nature/ground_04
    502,012,960.00 square hammer units
    This texture, as expected.

    [​IMG]
    winter/rockwall014
    455,592,544.00 square hammer units
    This is one of my favorite textures, so its nice to see it in the top 10.
     
    • Useful Useful x 2
    • Thanks Thanks x 1
    • Like Like x 1
    Last edited: Apr 18, 2016
  2. Mikroscopic

    aa Mikroscopic

    Messages:
    601
    Positive Ratings:
    605
    Show us what the least used textures are, and have a mapping contest based around them.
     
    • Agree Agree x 4
  3. Moonrat

    aa Moonrat The end of an era

    Messages:
    896
    Positive Ratings:
    530
    These guides are uhhh...... Certainly increasing my knowledge....
     
  4. hutty

    aa hutty

    Messages:
    471
    Positive Ratings:
    373
    I edited the top post to add the missing images.
     
  5. Idolon

    aa Idolon the worst admin

    Messages:
    1,538
    Positive Ratings:
    4,417
    .vmfs store brushes as a collection of planes, and then Hammer forms the brushes by seeing where those planes intersect. (This is why concave brushes don't work.) It only takes three points in 3D space to define a plane, so .vmfs only store three points. This means a face with 3 edges takes the same amount of data to store as a face with 10 edges (or any other number of edges).

    Unfortunately, this makes the problem of solving for surface area much more difficult than the code is able to handle. Not all faces are quads, and the three points used to define a face aren't always going to be directly related to where that face's edges are.

    There's a couple of reasons I can think of as to why that brick texture has such a high surface area:
    1) weird mapping habits (Possibly textured the outside of a skybox somehow?)
    2) one (or more) brushes got saved with one of its face-defining points way off in the middle of nowhere
     
  6. EArkham

    aa EArkham Necromancer

    Messages:
    1,570
    Positive Ratings:
    2,193
    Both brick/wall028 and winter/rockwall014 are 1024x2048 textures, whereas the rest are 1024x1024. I wonder if that will affect surface area estimates.
     
  7. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,742
    Definitely. I'd take surface area info from BSPs not VMFs since BSPs store faces as triangles like regular 3d model geometry. (I think????)
     
  8. Nicky

    aa Nicky Lets try something new!

    Messages:
    912
    Positive Ratings:
    1,698
    I believe so as you can see it with mat_wireframe. Though that may just be a way to display brushes as wireframes, and not how the bsp saves them. I don't really know...
     
  9. hutty

    aa hutty

    Messages:
    471
    Positive Ratings:
    373
    The texture's resolution does not affect the surface area in this calculation.
    As for doing a correct calculation from the triangles in a bsp.
    I'm not going to do it in the foreseeable future, grabbing data from compressed binary files is way more difficult than grabbing from a renamed txt.

    Maybe when I get around to looking at bsp internals (which i plan to do at some point), but not soon.
     
  10. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,219
    It also occurs to me that both of these stats are likely to have been skewed by Valve's tendency to use real textures in the unrendered outer edges of things, instead of nodraw. I don't think any face that borders the void should count.
     
  11. Geit

    aa Geit 💜 I probably broke it 💜

    Messages:
    597
    Positive Ratings:
    1,113
    Nope, they're stored as convex faces of n-edges, the renderer has to triangulate them as a preprocessing step on map load.

    The face array does have an area property though, which would be suitable for this. (iterate face array, follow references through to texture arrays and add face area to total)