Trouble with cubemaps and water reflection.

Discussion in 'Mapping Questions & Discussion' started by Demitri Omni, Apr 18, 2008.

  1. Demitri Omni

    Demitri Omni L2: Junior Member

    Messages:
    53
    Positive Ratings:
    3
    So, I'm having trouble with cubemaps, nearly every reflective prop_static in my map gives the 'missing texture' texture as their reflection, and I have yet to figure out why.

    My water also gives the same reflection texture. I've closed up my map, no holes, so I have no clue what it is.

    I can provide screens if needed and my next compile log as well.


    I can't seem to post my compile log due to the character limit.

    EDIT: also, I say cubemaps because that's what I've been told the problem is by everyone else, but never how to fix it. I'm also going by this portion of the compile log:

    Code:
    *** Error: Skybox vtf files for skybox/sky_gravel_01_hdr weren't compiled with the same size texture and/or same flags!
    Can't load skybox file skybox/sky_gravel_01_hdr to build the default cubemap!
    *** Error: Skybox vtf files for skybox/sky_gravel_01_hdr weren't compiled with the same size texture and/or same flags!
    Can't load skybox file skybox/sky_gravel_01_hdr to build the default cubemap!
     
    Last edited: Apr 18, 2008
  2. kimangroo

    kimangroo L3: Member

    Messages:
    111
    Positive Ratings:
    6
    I'm afraid I can't help you with cubemaps seeing as I haven't even built them yet for my map, but I can give you this piece of advice:

    Make sure you run your whole compile log through the error checker at interlopers.net before Youme comes across your post! :D

    Compile log error checker.
     
  3. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,739
    nope kimangroo :p I know this is a well known error but its not one fixable by compile logs

    heres what to do:
    -Ignore the error message there is nothing you can do and it doesnt actually matter at all
    -Compile the map
    -Ingame type in the console (I'm assuming you have full HDR set when you start):
    --mat_specular 0
    --Buildcubemaps
    --disconnect
    --mat_hdr_level 0
    --map *map name here*
    --buildcubemaps
    --disconnect
    --mat_hdr_level 2
    --mat_specular 1
    --map *map name here*
    -Then oggle at your cubemaps and come back to this thread and click the thanks button to the right of this post

    8)
     
    • Thanks Thanks x 5
  4. TheDarkerSideofYourShadow

    TheDarkerSideofYourShadow L10: Glamorous Member

    Messages:
    792
    Positive Ratings:
    143
    Heh, I did hit the thank you button. Had the same issue, but everything seems to be alright after just running buildcubemaps. Next push, I'll have to go through that list. tyvm.
     
  5. Demitri Omni

    Demitri Omni L2: Junior Member

    Messages:
    53
    Positive Ratings:
    3
    As much as I'd like to hit the button, these were the results of that:

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    Yes, right now the skybox is a bit wonky, but I'm going to mess with that last. Right now I want to make sure my lighting is going to work.

    I've tried adding an env_cubemap entity, but all it does is make all of the prop cubemaps solid white (i.e. too bright), and breaks all of my brush cubemaps (i.e. purple and black checker).
     
  6. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,739
    /me facepalm
    you added the env_cubemap before or after you did the long list I gave you? please tell me you did it after and that I've recalled that method wrong

    for future reference reflections are worked out by env_cubemap entities - that means you MUST have one for ANY reflections to work
     
  7. Foreverkul

    Foreverkul L4: Comfortable Member

    Messages:
    157
    Positive Ratings:
    14
    I had a similar problem and I tried everything. I eventually found out it was the skybox texture!
    You may want to check out you're "SkyBox Textrue Name" property (try changing it back to the default: sky_day01_01)

    I think this is you're problem, it doesn't know what skybox/sky_gravel_01_hdr is! And oddly enough, even if a cubemap doesn't reflect the sky, you still have to have a working skybox texture, no matter where the cubemap is.
     
    Last edited: Apr 19, 2008
  8. trainRiderJ

    trainRiderJ L5: Dapper Member

    Messages:
    203
    Positive Ratings:
    31
    I'm a noob with cubemaps, so I just want to see if this is a correct statement:

    Once you have built cubemaps for the first time, they will not be overwritten by any other attempts to build cubemaps. You will either have to manually delete them from within the BSP, or rename the map (creating an entirely new BSP).

    What happens if you try to build cubemaps without an env_cubemap? Does it fail?
     
  9. Demitri Omni

    Demitri Omni L2: Junior Member

    Messages:
    53
    Positive Ratings:
    3
    This is my problem. I wasn't aware how cubemaps worked exactly, I read a little more on them (thanks to a friend's link), and now I realize my error.

    I haven't mapped since CS 1.6 so I'm a bit lost with all the new source features.
     
  10. Demitri Omni

    Demitri Omni L2: Junior Member

    Messages:
    53
    Positive Ratings:
    3
    I've added env_cubemap entities, compiled, then did everything. I'm having trouble with the water still, though. I'm thinking it's because the water extends outside the world. I'm assuming since this counts as a leak that it's the main problem?
     
  11. phatal

    phatal L6: Sharp Member

    Messages:
    259
    Positive Ratings:
    21
    If you rename a bsp and buildcubemaps again you will add new cubemaps to the already existing cubemaps in the bsp. Not adviseabe since it adds size to your level and you have unused data packed in that bsp(the old cubemaps).

    BTW... If you rename a bsp and don't buildcubemaps again, you will lose the cubemaps info AND you will have the beautiful purple and black textures as well.
     
  12. kimangroo

    kimangroo L3: Member

    Messages:
    111
    Positive Ratings:
    6
    ok, my constructive post attempt #2:

    Cubemaps sound like a pain in the arse.

    ;)
     
  13. phatal

    phatal L6: Sharp Member

    Messages:
    259
    Positive Ratings:
    21
    Leaks can call all sorts of problems, but yeah if the brush extends out of the world you definitely will have issues. Also make sure you have the water texture on only 1 face of the brush.
     
  14. Foreverkul

    Foreverkul L4: Comfortable Member

    Messages:
    157
    Positive Ratings:
    14
    I really think it is you're skybox texture! Try changing it to the default and see what happens.
     
  15. kimangroo

    kimangroo L3: Member

    Messages:
    111
    Positive Ratings:
    6
    That's what the compile log error would suggest...

    :001_unsure:
     
  16. TheDarkerSideofYourShadow

    TheDarkerSideofYourShadow L10: Glamorous Member

    Messages:
    792
    Positive Ratings:
    143
    If you compile with the default, day...whatever, the error goes away. Now, I was messing around, and tried 3 different TF2 skies (all official) and got the same error with all 3, which means at least half of the TF2 skies will give that error. I assume since Valve used them in their maps (that is the gravelpit sky after all), that either it is ignored or there is a fix.
     
  17. Paria

    Paria L5: Dapper Member

    Messages:
    202
    Positive Ratings:
    31
    They aren't really a big problem or in any way difficult so long as you have a basic understanding of the process, its quite common and logical for people to interpret the

    *errors* Skybox vtf files for skybox messages

    as a problem, but everyone who is compiling a map using the selection of tf2 skys will get this message, youme already gave the list of commands for building cubemaps in both hdr/ldr modes. One thing i would add is that setting sv_lan 1 to the launch parameters seemed to help me with the "disconnecting issue" on map change - which some of you may have experienced whilst building cubemaps.

    Also there seems to be alot of confusion about building cubemaps/rebuilding cubemaps/renaming bsps - and the effects it has on cubemaps,

    my solution to this is basically to be organised in advance, for internal saves i just used the naming convention of map name+save number (saving regularly and having different copies of your map always seems like a good backup plan for me)

    so geothermal1
    geothermal1
    geothermal2
    geothermal3
    etc etc

    when i finally have a version i wanted to make a beta save it as ctf_geothermal_b1 (then run a full compile)- and follow youme's steps for building cubemaps for this version.
     
    • Thanks Thanks x 1
  18. ChronoTriggerFan

    ChronoTriggerFan L7: Fancy Member

    Messages:
    435
    Positive Ratings:
    72
    do you really have to rename the map each time to get cubemaps to work? I just have one map file, each time I test it, I rebuild the cubemaps and it works just fine...
     
  19. Paria

    Paria L5: Dapper Member

    Messages:
    202
    Positive Ratings:
    31
    it was just my way of demonstarting how i organise myself, its quite easy to run buildcubemaps on a beta release and then run them again(without making a fresh compile) - adding to the bsp file size,

    i was just demonstarting my approach to help avoid running buildcubemaps multiple times on the same file - and thus releasing a beta with wasted file size that is just redundant cubemap data.

    I think im going to step away from this thread now as its seems to be going into the realms of confusing people further :/
     
  20. trainRiderJ

    trainRiderJ L5: Dapper Member

    Messages:
    203
    Positive Ratings:
    31
    I guess I should have been more clear. When I said rename the map, I was thinking along the lines of "save as" in hammer to a new name, such as xyz_b1 to xyz_b2.
     
    Last edited: Apr 20, 2008