[TUTORIALS] Compiling VMFS and Building Cubemaps!

ColonelColonel Finger Lickin' GoodPVKII Team
edited May 2018 in Community Maps
The PVKII Standard.

By now you should have good knowledge on Hammer and compiling, so everything below should come easy to unders

Advanced Compile Parameters Reference (vrad)
-both -final -staticproppolys -textureshadows -staticproplighting

Batch Compile Method

Should you wish to compile outside of PVKII Hammer editor, you can use a notepad file saved as a .bat.

Here is a file for download which you will need to customize to your liking. Everything with the mark "[INCOMPLETE]" should be removed and adjusted per your settings. 

Right click and select "Edit" to make changes to the .bat file.  

Remember to optimize your map before compiling. Func_detail, hint/ skip brushes etc greatly speed up vvis during compile. 

Buildcubemaps Methods

Try Part B below first, if you have issues you may need to try part A then B. If you still have no success, you may need to apply the cubemap fix below.

A) Getting rid of the old broken cubemaps.
Steampipe update broke the cubemaps. The "Cubemap fix for 2013" in the Colonel's post below might fix them. Here is another fix which I (Miggog) think is better:

Before building new cubemaps we need to delete all the old cubemaps from your map. Here's how:

1. Download and install pakrat. http://www.bagthorpe...bob/pakrat.html
2. Compile your map. Close pvkii if your map started after compile.
3. Open the your map's .bsp file found in maps directory with pakrat.
4. Delete all the cubemap files in the list. They are marked with a "texture" label.


5. Save and overwrite your old bsp.
6. Proceed with the part B )

B ) Building new cubemaps. Omit the "< and >" from these console commands

Load PVK2.
Open console
mat_hdr_level 0
mat_specular 0
map <mapname> (the one you want to buildcubemaps with)
map <othermapname> (just to reload the materials, any testing map is enough) (ex: map bt_island)
mat_hdr_level 2
mat_specular 0
map <mapname> (the one you want to buildcubemaps with)
map <othermapname> (again, just to reload the materials) (ex: map bt_island)
map <mapname> (the one you want to buildcubemaps with)
mat_specular 1
Load Pvk2
Load map!

You must exit PVKII to save your cubemaps. Relaunch the game and map to see them fully built!

If you continue to have issues w/ saving you may need to type in sv_cheats 1 before building cubemaps. Alternatively, try Part A then B.


Spockjedi on cubemaps
...Turning off the specularity before rendering the cubemaps is important because otherwise the engine will "photograph" the pink-black checkboard, resulting in ugly cubemaps.
I had to compress the sky that way because if I saved it in a way that the engine could create the default cubemaps, the file size would be 36 MB!
But don't worry, just disable the specularity before creating the cubempas and you'll get perfect cubemaps

Co-Lead | Level Designer


Sign In or Register to comment.