Custom skybox texture / HDR question

Discussion in 'Mapping Questions & Discussion' started by Terr, Oct 11, 2009.

  1. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    So I've got some code that takes a BSP and figures out the skybox name. So far so good. But what is the correct process to get from the name to the actual VMT/VTFs?

    I have some ideas about how it works, but maybe someone who has actually make an HDR skybox can help confirm or correct them.

    In the GCFs, the HDR copies of some sides (BK,FT,UP,DN,LF,RT) have a VMT. At the same time, the LDR sets have a $hdrcompressedTexture value.

    Questions/assumptions-needing-verification:
    1. The engine just takes the skybox name and slaps on a prefix path and a suffix direction. So skybox "foo" becomes "materials\skybox\fooup.vmt", "materials\skybox\foodn.vmt", etc. Does it follow this step regardless of HDR/LDR setting?
    2. As with most textures, the VTF files can be named anything, as long as the VMTs point to them and follow the naming convention. While the Valve wiki suggest naming them the same, it's just convention.
    3. The engine finds HDR versions by looking at $hdrcompressedTexture, not from the HDR VMT names.
    4. The HDR VMT files themselves are just red-herrings, left over from development. The only VMT files that matter are the ones in materials\skybox\{name}{side}.vmt