Buildcubemaps Crashes Game
You can find it under: Tools >> Options >> Build Programs Tab >> "Place compiled maps in this directory before running the game".
Change the path to:$SteamUserDir\portal 2\portal2_dlc1\maps
but this is a more of a "why should we have too?" Valve is not maintaining the tools.
You guys should make sure that the same filename isn't present in the former maps folder. Else Portal will still crash while building cubemaps. You have to delete the former saved file from said folder first or move it to the: SteamUserDir\portal 2\portal2_dlc1\maps folder,
Seems as if the file is primarily loaded from the former folder if two identical file names exist.
That should really work!!!
@ Robdon
Quote:
So, am I right in saying that Cubemaps are for only 'old graphics' cards... and pretty old if DX9 is the requirement.If so, that explains, why I've never been able to see ANY difference to my maps if I include/build cubemaps or not.
Is there some way to make my 'good' card simulate the 'bad', so that I can test it? otherwise I will never know if I have it right or not.
Rob.
I can't think of any reason why you might have experienced that except for improper env_cubemap placement (no cubemaps at all) or that you haven't restarted Portal and the cubemaps have still been cached.
http://developer.valvesoftware.com/wiki/Cubemaps
Quote:
Note: If you run a recompiled copy of the same map without restarting the game, the cubemaps from the previous version will still be cached, making it appear as if cubemaps do not need to be rebuilt. These cubemaps are not in the map, however, as running the map again on another computer or after restarting the game will reveal. Every new compile wipes out all packed content, including cubemaps.
However typing buildcubemaps alone isn't the proper way for creating cubemaps Valve suggests:
mat_specular 0
buildcubemaps
The reason I didn't see much difference, was because I was looking at my water and 'flat glass', and indeed, cubemaps seem to have no effect on them.
I then tested with a glass tube and cubedropper with a light bridge close by, and then, I could see the effects. 
Neco, I think your commands are actually for TF2, not portal, and the last one doesnt even work in portal, "Unknown command: mat_reloadalltextures".
But, I used the method that Valve suggests for HDR + some working around because of the current bug that crashes the game, since dlc.
This is what I did:
Firstly, if your map source is in \sdk_content\maps, then when compiling there will be 2 copies of your bsp file, one in that dir, and another in the main run dir "C:\Program Files (x86)\Steam\SteamApps\common\portal 2\portal2\maps"
1) Delete any previous bsp files of you map, from BOTH dirs.
2) Place env_cubemapes in your map and compile the map in Hammer, with HDR.
3) Close Portal2, Start it again
5) Console command: map <your_map_name>
4) Console command: mat_hdr_level 2 (to make sure you are in HDR mode)
6) Copy your bsp file from "C:\Program Files (x86)\Steam\SteamApps\common\portal 2\portal2\maps" to "C:\Program Files (x86)\Steam\SteamApps\common\portal 2\portal2_dlc1\maps"
6) Console command: buildcubemaps (this update the bsp in "C:\Program Files (x86)\Steam\SteamApps\common\portal 2\portal2_dlc1\maps"
7) Copy the bsp back to the main dir overwritting it, from "C:\Program Files (x86)\Steam\SteamApps\common\portal 2\portal2_dlc1\maps" to "C:\Program Files (x86)\Steam\SteamApps\common\portal 2\portal2\maps"
8) Console command: mat_hdr_level 0
9) Console command: map <your_map_name>
10) Console command: buildcubemaps
11) Copy the bsp back to the main dir overwritting it, from "C:\Program Files (x86)\Steam\SteamApps\common\portal 2\portal2_dlc1\maps" to "C:\Program Files (x86)\Steam\SteamApps\common\portal 2\portal2\maps"
12) Console command: mat_hdr_level 2
13) Comsole command: map <your_map_name>
Once/if Valve fix the crashing problem, then you can remove all the steps with copying the bsp around, but basically before and after 'buildcubemaps' you need to copy to/from the dlc dir and reload.
That seems to work for me now.
Rob.
Robdon wrote:
Neco, I think your commands are actually for TF2, not portal, and the last one doesnt even work in portal, "Unknown command: mat_reloadalltextures".
That was only mistyped. I actually meant 'reloadtextures'. That's what I usually use. By changing the path in Hammer as descirbed above, you can do without all that trouble copying the files.
iWork925 wrote:
Still crashing even with the map in the dlc folder.
If you've tried in the dlc folder only and it still crashes, I've no idea.
The emphasis is on only because, as I've tried to explain the same filename may not be still existing in the former maps folder.
Try creating a brandnew file with a unique filename after having changed the path to:
$SteamUserDir\portal 2\portal2_dlc1\maps
and build your cubemaps with that test bsp-file. In other words one has to move all the custom map files to the dlc-folder first and change the path afterwards, making sure that the custom maps are removed from where they were (the usual map path used prior to the update).
If a file exists in both folders, Portal loads those files first and crashes!!!
My game also still crashes after generating the cube maps, but they do show up the next time the map is loaded, so luckily the crash happens after saving the cube maps to disk.
iWork925 wrote:
Have moved to dlc folder, and removed every trace of it in the original. Still my water and glass tubes look shithouse.
I wonder if building cubemaps through another game/engine will work?
Try launching the map in alien swarm.
If I'm not mistaken the workaround only works if you either copy the full path from the explorer or 'browse' from the options menue (Build Programs) to the \portal2_dlc1\maps folder.
Seems as if copy/pasting this line: $SteamUserDir\portal 2\portal2_dlc1\maps alone doesn't work.
Maybe Hammer must be allowed to convert the full path to: $SteamUserDir\portal 2\portal2_dlc1\maps internally. No idea why!
You guys might try it like that...
I had the error too but I then saved the VMF file to the \portal2_dlc1\maps folder and ran it from there. I was then able to run buildcubemaps without the error.
I recommend all you guys out there for testing your cubemaps: use the Half-Life 2 cubemap weapon. It's not included in Portal 2, but you can do this by yourself.
http://erik.gmod.de/Eriks%20Zeug/Modell ... _Weapon.7z
Explaination is in the readme.txt
Oh and the portal_dlc method works perfect.
You also can see that you have to put your map there, because if you build cubemaps and Portal 2 is done, an error will appear in the console and the game tries to get your map from the DLC\maps folder.