Skyboxes

Discussion in 'Mapping' started by Zygoth, Apr 9, 2011.

  1. Zygoth

    Zygoth Member

    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    0
    How does one acces one of the empires skyboxes(2d)?
     
  2. Deadpool

    Deadpool SVETLANNNAAAAAA

    Messages:
    2,246
    Likes Received:
    0
    Trophy Points:
    0
    noclip
     
  3. Varbles

    Varbles Simply Maptastic. Staff Member

    Messages:
    2,093
    Likes Received:
    26
    Trophy Points:
    0
    we dont have any custom skyboxes?
    except maybe glycencity
     
  4. Metal Smith

    Metal Smith Member

    Messages:
    4,520
    Likes Received:
    3
    Trophy Points:
    0
    no
    <filler>
     
  5. flasche

    flasche Member Staff Member Moderator

    Messages:
    13,299
    Likes Received:
    168
    Trophy Points:
    0
  6. Zygoth

    Zygoth Member

    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    0
    Even when I place the skybox files in username/empires/materials/skybox or username/empires/empires/materials/skybox it still doesn't work.

    EDIT: /failure, it seems that I just had to put an extra _ at the end of the name.
     
    Last edited: Apr 9, 2011
  7. Soylent

    Soylent Member

    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    Since this thread has now been happily resolved I'm hijacking it to ask another question about skyboxes.

    My first empires map is an island surrounded completely by water. The water extends out about 10-20 meters before it joins with the 3d skybox. From above the water the skybox looks nice and joins correctly with a difficult to percieve edge.

    When you're under water there is volumetric fog, so only a few meters down it's nearly black; but if you look into the skybox from below the water there is no fog; the ground is brightly lit all the way to the horizon by sunlight and it looks like ass.

    Should I try an ugly hack(using a texture with the same colour as fully saturated distance fog for the given water texture to paint the sea floor with) or is there a proper solution?
     
  8. Grantrithor

    Grantrithor Member

    Messages:
    9,820
    Likes Received:
    11
    Trophy Points:
    0
    I don't think there is a proper solution to that, unless it means that no mapper has ever thought about making it not look like ass. Half-life 2/Counter-strike source maps were never meant to allow you to hit the edges so it might be a source related thing.
     
  9. Soylent

    Soylent Member

    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    You can consider my question resolved now.

    I went nocliping around on bt_island from PVK II to see how they've solved this problem.

    What they'd done is they've stuck a wall in the skybox with an unlit, monochrome material of exactly the same colour as the underwater fog, so if you're under water and look into the skybox the first thing you see is this wall.

    Should be good enough; I don't expect people to be hugging the edge of the level in my map; there's no point swimming that far out.
     
  10. Trickster

    Trickster Retired Developer

    Messages:
    16,576
    Likes Received:
    46
    Trophy Points:
    0
    In my map I just put a black texture under the water to block it out and had a really close waterfog. It causes a visible border near the surface but besides that it did the trick.
     
  11. Soylent

    Soylent Member

    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    If it helps anyone, here's a short guide how to find the fog colour for a particular texture and the easiest way to make a matching material file:

    If the material is inside a GFC, use GFCScape or some other app to browse the content of the GFC.

    Water has a top material and a bottom material. The top material is what you see looking at the water from above and the bottom material is what you see when you're under water looking up.

    The R G B values of a particular kind of water fog are found in the "$fogcolor" parameter of the bottom material. But the material you actually apply to a surface in hammer is the top material.

    So open the top material you'd like to use, lets say water_wasteland002b.vmt. You are looking for this line: "$bottommaterial" "dev/dev_waterbeneath2". The top material also has a "$fogcolor", but sometimes it doesn't match the fog colour applied under water.

    Open the corresponding bottom material; in this case dev/dev_waterbeneath2.vmt. You're looking for this line: "$fogcolor" "{42 39 34}"

    That's the RGB value you want. Now make a .vmt file; notepad or just about any text editor will be fine. The material you're going to make has a constant colour regardless of lighting; that's an "unlitgeneric". You don't want to make a texture file; a solid colour can be handled with a shader:

    "unlitgeneric"
    {
    "$color" "{R G B}"
    }

    Here are some common $color parameters:
    dev_water2: "$color" "{22 20 10}"
    dev_water3_exp: "$color" "{22 20 10}"
    dev_water3: "$color" "{22 20 10}"
    dev_water4: "$fogcolor" "{22 20 10}"
    dev_water5: "$color" "{22 20 10}"
    Sewer_Water001: "$color" "{45 45 35}"
    Sewer_WaterDarkFog2: "$color" "{45 45 35}"
    Sewer_WaterDarkFog: "$color" "{45 45 35}"
    water_canals03: "$color" "{20 42 39}"
    water_canals_city: "$color" "{45 45 35}"
    water_canals_city_murky: "$color" "{45 45 35}"
    water_canals_water2: "$color" "{42 39 34}"
    water_canals_water_clear: "$color" "{41 36 17}"
    water_wasteland002a: "$color" "{23 37 47}"
    water_wasteland002b: "$color" "{22 20 10}"
    water_wasteland002c: "$color" "{22 20 10}"
     

Share This Page