Welcome to PlagueFest.com! Log in or Sign up to interact with the Plague Fest community.
  1. Welcome Guest! to interact with the community and gain access to all the site's features.

buildcubemaps broken?

Discussion in Mapping Discussion started by nyronic, Apr 22, 2013

  1. May 17, 2011
    Posts
    I never had any problems getting cubemaps to work before, maybe someone has some insight. I don't know if the latest update to CSS did it, but I can't get buildcubemaps to work anymore.

    What I mean is, I load the map and run buildcubemaps like normal, disconnect and reload all materials, and the map still acts as if I never ran the command. AWP Scope is black and all the reflective surfaces dont reflect anything. It looks exactly like it does before you run buildcubemaps.

    Is anyone else having this problem?

    EDIT: Some more info, I decided to open the bsp using pakrat and extract several cubemap .vtf's. It seems to be making all of my cubemaps the default black picture and isn't properly converting/adding all of the screenshots it takes during the buildcubemaps process.

    I also tried running the map in csgo and doing buildcubemaps there, same problem.
    nyronic, Apr 22, 2013 Last edited by nyronic, Apr 22, 2013
  2. Jan 11, 2011
    Posts
    Haven't tried to build cubemaps since the patch, but before I personally had to do this:

    - Open the map I want to build cubemaps for.
    - Type "building_cubemaps 1" in console.
    - Type "buildcubemaps" in console.
    - Close the map.
    - Open a different map (not the one I juts built cubemaps for).
    - Changelevel (or close this and open the other) to the map I built cubemaps for.

    But wouldn't be surprised if it was the patch that broke them somehow.
    May try later to build some cubemaps myself and report back to you.
    Kaemon, Apr 22, 2013 Last edited by Kaemon, Apr 22, 2013
  3. May 17, 2011
    Posts
    Thanks, I tried that but unfortunately it still didn't work. I decided to a fullbright recompile of my map and now buildcubemaps is crashing CSS instead.
  4. May 31, 2012
    Posts
    I tried the other day (one day after the update, I think) and I couldn't get it to work either. I guess it would be a good idea to report this bug at Valve's Source bugs github and then hope they fix it in the next update.

    EDIT: Just a workaround, I believe you could build cubemaps within a different source game which shares its engine branch with CS:S or, in the very least, is compatible with it. This can only work with a CS:S mod (CS: Promod, for instance) or maybe HL2, and would probably work better if all the textures (or most) are custom (as otherwise there would be checkered textures during the cubemap-building).
    enviolinador, Apr 22, 2013 Last edited by enviolinador, Apr 22, 2013
  5. Apr 9, 2012
    Posts
    I would take HL2 as the cubemaps do work there. If you are mapping for CS:S it may very well be due to the update because all of the files have moved on from your username folder to common, in other words it probably doesn't know anymore in which map directory it has to link the cubemaps to, because I'm pretty sure that buildcubemaps still want to write to cstrike into the old path, but still packs them in your map nevertheless, and as such do not work.

    Doing this in HL2 will work, just quickly copy your BSP over to the hl2 directory, load map there, buildcubemaps, exit or changelevel, and then re-port to css
    • Informative Informative x 1
    • Apr 9, 2007
      Posts
      • Like Like x 2
      • Useful Useful x 1
      • May 17, 2011
        Posts
        I'll give HL2 a try, thanks guys. My map is so close to being done, so far I've managed to find work arounds for every other problem this update has brought. Now I gotta do this one too lol.

        EDIT: Map crashes HL2 when trying to load it =(
        nyronic, Apr 22, 2013 Last edited by nyronic, Apr 22, 2013
      • Jan 11, 2011
        Posts
        Hm... Got an idea that might work... I don't feel like testing it, but maybe...

        So, you buildcubemaps and seems to work fine; but when you load the map the cubemaps don't appear. This is most probably related to the new folders, and trying to add the cubemaps to the map in the old directory... Maybe, if you have a copy of the map placed in the old directory, with the same name, when you buildcubemaps this copy will recive them. If it does, then you should just copy this .bsp with the cubemaps on it back to the current /COMMON/Counter-Strike/CSTRIKE folder and see if it works.

        Could work, who knows? Let me know if you try it out. It would be fun if it worked. XD
        • Like Like x 1
        • Good Idea Good Idea x 1
        • May 17, 2011
          Posts
          Believe it or not I actually JUST tried this right before seeing your post, I thought maybe it was having a path related issue as well. It didn't work though =(

          EDIT: On a side note, it probably still is a path issue. In the console it shows that its saving all the .tga files in common/counter-strike source/cstrike/materialsrc/maps/mapname

          I can open this folder and see the files appearing and disappearing as buildcubemaps is running.

          EDIT: I can open common/counter-strike source/cstrike/material/maps/mapname and see the .vtf's being created as well. The folder fills up until its done, and then they all vanish as if being moved somewhere by bspzip, but apparently not in the .bsp.

          EDIT2: More info, I put the map in /download/maps/, made sure there was no copy in /custom/ or /maps/. Ran buildcubemaps and it made a new copy of the map in /maps/. I deleted the one in /download/maps/ and then reloaded, it still didn't update and was using default cubemaps.
          • Mapping King Mapping King x 1
            nyronic, Apr 22, 2013 Last edited by nyronic, Apr 22, 2013
          • May 17, 2011
            Posts
            I decided to use a process monitor on hl2.exe while I ran buildcubemaps in the console.

            I'm not an expert on this sort of stuff but near the bottom it looks like it's trying to copy the .vtf's into the bsp, but comes up with PATH NOT FOUND.

            If anyone knows of a way to buildcubemaps without the .vtf's being auto deleted when its done, I could import them into the .bsp manually. Is there some way to monitor a folders contents and automatically copy them as they appear? lol

            [IMG]
            nyronic, Apr 22, 2013 Last edited by nyronic, Apr 22, 2013
          • Apr 9, 2012
            Posts
            HL2 is the only way. It'll be much easier for you to solve HL2 not crashing than trying to make cubemaps work in cs:s while Valve is gonna have to fix it themselves anyways.
          • May 17, 2011
            Posts
            I don't know where to start for fixing HL2. It just crashes with a hl2.exe has stopped working error. Something in the CSS map it doesn't like.
          • May 17, 2011
            Posts
            I defeated the CSS Update Boss.
            • Funny Funny x 1
            • Winner Winner x 1
            • Feb 19, 2012
              Posts
              tell us more
            • May 17, 2011
              Posts
              Well I figured out how to get cubemaps finally, but it's a long tedious process and you should only waste your time with it if:

              - you can't find a better alternative
              - final compile of your map that you will release
              - you REALLY want cubemaps


              In my previous posts, I discovered where the .vtf's were being generated. Which is "cstrike/materials/map/mapname", but once it finishes generating them, it attempts to move them into the .bsp and it deletes the ones in the folder. Problem is the moving into the .bsp part is broken.

              1. I opened this folders permissions and set it so nothing is allowed to be deleted.
              2. Went in game and ran buildcubemaps, they generated like normal. Except this time the vtf's remained in the folder!
              3. Imported them into the bsp with PackBSP.

              Sounds easy enough but it becomes a huge pain!

              A quick note before I continue, when you compile your map it actually generates default cubemap .vtf's inside the BSP, which are just black squares. The command buildcubemaps is supposed to replace all of these with the screenshots it takes.

              Now here's where I had more problems, it's about 150+ files to import. First I tried pakrat because pakrat can import whole folders of files at a time, problem is it doesn't overwrite and you end up with duplicates inside of the .bsp. I tried running the map and I still had default cubemaps, I opened it with pakrat again and deleted all of the default pre-existing black cubemaps, but this ended up completely breaking the bsp(error signs everywhere, weird glitching wireframe teleporting into weird angles all over the place, completely broken).

              So pakrat wasn't going to work, I tried bspgui which had the same exact problem so no go there either.

              Next up is PackBSP, PackBSP has the ability to manually import files it doesn't automatically detect, and it correctly overwrites them too. The problem here is PackBSP doesn't have a folder import option, or multi-file. I was forced to import around 150+ .vtf files 1 by 1 into the bsp, but it worked.

              And that's how I beat the CSS Update Boss, but it took a bit of OCD to do it.
              • Winner Winner x 2
              • May 31, 2012
                Posts
                I just noticed we have a normal /maps folder in /cstrike and, from what I've just tested the game's dumping the .bsp resulting of the buildcubemaps command there. That may save some hassle, I believe.
              • Mar 8, 2013
                Posts
                bump. any better way to do this?
              • May 31, 2012
                Posts
                As I posted here:
                1. Compile
                2. With the game closed, open the map with Pakrat
                3. Filtering by the type of packed files, delete all the files of type 'Texture'
                4. Save the map
                5. Open it ingame, buildcubemaps, check /cstrike/maps (I am using only /cstrike/custom/all as my main folder, so my maps only go to /maps when I buildcubemaps, forcing myself to copypaste)
                • Useful Useful x 1
                • Mar 8, 2013
                  Posts
                  cheers, that worked! although now I have a problem with the pink/black checkered texture appearing in parts of my reflections for some reason.
                • May 31, 2012
                  Posts
                  That's the error texture showing. I'm guessing you didn't delete all 'Texture' files in Pakrat, or you maybe deleted some materials along with it. If you're compiling HDR make sure you compile both HDR and LDR cubemaps, since I've ran into some issues doing this cheap trick and building HDR only.