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.

Building cubemaps breaks compile settings

Discussion in Mapping Discussion started by JorisCeoen, Sep 23, 2013

  1. Apr 9, 2012
    Posts
    @enviolinador I have a problem with my cubemaps. It's not really the cubemaps, but it's more the effect of opening and resaving my bsp after removing the 'Texture' ones from the bsp...

    No matter what I do, if I remove those, all of my final compile settings are gone, in other words staticproplighting (vertex lighting which makes the difference between a visually compelling map and a trashbin) gets removed and the entire cathedral is uniformly lit, being incredibly ugly and I also have 2 models randomly flickering, dealing with lighting problems :S

    I'm not sure if that is supposed to be, I want to know if anyone else stumbles across this problem...
    This happens with either pakrat or VIDE, so I suppose those texture materials are there for a reason.
    JorisCeoen, Sep 23, 2013 Last edited by JorisCeoen, Sep 23, 2013
  2. May 31, 2012
    Posts
    Increase the lightgrid on a few areas, preferably dark/shadowed areas that won't be seen lit at all.
  3. Apr 9, 2012
    Posts
    Thanks to remind me on that, it's true that I didn't do that yet on less lightened areas. The problem was something I oversaw as I never really tended to think of it, but I disabled HDR in my options yesterday to test the difference in between them, and if you then open you compiled map while HDR stands off, it becomes fullbright xD

    I'm sorry for the trouble of having this thread on, that's why I asked to lock it, but thanks for the help! I should be lowering some lightgrids indeed!
  4. Jan 11, 2011
    Posts
    • Agree Agree x 1
    • May 31, 2012
      Posts
      Well, I believe -Syo has had this problem a lot- that when you delete things from the pak, it breaks at times if you delete multiple times and then add... What I usually do for simplicity is compile, open the map with pakrat, sort by file type and delete all the textures. I save and open up the game. As you're compiling HDR, I'd have mat_hdr_level 2 (I prefer to compile HDR first). Then I type in the following sequence of commands (remember to have sv_cheats = 0 or the game will be able to reload the textures and shit will break because you'll have HDR cubemaps and not LDR or vice versa or they'll just break completely, it happened to me twice):
      Code:
      map yourmap
      buildcubemaps
      disconnect
      mat_hdr_level 0
      map de_dust2
      map yourmap
      buildcubemaps
      disconnect
      map de_dust2
      mat_hdr_level 2
      
      Afterwards I go to /cstrike/maps (where the .bsp with the cubemaps is, I'm using /custom/all/ for everything and for general tidiness I move the maps after building cubemaps to that directory) and drag the map to my other folder. I close the game, reopen it (or at times reload materials, but the best way to ensure nothing goes wrong is restarting it) and load the map. Cubemaps are there.

      EDIT: I use disconnect + de_dust2 to ensure that I am closing the local server and to go to another map and see the console saying 'sv_cheats not 1, I can't reload materials'. Just to clarify.
    • Mar 30, 2012
      Posts
      I love it how you changed the topic completely.
      [IMG]
      • Funny Funny x 1
      • Apr 9, 2012
        Posts
        The thing is, I compile, then I open with Pakrat, I remove the texture files (both normal and HDR ones). Then I save under another name to not corrupt the file by saving it over another one, and then when I open my map in CSS, all of the lighting is bugged, and there's no way around it. I tried all. The only moment where it doesn't do that, is when I open it in pakrat, I remove nothing (I don't add anything at this moment because I don't need to) and then save it, then open it in CSS. Nothing is bugged, but nothing has changed as well, which leads me to think the Texture files are related to the lighting in maps.
      • May 31, 2012
        Posts
        Don't rename. If you're deleting the .vmts, stop doing it (you only delete the .vtfs, otherwise the map blows up). Texture files aren't related to lighting in maps at all from what I know (from this: http://www.bagthorpe.org/bob/cofrdrbob/bspformat.html although I didn't read it in detail because I was only interested in seeing if it was possible to alter a lump -the cubemap lump- to add cubemap locations and be able to add cubemaps to classic maps that I fix with EntSpy), since lighting is stored in completely different lumps by means of the lightmap(s?).
      • Apr 9, 2012
        Posts
        That's actually true. It's probably not, but no matter what I do, deleting any of those vtf's breaks my map :frown:
      • May 31, 2012
        Posts
        Take a few screenshots of the broken map.
      • Apr 9, 2012
        Posts
        The way it should be before changing:[IMG]

        Aftermath:
        [IMG]

        I mean, look at the shadows. In the first image the prop_statics all have nice lighting and receive shadows perfectly, just like the final compile settings do. The below image shows that vertex lighting gets removed entirely. It's terrible xD Currently I don't mind it, but it's a burden I can't use it, as I require some effects to have an idea of the completely final picture inside the cathedral. I mean I built the map in that way that it would run extremely fine at HDR (170FPS), and I compile both settings so people without HDR have no trouble playing. Without HDR it's 230FPS so slower PC's will have no trouble running it...

        But I can't stand a map not having specular reflections :-/ I normally also use custom cubemaps (I don't actually use the cubemap entity, but I did now just to test out something) but that method doesn't work in HDR as those envmaps make the reflection full-bright :reallypissed: How could Valve even live with their own engine god damn...
      • May 31, 2012
        Posts
        Just to ensure, the second pic is with cubemaps built or with cubemaps removed but not rebuilt?
      • Apr 9, 2012
        Posts
        Removed pre-built cubemaps but not rebuilt. I tried that already, I though it might fix it, but it didn't. After completely doing all you said, it just gave me cubemaps but with the broken lighting remaining. I mailed Tophattwaffle as well as he was the founder of this workaround.
      • May 31, 2012
        Posts
        The first part is weird... Are you sure you didn't have the old files cached?

        I doubt you can call tophatwaffle the 'founder' since some people -myself among them- found it by themselves.
      • Apr 9, 2012
        Posts
        I'm very sure :frown:
      • May 31, 2012
        Posts
        Well, I'd suggest taking a look at your .vmts as perhaps there it lies the solution. Just to point it out, when you delete the textures you should see broken cubemaps on the models (you know, like on any hannibal map ever, that, heh). I can't see them in your pics, so perhaps some of your vmt parameters are weird/interphering with both the vertex lighting and the cubemapping?
      • Jan 13, 2013
        Posts
        Skynet strikes again!
      • Apr 9, 2012
        Posts
        Well... there's something you mention over there... I came to the fact that there are no vmt's or vtf's AT ALL when I open my bsp in pakrat or VIDE.
        SSBB on the other hand, does contain all of those...
      • May 31, 2012
        Posts
        There lies your issue then, probably... Perhaps you're compiling with some missing parameter?
      • Apr 9, 2012
        Posts
        Hmmm, I checked everything and there should be nothing wrong.

        Enviolinador, many thanks to try solving this out for me. I'm gonna give up for the first time in my life on an issue I've been dealing with since 7 houres this day. I will just resort to not using any cubemaps at all. They are not primary elements but it's a pity I can't use them. I will not try to fix something that Valve themselves have to fix in the first place.

        Either way I compile with LDR but many nice effects fade away but I can use shiny surfaces, or I keep HDR and just not use cubemaps at all. Not sure what to do, I'll find that out myself by the time the map is done. Maybe by then they fixed something, I don't know. Really, it's the first time I stumble across a problem, and I can't solve it. :frown:
        Post Merged, Sep 23, 2013
        There is one last lead though, I have just found a guy who apparantly has a fixed version of VSBP.exe which prevents the use of pakrat and needing to delete the black vtf-cubemaps... That could be THE solution in my scenario.
        Post Merged, Sep 23, 2013
        No... Fucking... Way...

        IT WORKED (*celebrates while fireworks are being present in the background*)

        Thank you so much for trying to solve it for me! It sure made me look into the whole thing, and at least I know what happens and what should not happen :smile:

        This guy is a genious omfg