Help! The site looks different!

Wonder what's going on? We've migrated the site to a new codebase. Please read the following letter: SFMLab Migration 2020

Note: SFMLab now uses Open3DLab Network accounts. (SmutBase and Open3DLab accounts) If you do not already have a SmutBase or Open3DLab account, please sign up through this link. Once your new Open3DLab Network account has been created, please log in and take a moment to link your old SFMLab account to your newly created account.

CubeMapper - Easily build cubemaps

 Large preview image for CubeMapper - Easily build cubemaps

Show more
 Large preview image for CubeMapper - Easily build cubemaps


Have you ever compiled a map for SFM only to see glowing rainbow blobs everywhere? Or no reflections showing up at all? No worries, with CubeMapper, building cubemaps has never been easier! </infomercial>

CubeMapper is a simple tool that allows building cubemaps (reflections on models and world geometry) without much hassle involved. It uses Portal 2's similar engine to do what SFM always dreamed of doing: allowing amazing reflections in your posters for any map! Before you start wondering why you wouldn't be doing this directly in SFM: it simply doesn't work. [1] [2]


  1. Create a map. Place env_cubemaps into it (crank up the resolution of those to 256x256 if you don't mind huge files). Be sure it is saved inside of one of SFM's mod folders (like game/usermod/maps/blah.bsp). The name should not be longer than 30 characters total
  2. Compile your map using SFM's Hammer Editor (be sure not to rename your file after compiling it!)
  3. Open CubeMapper.exe
  4. Drag&Drop the map file you wish to create cubemaps for into the input textbox (or just browse for it)
  5. If the portal2.exe did not get set automatically, do so yourself
  6. Go to Edit Mods and make sure only the mods you really need are enabled, since more mods means more loading times, and may cause conflicts (Portal 2 is always loaded)
  7. If no other warnings show up under the Notes section, press Start and wait for Portal 2 to launch
  8. Once the map loaded, press F1, sit back and relax
  9. Once Portal 2 closed itself, go into SFM and enjoy your amazingly reflective map!


Q: Why does the program not launch?

A: CubeMapper requires the .NET Framework 4.5.2 or later. Download here! Also make sure all files from the ZIP are extracted to a folder and not run from inside the archive.

Q: Why does Portal 2 instantly close when I press F1?

A: Your screen resolution probably is too small (width and height have to be >1024 pixels). Add the following lines to the end of the Arguments textbox: -w 1025 -h 1025 -windowed

Q: Portal 2 crashes on startup?

A: Be sure that CubeMapper is run as an administrator.

Q: Everything is purple-black checkerboards and errors?

A: Portal 2 has to be installed in the same Steam library folder as Source Filmmaker in order for the files to be found, since only relative paths can be used in gameinfo.txt files. You may also simply need to enable the mods which are responsible for the content that is missing (see the Edit Mods dialog).

Q: What if I don't own Portal 2?

A: I personally have never tried, but according to others, Alien Swarm works as well and is free. See if it works out for you!

Q: My map doesn't look reflective! Why do you lie to me?

A: If you follow the instructions above, everything should work out. If you are trying it on a map you didn't compile, it may be related to other files being packed into the BSP or the map simply not having cubemaps to begin with. Shining SFM lights onto your surfaces may also cause them to look less reflective. SFM also seems to cache cubemap data, so try restarting SFM or running mat_reloadallmaterials after building your cubemaps.

Q: What are these glowing orbs in my reflections?

A: I am not sure what causes them, but they show up on every light entity. It may be intentional, to better show lights in reflections, but who knows.

Q: Can I see the source code?

A: Once someone actually asks this, I'll release it. Since there's not many people interested in that kind of thing, setting up a git repository just for the sake of having it is not worth the effort, in my opinion.

Filename Downloads Created Filesize
🇳🇱 EU Download
🇨🇦 NA Download
39 2016-08-27 181.07 KB
🇳🇱 EU Download
🇨🇦 NA Download
39 2016-08-29 181.08 KB
🇳🇱 EU Download
🇨🇦 NA Download
39 2016-09-07 184.91 KB
🇳🇱 EU Download
🇨🇦 NA Download
93 2017-05-11 186.91 KB
🇳🇱 EU Download
🇨🇦 NA Download
38 2020-03-01 676.61 KB
🇳🇱 EU Download
🇨🇦 NA Download
39 2020-03-11 39.6 KB
Thumbnail image for CubeMapper - Easily build cubemaps


this seems amazing.
Reply • Aug. 28, 2016, 7:50 p.m. -  radroachhd
Can I see a video with this amazing thing?
Reply • Aug. 30, 2016, 6:52 a.m. -  ilzm
The mods list in "Edit Mods" is empty for some reason, so every map I load is full of missing stuff. Did I miss something?
Reply • Sept. 7, 2016, 1:38 p.m. -  splishevsky
@ShawaZawa It isn't really easy to make programs work 100% flawlessly on every setup without anybody to test it. I appreciate the feedback, but can't really help to make it better without any clear reports of what is not working (for example, "doesn't properly copy materials", it isn't even supposed to copy anything over, since it loads the data using gameinfo.txt entries). I have updated the program since, so that might have fixed some issues you were having with it. @modesskiy774 What do you mean that it doesn't work with models? If you have at least one `env_cubemap` in your map (which doesn't have any faces marked) and the model uses the entry `$envmap env_cubemap` in its VMT file, the cubemaps should work fine. If they look like your skybox texture, you don't have any cubemaps in your level or all cubemaps have faces assigned to them. If it looks like the default cubemap, then building cubemaps didn't work correctly (might be caused by another engine version being used to compile the map). But yeah, moving cubemaps and the like probably won't ever be possible in SFM. The closest you can get to having those is indeed by using something like rendertarget cameras. @splishevsky I have launched a fix that should allow you to, even if your gameinfo.txt still can't be read or found, add your mod entries manually.
Reply • Sept. 7, 2016, 4:31 p.m. -  RedMser
@RedMser - You act is if I didn't read your tutorial text steps. I did it all but it didn't work. I guess i'll wait for a tutorial or somethin.
Reply • Sept. 8, 2016, 1:43 a.m. -  Sub
@ilzm @Sub I plan to record a short tutorial video on how to add cubemaps to a custom made map. The same can be done to existing maps if they already have cubemaps in place, otherwise you'd need to decompile and recompile. If you can follow text tutorials, a short how-to is in the description.
Reply • Sept. 2, 2016, 5:48 p.m. -  RedMser
This program seems to resemble Crowbar a lot, as in it borrows something from the game and acts as a shortcut to controlling it and giving the user the ability to produce results they wish. the only sucking part is that this doesn't work for models. Someday, we should have the ability to fake PBR with a moving cubemap based on location, but for now, I can only fake PBR using the Blinn method and the RT_camera Blinn method.
Reply • Sept. 6, 2016, 9:09 p.m. -  modesskiy774
I don't know if it's just me, or this tool doesn't work because it doesn't fix the cubemaps, when I pressed F1, yes, the cubemap building works, but it close itself without overwriting the existing map.
Reply • Dec. 1, 2016, 4:28 p.m. -  deceptor666
Very handily, thank you very much kind sir! ;D
Reply • May 11, 2017, 10:27 p.m. -  Hi_im_a_Weeaboo
Although I use this with Portal 2, you say it's possible to use Alien Swarm. However, I'm trying to help someone do that, and it keeps looking for Alien Swarm's gameinfo.txt at "-/Alien Swarm/Portal 2/gameinfo.txt" rather than "-Alien Swarm/swarm/gameinfo.txt", and there's there's nowhere I can see to set that. (I can see places to set SFM's gameinfo path, but not Portal 2's). Now, normally I'd expect the "-game" launch option to be able to override the gameinfo.txt path, but it doesn't seem to work in this case. If this can indeed be used with Alien Swarm, what is the correct process?
Reply • Nov. 11, 2017, 1:27 a.m. -  RagnarokEOTW
It's not working for me. I've followed all the instructions, but while loading the game, Portal 2 simply closes.
Reply • Dec. 11, 2017, 9:18 p.m. -  SolidierSnake
Reply • May 8, 2019, 7:26 p.m. -  hisrqjfx
Okay i heff a Q How to put all materials from map to portal?? bcz cubemaps created with full purple errors bcz no mats at portal folder and i rly dont want to dupe all mat files twice
Reply • Aug. 18, 2019, 5:32 p.m. -  zccblp
| normal moved 1 pixel right Same when build cubemaps, on cubemap preview theres like 1 side of cubemap rendered with walls, other without walls
Reply • Sept. 23, 2019, 7:29 a.m. -  zccblp
Dem solution was on description :DDDDDDD
Reply • Sept. 22, 2019, 8:57 p.m. -  zccblp
And again some Q... Anyone knows why my cubemaps builds without walls??? when i enter portal - theres like NO walls and floor textures on some camera angles, resulting cubemaps builds half without walls and as resuld has a crappy AF effect ??
Reply • Sept. 22, 2019, 9:32 p.m. -  zccblp
How do I make sure I'm running the program as an administrator?
Reply • March 30, 2020, 10:22 p.m. -  TMBCyberman
I'm running the program as an administator but Portal 2 still instantly closes! HELP!
Reply • March 30, 2020, 10:27 p.m. -  TMBCyberman
Running the program, sets up everything correctly, launch Portal 2, Portal 2 stuck on loading. Something wrong ? I made sure to launch as an administrator. Help please !
Reply • May 19, 2020, 11:51 p.m. -  cilenomon

Leave a comment

You need to log in if you want to leave a comment.