Buildcubemaps Crashes Game

Avatar
spongylover123
944 Posts
Posted Oct 19, 2011
Replied 56 minutes later
Put your maps in the dlc folder?
Advertisement
Registered users don’t see ads! Register now!
Avatar
iWork925
1,080 Posts
Posted Oct 19, 2011
Replied 2 hours later
doesnt work.
Avatar
neco
134 Posts
Posted Oct 20, 2011
Replied 3 hours later
I changed the path in Hammer to: $SteamUserDir\portal 2\portal2_dlc1\maps, that works for me.
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
Avatar
iWork925
1,080 Posts
Posted Oct 20, 2011
Replied 1 hour later
this still doesnt work for me...

but this is a more of a "why should we have too?" Valve is not maintaining the tools.

Avatar
Marise
249 Posts
Posted Oct 20, 2011
Replied 6 hours later
I am taking a break from mapping until this is fixed. Gives me more time for other things, anyway.
Avatar
neco
134 Posts
Posted Oct 20, 2011
Replied 1 hour later

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

mat_specular 1 mat_reloadallmaterials mat_reloadalltextures It really makes a difference (don't ask me why). Besides it isn't that tedious since you can repeat the procedure by using the arrow keys the next time without typing the whole commands again. Only need to press enter when the command appears. Hope this helps...
Avatar
Robdon
204 Posts
Posted Oct 20, 2011
Replied 5 hours later
Ok, So... I've been experimenting...

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. :smile:

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.

Avatar
neco
134 Posts
Posted Oct 20, 2011
Replied 1 hour later

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.

Avatar
iWork925
1,080 Posts
Posted Oct 20, 2011
Replied 1 hour later
Still crashing even with the map in the dlc folder.
Avatar
neco
134 Posts
Posted Oct 21, 2011
Replied 3 hours later

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!!!

Avatar
HMW
806 Posts
Posted Oct 23, 2011
Replied 2 days later
I just tried it. (Remove map from portal2/maps, recompile to portal2_dlc1/maps, build cube maps).

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.

Avatar
iWork925
1,080 Posts
Posted Oct 23, 2011
Replied 1 hour later
Have moved to dlc folder, and removed every trace of it in the original. Still my water and glass tubes look shithouse.
Avatar
ChickenMobile
2,460 Posts
Posted Oct 23, 2011
Replied 6 hours later

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.

Avatar
neco
134 Posts
Posted Oct 24, 2011
Replied 7 hours later
Since I still can't understand why the above described method of changing the path doesn't work for others, I tried to search for reasons and think I finally found a probable reason.
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...
Avatar
spongylover123
944 Posts
Posted Oct 24, 2011
Replied 6 hours later
Don't put the map in the portal2_dlc1 folder, instead, put it in the update folder, from now on, this is where you put your maps to build cubemaps, and put vpks in your new addons folder?
Avatar
Moth
225 Posts
Posted Oct 30, 2011
Replied 5 days later
Proof?
Avatar
gamecreator
14 Posts
Posted Nov 09, 2011
Replied 10 days later
If anyone looks here like I did...

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.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Skotty
671 Posts
Posted Nov 10, 2011
Replied 15 hours later

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.