Making Cubemaps and Bonus Map Scripts Work Together

Avatar
Korjagun
122 Posts
Posted Nov 27, 2007
We've all had troubles with cubemaps not quite working when the maps are placed in folders other than maps/. After a little monkeying around, I think I've made it work. The following procedure works for me.

1) Compile your map to maps/foobar.bsp. Do not place it into a different folder yet.
2) Run the map using the console command map foobar.
3) Run buildcubemaps.
3b) Run buildcubemaps for the other light setting. (LDR/HDR)
4) Move maps/foobar.bsp to maps/yourfolder/foobar.bsp.

Now you can run the map using either map yourfolder/foobar or using the Bonus Map interface if you have BNS's set up, and your cubemaps will work.

Caveat Emptor: The above procedure worked for me. If it doesn't work for you, post about it and we'll see where we went wrong.

Advertisement
Registered users don't see ads! Register now!
Avatar
msleeper
4,095 Posts
Member
Posted Nov 27, 2007
Replied 1 minute later
Avatar
volt
104 Posts
Posted Nov 27, 2007
Replied 1 hour later
Yeah, I can vouch for this. When you use buildcubemaps in console on your maps, the engine writes the cubemap information directly into the BSP.

Try buildcubemaps on an official map - it will tell you that it can't because the official maps are write protcected.

(hint: the information in the original post has been available on SDK wikipedia for ages)

Avatar
msleeper
4,095 Posts
Member
Posted Nov 27, 2007
Replied 1 minutes later
How to build cubemaps isn't the issue, it seems that there have been conflicting information and how-tos on how to build your cubemaps and also have the map be compatable with the Import Map option and/or Bonus Maps scripts, or having your map in a subdirectory, or any combination of the 3.
Avatar
Hurricaaane
189 Posts
Posted Nov 28, 2007
Replied 7 hours later

Korjagun wrote:
4) Move maps/foobar.bsp to maps/yourfolder/foobar.bsp.

Now you can run the map using either map yourfolder/foobar...

One question: Did you close Portal?

If you didn't, start the map again. Because some days ago msleeper and me found that when you buildcubemaps in the maps/ folder and then you start the map on a subdirectory, even if you don't buildcubemaps the subdirectory file, it works, if you don't close Portal.

Avatar
Korjagun
122 Posts
Posted Nov 28, 2007
Replied 15 minutes later

Hurricaaane wrote:
One question: Did you close Portal?

It works even if you start the map fresh after closing and restarting Portal.

Avatar
MrTwoVideoCards
584 Posts
Posted Nov 28, 2007
Replied 1 hour later
This method is the one I've always used, i compile under portal, then when the map is finished, pack the map straight into a folder.
Advertisement
Registered users don't see ads! Register now!
Avatar
Remmiz
631 Posts
Posted Nov 28, 2007
Replied 5 hours later

Just to be safe, this is what I do:

  1. Compile map and leave it in default maps folder
  2. Open, make sure it doesn't create any saves
  3. Run buildcubemaps for LDR and HDR (this will create a save file)
  4. Completely exit Portal, delete all the save files for the map and move it into the correct folder
  5. ???
  6. Profit!