Pt-br/Cubemaps: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Links)
(Tradução BR adicionada (ainda em desenvolvimento))
Line 1: Line 1:
{{wip}}{{translate}}
{{wip}}{{translate}}
{{LanguageBar}}
{{LanguageBar}}
{{Todo|Needs info about Source 2 cube maps. See [[Draft:Cubemaps (Source 2)]].}}
{{Todo|Precisa de informações sobre os cube maps da Source 2. Veja [[Draft:Cubemaps (Source 2)]].}}


[[File:Env_cubemap.png|left]]
[[File:Env_cubemap.png|left]]
[[File:Specular.jpg|thumb|right|300px|An example of specular reflections on some models (exaggerated through {{cmd|r_showenvcubemap}}).]]
[[File:Specular.jpg|thumb|right|300px|Um exemplo de reflexos especulares em alguns modelos (exagerados por causa do {{cmd|r_showenvcubemap}}).]]
A '''cubemap''' is a texture that represents a three-dimensional rendering of an area. {{source|4.1}} uses {{ent|env_cubemap}} entities as sampling points to generate these textures, which are then integrated into the [[BSP|map file]]. Cubemaps, when [[#Building cubemaps|built]], are reflected on materials that use the [[$envmap]] parameter (surfaces such as reflective glass, tiles, water, etc.) A map without built or existing '''env_cubemap''' entities will instead use other kinds of "reflections" that don't properly depict it.
Um '''cubemap''' é uma textura que representa uma representação tridimensional de uma área. {{source|4.1}} usa entidades {{ent|env_cubemap}} como pontos de amostragem para gerar estas texturas, que são depois integradas no arquivo do [[BSP|mapa]]. Os cubemaps, quando [[#Building cubemaps|construídos]], são refletidos em materiais que usam o parâmetro [[$envmap]] (superfícies como vidro refletor, azulejos, água, etc.) Um mapa sem entidades '''env_cubemap''' construídas ou existentes usará outros tipos de “reflexões” que não o retratam corretamente.




==Building cubemaps==
==Construindo Cubemaps==
Building cubemaps is the process of generating textures to use as reflections. For technical reasons, this process isn't automated {{mapbase|in|addtext-front=''Except''{{nbsp}}}} and is up to the user to do so; until then, existing '''env_cubemap''' entities will remain unused and the map, depending on the game, will display either generic, black texture or [[Missing content|"missing" textures]] as reflections due to nonexistent cubemaps.
BConstruir cubemaps é o processo de gerar texturas para usar como reflexões. Por razões técnicas, este processo não é automatizado {{mapbase|in|addtext-front='' Exceto''{{nbsp}}}} e cabe ao usuário fazê-lo; até lá, as entidades '''env_cubemap''' existentes permanecerão sem uso e o mapa, dependendo do jogo, mostrará uma textura genérica, preta ou [[Missing content|texturas “ em falta”]] como reflexos devido a cubemaps inexistentes.
{{warning|{{clr}}
{{warning|{{clr}}
* '''FOR PEOPLE WITH EPILEPSY''': Building cubemaps on games running on Vulkan, such as {{l4d2|4.1}}, causes the screen to flash black and white violently. Also on systems with faster CPU/GPU <!-- confirmed with i5-12400F and RTX 3060 -->, building HDR cubemaps in pre-L4D branch games, such as {{css|4.1}}, even with Direct3D 9/DX9, will also flash the screen black and white repeatedly.
* '''PARA PESSOAS COM EPILEPSIA''': A criação de cubemaps em jogos executados em Vulkan, como {{l4d2|4.1}}, faz com que a tela pisque violentamente em preto e branco. Também em sistemas com CPU/GPU mais rápida <!-- confirmada com i5-12400F e RTX 3060 -->, a criação de cubemaps HDR em jogos do ramo pré-L4D, como {{css|4.1}}, mesmo com Direct3D 9/DX9, também fará a tela piscar em preto e branco repetidamente.
* If the {{Command|nav_show_ladder_bounds}} command was used before building cubemaps, the green boxes will also be baked into the cubemap.
* Se o comando {{Command|nav_show_ladder_bounds}} tiver sido usado antes da criação de cubemaps, as caixas verdes também serão incorporadas ao cubemap.
* If you are building cubemaps for {{Hl2|4.1}} (except episodes) after the '''20th Anniversary Update''', you must launch the game with {{code|-game hl2}} [[command line argument]]. Otherwise the game would attempt to access the {{code|episodic/maps}} ({{hl2ep1}}) map directory instead of {{hl2|1}} one, causing the game failing to save the built cubemaps into the map. Similarly, if you are building cubemaps for maps that are located in Episode One or Episode Two directory, launch the game with {{code|-game episodic}} (for EP1) or {{code|-game ep2}} (for EP2) respectively (or launch Episode One/Episode Two through Steam > Tools).
* Se estiver criando cubemaps para o {{Hl2|4.1}} (exceto os episódios) após a '''Atualização do Aniversário de 20 anos''', você deverá iniciar o jogo com {{code|-game hl2}} [[command line argument|argumento da linha de comando]]. Caso contrário, o jogo tentará acessar o {{code|episodic/maps}} ({{hl2ep1}}) em vez do diretório de mapas {{hl2|1}}, fazendo com que o jogo não salve os cubemaps criados no mapa. Da mesma forma, se estiver criando cubemaps para mapas localizados no diretório Episode One ou Episode Two, inicie o jogo com {{code|-game episodic}} (para EP1) ou {{code|-game ep2}} (para o EP2), respectivamente (ou inicie o Episódio Um/Episódio Dois em Steam > Ferramentas).
}}
}}


===Before building===
===Antes de construir===
{{Cleanup|Modern Source games, namely {{portal2|1}} and {{p2ce|1|nt=1}}, do not need all these complicated params and steps, at least in my experience -[[User:Equalizer5118|Equalizer]] ([[User talk:Equalizer5118|talk]]) 10:56, 22 March 2024 (PDT)
{{Cleanup|Os jogos Source modernos, nomeadamente {{portal2|1}} e {{p2ce|1|nt=1}}, não precisam de todos estes parâmetros e passos complicados, pelo menos na minha experiência -[[User:Equalizer5118|Equalizer]] ([[User talk:Equalizer5118|talk]]) 10:56, 22 março 2024 (PDT)
Also some Source games (such as CS:S), doesn't appear to require cheats to be enabled to build cubemaps. -[[User:Kr0tchet|leonidakarlach]] ([[User talk:Kr0tchet|talk]]) 02:50, 25 August 2024 (PDT)
Também alguns jogos Source (como o CS:S), não parecem necessitar que os cheats estejam activados para construir cubemaps. -[[User:Kr0tchet|leonidakarlach]] ([[User talk:Kr0tchet|talk]]) 02:50, 25 agosto 2024 (PDT)
}}
}}
{{Important|Maps for {{src13|4.1}} games and others, such as {{css|4.1}}, are known to include pre-built, blank cubemaps after being compiled (even if there are no '''env_cubemap''' entities in them); these should be deleted before building new ones, as detailed [[#Deleting cubemaps|here]]. This is fixed in {{mapbase|4.1}}}}
{{Important|Mapas para jogos {{src13|4.1}} e outros, como {{css|4.1}}, são conhecidos por incluírem cubemaps pré-construídos e em branco depois de serem compilados (mesmo que não existam entidades '''env_cubemap'''' neles); estes devem ser apagados antes de construir novos, como detalhado [[#Deleting cubemaps|aqui]]. Tal foi corrigido no {{mapbase|4.1}}}}
{{tip|{{clr}}
{{tip|{{clr}}
* {{ent|env_cubemap}} entities [[Env cubemap#Keyvalues|allow]] for generating higher- or lower-quality reflections, though the game's texture quality also comes into play; consider maxing out your game's visual settings before building cubemaps.
* As entidades {{ent|env_cubemap}} [[Env cubemap#Keyvalues|permitem]] gerar reflexos de alta ou baixa qualidade, embora a qualidade da textura do jogo também entre em jogo; considere maximizar as configurações visuais do jogo antes de criar cubemaps.
To build cubemaps, your game's screen resolution needs to be at least 4 times higher than the highest [[Env cubemap#Keyvalues|size]] of an existing '''env_cubemap''', or else attempting to build them will either fail or even cause the game to crash.<br>For example, if the highest '''env_cubemap''' sizes 128x128, a resolution no lower than 512x512 will be required. (''128 &times; 4 &#61; '''512''' -&gt; 720x576'' (as a valid resolution) or higher){{note|The game may appear to freeze or become unresponsive during the process, and the amount of time depends on various factors. For successful results, don't switch away from the game until it's done.}}
Para criar cubemaps, a resolução da tela do seu jogo precisa ser pelo menos 4 vezes maior do que o maior [[Env cubemap#Keyvalues|tamanho]] de um '''env_cubemap''' existente, caso contrário, a tentativa de criá-los falhará ou até mesmo causará o travamento do jogo.<br>Por exemplo, se o maior '''env_cubemap''' tiver o tamanho 128x128, será necessária uma resolução não inferior a 512x512. (''128 &times; 4 &#61; '''512''' -&gt; 720x576'' (como uma resolução válida) ou superior){{note|O jogo pode parecer congelar ou deixar de responder durante o processo, e o tempo depende de vários fatores. Para obter resultados bem-sucedidos, não se afaste do jogo até que ele seja concluído.}}
* If you are using {{mapbase|4.1}}, you can add {{code|-autocubemap}} to your command line in {{hammer|1}}. The game will automatically build cubemaps
* Se estiver usando o {{mapbase|4.1}}, adicione {{code|-autocubemap}} à sua linha de comando em {{hammer|1}}. O jogo criará automaticamente cubemaps
* {{slamminsrc|4.1|nt=1}} features the {{code|-nodefaultcubemap}} command, which skips automatically generating skybox cubemaps on map compile.}}
* O {{slamminsrc|4.1|nt=1}} apresenta o comando {{code|-nodefaultcubemap}}, que ignora a geração automática de cubemaps skybox na compilação do mapa}}.


===LDR===
===LDR===

Revision as of 11:14, 13 December 2024

Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The person who added this notice will be listed in its edit history should you wish to contact them.

Info content.png
This page needs to be translated.
This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)
English (en)Español (es)Français (fr)Português do Brasil (pt-br)Русский (ru)中文 (zh)Translate (Translate)
Pendência: Precisa de informações sobre os cube maps da Source 2. Veja Draft:Cubemaps (Source 2).
Env cubemap.png
Um exemplo de reflexos especulares em alguns modelos (exagerados por causa do r_showenvcubemap).

Um cubemap é uma textura que representa uma representação tridimensional de uma área. Source Source usa entidades env_cubemap como pontos de amostragem para gerar estas texturas, que são depois integradas no arquivo do mapa. Os cubemaps, quando construídos, são refletidos em materiais que usam o parâmetro $envmap (superfícies como vidro refletor, azulejos, água, etc.) Um mapa sem entidades env_cubemap construídas ou existentes usará outros tipos de “reflexões” que não o retratam corretamente.


Construindo Cubemaps

BConstruir cubemaps é o processo de gerar texturas para usar como reflexões. Por razões técnicas, este processo não é automatizado ( Exceto em Mapbase) e cabe ao usuário fazê-lo; até lá, as entidades env_cubemap existentes permanecerão sem uso e o mapa, dependendo do jogo, mostrará uma textura genérica, preta ou texturas “ em falta” como reflexos devido a cubemaps inexistentes.

Warning.pngAtenção:
  • PARA PESSOAS COM EPILEPSIA: A criação de cubemaps em jogos executados em Vulkan, como Left 4 Dead 2 Left 4 Dead 2, faz com que a tela pisque violentamente em preto e branco. Também em sistemas com CPU/GPU mais rápida , a criação de cubemaps HDR em jogos do ramo pré-L4D, como Counter-Strike: Source Counter-Strike: Source, mesmo com Direct3D 9/DX9, também fará a tela piscar em preto e branco repetidamente.
  • Se o comando nav_show_ladder_bounds tiver sido usado antes da criação de cubemaps, as caixas verdes também serão incorporadas ao cubemap.
  • Se estiver criando cubemaps para o Half-Life 2 Half-Life 2 (exceto os episódios) após a Atualização do Aniversário de 20 anos, você deverá iniciar o jogo com -game hl2 argumento da linha de comando. Caso contrário, o jogo tentará acessar o episodic/maps (Half-Life 2: Episode One) em vez do diretório de mapas Half-Life 2, fazendo com que o jogo não salve os cubemaps criados no mapa. Da mesma forma, se estiver criando cubemaps para mapas localizados no diretório Episode One ou Episode Two, inicie o jogo com -game episodic (para EP1) ou -game ep2 (para o EP2), respectivamente (ou inicie o Episódio Um/Episódio Dois em Steam > Ferramentas).

Antes de construir

Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality because:
Os jogos Source modernos, nomeadamente Portal 2 e P2:CE, não precisam de todos estes parâmetros e passos complicados, pelo menos na minha experiência -Equalizer (talk) 10:56, 22 março 2024 (PDT)

Também alguns jogos Source (como o CS:S), não parecem necessitar que os cheats estejam activados para construir cubemaps. -leonidakarlach (talk) 02:50, 25 agosto 2024 (PDT)

For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.
Icon-Important.pngImportante:Mapas para jogos Source 2013 Source 2013 e outros, como Counter-Strike: Source Counter-Strike: Source, são conhecidos por incluírem cubemaps pré-construídos e em branco depois de serem compilados (mesmo que não existam entidades env_cubemap' neles); estes devem ser apagados antes de construir novos, como detalhado aqui. Tal foi corrigido no Mapbase Mapbase
Tip.pngDica:
  • As entidades env_cubemap permitem gerar reflexos de alta ou baixa qualidade, embora a qualidade da textura do jogo também entre em jogo; considere maximizar as configurações visuais do jogo antes de criar cubemaps.
  • Para criar cubemaps, a resolução da tela do seu jogo precisa ser pelo menos 4 vezes maior do que o maior tamanho de um env_cubemap existente, caso contrário, a tentativa de criá-los falhará ou até mesmo causará o travamento do jogo.
    Por exemplo, se o maior env_cubemap tiver o tamanho 128x128, será necessária uma resolução não inferior a 512x512. (128 × 4 = 512 -> 720x576 (como uma resolução válida) ou superior)
    Note.pngNotar:O jogo pode parecer congelar ou deixar de responder durante o processo, e o tempo depende de vários fatores. Para obter resultados bem-sucedidos, não se afaste do jogo até que ele seja concluído.
  • Se estiver usando o Mapbase Mapbase, adicione -autocubemap à sua linha de comando em Hammer. O jogo criará automaticamente cubemaps
  • O Slammin' Source Map Tools Slammin' VBSP apresenta o comando -nodefaultcubemap, que ignora a geração automática de cubemaps skybox na compilação do mapa

.

LDR

Note.pngNotar:This step doesn't apply to Left 4 Dead Left 4 Dead nor Counter-Strike: Global Offensive Counter-Strike: Global Offensive as their maps are compiled in HDR mode only. While Portal 2 Portal 2 does support LDR, the game uses HDR by default, so we recommend building cubemaps in HDR only.

Building cubemaps in a map compiled in LDR (Low Dynamic Range) mode will generate textures only for that mode, regardless of your game's High Dynamic Range video setting. To build the cubemaps, submit the following commands into the game's console:

Command Description
mat_specular 0 Turns reflections off, which is necessary if using only one iteration of buildcubemaps.
It also meant that disabling reflections would avoid some case where missing textures or default cubemap texture (materials/engine/defaultcubemap.vtf, aka a desert with orange sunset sky), might ended up reflected on the cubemap itself.
map map_name Loads the map; replace "map_name" with the map's actual name
sv_cheats 1 Enables the use of cheat commands; required to build cubemaps
Confirmar:Half-Life 2 doesn't appears to require cheats to build cubemaps, so this step can be skipped. Confirm if other games also require cheats to build cubemaps.
buildcubemaps Begins building cubemaps. Optionally, specify the number of iterations (e.g.: buildcubemaps 2 (default is 1))
disconnect Unloads the map and returns to the main menu
mat_specular 1 Turns reflections on.
quit (optional) Exits the game. On some games, relaunching is required to display newly-built cubemaps

LDR + HDR

Building cubemaps in Source 2006 - Source 2013 game, with a map compiled with HDR support needs to be performed twice - once for each mode (HDR and LDR). As opposed to an LDR map's case, your game's High Dynamic Range video setting has to be set to "Full" to build HDR cubemaps, and to "None" to build LDR ones (or using the mat_hdr_level command. To build the cubemaps for both LDR + HDR, submit the following commands into the game's console:

Note.pngNotar:Maps built on Left 4 Dead, or later (and some third-party Source games), does not requires building cubemaps on LDR. See #HDR
Command Description
mat_specular 0 Turns reflections off, which is necessary if using only one iteration of buildcubemaps.
It also meant that disabling reflections would avoid some case where missing textures or default cubemap texture (materials/engine/defaultcubemap.vtf, aka a desert with orange sunset sky), might ended up reflected on the cubemap itself.
map map_name Loads the map; replace "map_name" with the map's actual name
sv_cheats 1 Enables the use of cheat commands; required to build cubemaps
Confirmar:Half-Life 2 doesn't appears to require cheats to build cubemaps, so this step can be skipped. Confirm if other games also require cheats to build cubemaps.
building_cubemaps 1 Sets HDR exposure to a consistent value. This will automatically reset back to 0 after cubemaps are built.
buildcubemaps Begins building cubemaps. Optionally, specify the number of iterations (e.g.: buildcubemaps 2 (default is 1))
disconnect Unloads the map and returns to the main menu
sv_cheats 0 Disables cheat commands; prevents command mat_reloadallmaterials from unnecessarily self-executing (which briefly freezes the game)
mat_hdr_level 0 Switches to LDR mode (from HDR); submit mat_hdr_level 2 instead if LDR cubemaps were built first
map map_name Loads the map again to build cubemaps for the new mode
sv_cheats 1
buildcubemaps Begins building cubemaps for the new mode
disconnect
mat_specular 1 Turns reflections on.
mat_hdr_level 0/1/2 If necessary, switches back to the mode it was before having submitted mat_hdr_level 0/2
quit (optional) Exits the game. On some games, relaunching is required to display newly-built cubemaps

HDR

This section is for games running Left 4 Dead engine branch Left 4 Dead engine branch and later engine branch, or engine branch that only support's HDR (Xengine). To build cubemaps in HDR only, submit the following commands into the game's console:

Command Description
mat_specular 0 Turns reflections off, which is necessary if using only one iteration of buildcubemaps.
It also meant that disabling reflections would avoid some case where missing textures or default cubemap texture (materials/engine/defaultcubemap.vtf, aka a desert with orange sunset sky), might ended up reflected on the cubemap itself.
map map_name Loads the map; replace "map_name" with the map's actual name
sv_cheats 1 Enables the use of cheat commands; required to build cubemaps
building_cubemaps 1 Sets HDR exposure to a consistent value. This will automatically reset back to 0 after cubemaps are built.
buildcubemaps Begins building cubemaps. Optionally, specify the number of iterations (e.g.: buildcubemaps 2 (default is 1))
disconnect Unloads the map and returns to the main menu
mat_specular 1 Turns reflections on.
quit (optional) Exits the game. On some games, relaunching is required to display newly-built cubemaps

Building cubemaps in specific games

Black Mesa: Source

To build cubemaps in Black Mesa Black Mesa maps, the game has to be launched with these parameters: -oldgameui -dev -console +r_4way_use_fast_normals 0 +mat_specular 0
Then, load the map and submit the buildcubemaps command into the console.

Half-Life: Source

Icon-Bug.pngErro:Building cubemaps in Half-Life: Source Half-Life: Source is currently not possible as their textures, despite being generated, aren't embedded into the map file afterward.
PlacementTip.pngGambiarra:Move the map file into the 🖿maps folder of a game in the same engine branch (such as Half-Life 2 Half-Life 2), build its cubemaps in that game, then move the file back into Half-Life: Source's folder.
Confirmar:Fixed in Half-Life Deathmatch: Source?
  [todo tested in ?]

Half-Life 2 (20th Anniversary Update)

Icon-Bug.pngErro:Building cubemaps in Half-Life 2 Half-Life 2, Half-Life 2: Episode One Half-Life 2: Episode One and Half-Life 2: Episode Two Half-Life 2: Episode Two, after 20th anniversary update, might fail. In Half-Life 2 case, the game may access the wrong directory (example: episodic/maps), instead of hl2/maps, preventing the cubemaps from embedded into the map file.

You may also see this error message generated on the console: vtex failed to compile cubemap! Unable to remove \steamapps\common\half-life 2\episodic\materials\maps\<map name>\<cubemap location>.vtf

PlacementTip.pngGambiarra:Launch Half-Life 2 with -game hl2 command line argument. For Episodes, launch the game through Steam > Tools (or using -game episodic or -game ep2).

Portal 2

Icon-Bug.pngErro:Building cubemaps in Portal 2 Portal 2 will fail if the map file is not in the highest-numbered DLC folder (🖿dlc2 by default).
PlacementTip.pngGambiarra:Move the map to that folder before building cubemaps and, if necessary, edit the "Place compiled maps in this directory before running the game" path in Hammer's Build Programs options so that the map is automatically generated there.
  [todo tested in ?]

Portal 2: Community Edition

Icon-Bug.pngErro:Amount of iterations (e.g.: buildcubemaps 2) doesn't currently work in Portal 2: Community Edition Portal 2: Community Edition.
PlacementTip.pngGambiarra:Run the buildcubemaps command, reload the map, then run the command again. Successively repeat these steps if necessary.
  [todo tested in ?]


Source Filmmaker

Improper rendering of an HDR cubemap's face in Source Filmmaker.
Icon-Bug.pngErro:HDR cubemaps sizing lower than 64x64 built-in Team Fortress 2 Team Fortress 2 and some other games usually display graphical artifacts on reflections due to the last face of each cubemap not rendering properly in Source Filmmaker Source Filmmaker. While rebuilding cubemaps in it would normally fix the issue, it is currently not possible to do so as Source Filmmaker Source Filmmaker generates blank textures.
PlacementTip.pngGambiarra:If recompiling a special version of an affected map with env_cubemap's now sizing 64x64 (or higher) is not an option, move the map file into Alien Swarm Alien Swarm's 🖿maps folder, build its cubemaps in that game, then move the file back into Source Filmmaker Source Filmmaker's folder.
  [todo tested in ?]
Note.pngNotar:Alien Swarm's "gameinfo.txt" file needs to be modified for this procedure so that the game can have access to assets used by other games' maps not to build cubemaps with missing textures or models. The file's "SearchPaths" section should look like this:
"SearchPaths"
{
	"Game"	"|gameinfo_path|."
	"Game"	"swarm_base"
	"Game"	"platform"
	"Game" "..\SourceFilmmaker\game\usermod"
	"Game" "..\SourceFilmmaker\game\tf_movies"
	"Game" "..\SourceFilmmaker\game\tf"
	"Game" "..\SourceFilmmaker\game\hl2"
}
Note.pngNotar:Team Fortress 2 Team Fortress 2 configurations were used for the example; consider replacing game subfolders (only those within Source Filmmaker Source Filmmaker paths) with the ones needed.
PlacementTip.pngGambiarra:Another option is to manually remove the sphere map (face #7) from the existing HDR cubemap textures. See Creating a custom static cubemap texture for more info.
Alternatively, deleting the affected HDR cubemap texture files will cause the LDR versions to be used, which do not suffer from this bug.

Deleting cubemaps

Several tools make it possible to delete unnecessary or outdated cubemaps; BSPZIP is one official, command-line tool which is usually the preferred option for this procedure, allowing for an usage unlikely of corrupting the map file due to misuse. To delete cubemaps, execute the following command within the 🖿maps folder:

..\..\bin\bspzip -deletecubemaps map_name.bsp
Note.pngNotar:Replace "map_name" with the map's actual name.
Warning.pngAtenção:Deleting cubemaps actually deletes all the texture (".vtf") files currently embedded into the map, so it's recommended not to embed custom textures before deleting cubemaps.

Extracting cubemaps

In cases where a map has to be recompiled with minor changes (and its built cubemaps vanish as a result), extracting them beforehand will make it not necessary to go through the whole cubemap-building process again. To extract cubemaps with BSPZIP, create a folder that will contain the extracted cubemaps inside the 🖿maps one, then execute the following command:

..\..\bin\bspzip -extractcubemaps map_name.bsp "foldername"
Note.pngNotar:Replace "map_name" with the map's actual name, and "foldername" with the actual name of the folder to extract cubemaps into.


Embedding cubemaps

For BSPZIP to make a map use extracted cubemaps, create a text file inside the 🖿maps folder. The file's content should look like this:

materials/maps/map_name/c-128_384_64.hdr.vtf
foldername\materials\maps\map_name\c-128_384_64.hdr.vtf
materials/maps/map_name/c-128_384_64.vtf
foldername\materials\maps\map_name\c-128_384_64.vtf
materials/maps/map_name/c448_-256_64.hdr.vtf
foldername\materials\maps\map_name\c448_-256_64.hdr.vtf
materials/maps/map_name/c448_-256_64.vtf
foldername\materials\maps\map_name\c448_-256_64.vtf
materials/maps/map_name/cubemapdefault.vtf
foldername\materials\maps\map_name\cubemapdefault.vtf
Note.pngNotar:Replace "map_name" with the map's actual name, the cubemaps' filenames with correct ones, and "foldername" with the actual name of the folder that contains the extracted cubemaps.

A file requires two dedicated lines (paths): the first line represents the path it will use within the map file, whereas the second one is the actual location of the file to embed into the map file. Relative location paths were used for the example, but they can also be Absolute. Once the text file is ready, execute the following command:

..\..\bin\bspzip -addlist map_name.bsp textfile.txt newmap_name.bsp
Note.pngNotar:Replace "map_name" with the map's actual name, "textfile" with the text file's actual name, and "newmap_name" with either the map's actual name, or a new name not to overwrite the original file (and instead create a separate one).

Renaming a map

For built cubemaps to work, they must be located in a folder that is named after the map; this folder is automatically created within the map file during the building process. Renaming the map file will not also rename said folder, and therefore cubemaps will not be accessed. Some third-party apps allow renaming the folder, though it is not advisable to do so as it may corrupt the file. Instead, either delete and then rebuild the cubemaps, or revert the map to its original name.

See also