Please or Register to create posts and topics.

Making Cubemaps and Bonus Map Scripts Work Together

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.

Link, mah boi, this peace is what all true warriors strive for!

:potd:

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

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)

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.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.
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.

Made Logic Portals in early 2008. Making diportals in 2011.
Author of Minecraft mods (MAtmos, Minaptics, NoteSlider) and Garry's Mod addons (Gunstrumental, SharpeYe, GarryWare, DepthHUD).
Hurricaaane wrote:
One question: Did you close Portal?

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

Link, mah boi, this peace is what all true warriors strive for!

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.

Currently working on Darksiders 3.

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!