Zh/Cubemaps (Source 2): Difference between revisions

From Valve Developer Community
< Zh
Jump to navigation Jump to search
(Created page with "{{subst:#if: Translation of 'Cubemaps (Source 2)' to '中文' via Template:LanguageBar buttons * * * * * * * * * * * * * * * * * * * * * * * * * * * *...")
 
No edit summary
Line 1: Line 1:
{{subst:#if:|||{{LAuto/t}}
--- DON'T JUST BLINDLY DELETE THIS PART. DO REPLACE THE LINKS AND CATEGORIES. THE PICTURE SHOWS HOW TO USE IT ! ---
SEARCH FOR:
\[\[(?!#|File(?:[ _]talk)?:|Image(?:[ _]talk)?:|Media:|Template(?:[ _]talk)?:|MediaWiki(?:[ _]talk)?:|Talk:|Category[ _]talk:|Project[ _]talk:|Valve[ _]Developer[ _]Community[ _]talk:|Help[ _]talk:|User(?:[ _]talk)?:|c:|commons:|Dictionary:|Google:|GoogleGroups:|IMDB:|M:|Meta:|Metawikipedia:|MW:|SdkBug:|SourceForge:|Steampowered:|W:|Wiki:|WikiBooks:|Wikipedia:|Wikiquote:|Wiktionary:|WP:)(:?(?:Category|Category|Help|Project|Valve[ _]Developer[ _]Community|Special|)(?:[^\|\]]+))(\|?.*?)\]\]
REPLACE WITH:
{{subst:LAuto|$1$2}}
}}{{wip}}{{translating}}
{{LanguageBar}}
{{LanguageBar}}
{{Tabs|Cubemaps|source=1|source2=1|main=source}}
{{Tabs|Cubemaps|source=1|source2=1|main=source}}
[[File:Env_cubemap.png|left]]
[[File:Env_cubemap.png|left]]
[[File:Specular (Source 2).jpg|thumb|right|300px|An example of specular reflections on some models (exaggerated by overriding prop materials with {{code|materials/dev/spheretest.vmat}} texture).]]
[[File:Specular (Source 2).jpg|thumb|right|300px|某些模型上的镜面反射示例(通过使用 {{code|materials/dev/spheretest.vmat}} 覆盖道具材质实现的夸张效果) ]]
A '''cubemap''' is a texture that represents a three-dimensional rendering of an area. {{source2|4.1}} has {{ent|env_cubemap|engine=source2}}, {{ent|env_cubemap_box}} and/or [[#Entities|other cubemap entities]] as sampling points to generate these textures, which are then integrated into the [[VPK|map file]]. <!-- old stuff for S1 commented out. !!! 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''' or '''env_cubemap_box''' entities will instead use other kinds of "reflections" that don't properly depict it. --> Cubemaps in Source 2 are also [[Parallax Corrected Cubemaps|parallax corrected]] if {{code|env_cubemap_box}} is used.
一张 '''立方体贴图 (cubemap)''' 是一种表示区域三维渲染的纹理。 {{source2|4.1}} 使用 {{L|env_cubemap|engine=source2}}{{L|env_cubemap_box}} /或 {{L|other cubemap entities}} 作为采样点来生成这些纹理,然后将其整合进 {{L|VPK|地图文件}}。 <!-- 已注释掉的 Source 1 旧内容 !!! 当立方体贴图被 {{L|#Building cubemaps|构建}} 时,它们会反射在使用 {{L|$envmap}} 参数的材质上(例如反光玻璃、瓷砖、水面等表面)。一张没有构建或已存在 '''env_cubemap''' '''env_cubemap_box''' 实体的地图将转而使用其他不准确描绘周围环境的“反射”。 --> Source 2 中,如果使用了 {{code|env_cubemap_box}},立方体贴图也会进行 {{L|Parallax Corrected Cubemaps|视差校正}}。


{{Todo|Document about [[env_cubemap_fog]].}}
{{Todo|关于 [[env_cubemap_fog]] 的文档。}}


== Entities ==
== 实体 ==
* {{ent|env_cubemap|engine=2}} {{only|{{svrh}} {{hla}}}}
* {{L|env_cubemap|engine=2}} {{only|{{svrh}} {{hla}}}}
* {{ent|env_cubemap_box}} {{only|{{svrh}} {{hla}} {{cs2}}}}
* {{L|env_cubemap_box}} {{only|{{svrh}} {{hla}} {{cs2}}}}
* {{ent|env_cubemap_fog}} {{only|{{svrh}} {{hla}} {{cs2}}}}
* {{L|env_cubemap_fog}} {{only|{{svrh}} {{hla}} {{cs2}}}}
* {{ent|env_combined_light_probe_volume}} {{only|{{svrh}} {{hla}} {{cs2}}}} - combines both {{ent|env_light_probe_volume}} and {{ent|env_cubemap_box}} into one entity.
* {{L|env_combined_light_probe_volume}} {{only|{{svrh}} {{hla}} {{cs2}}}} - {{L|env_light_probe_volume}} {{L|env_cubemap_box}} 组合成一个实体。


==Preview in Hammer {{only|{{cs2}}}} ==
==Hammer 中预览 {{only|{{cs2}}}} ==
You can preview cubemaps by going to "Preview Baked Lighting" menu > Bake All Cubemaps. You can also use "Bake Selected Cubemaps" to preview the selected cubemaps.
您可以通过前往 "Preview Baked Lighting" 菜单 > 用来烘焙所有立方体贴图。你也可以使用 "Bake Selected Cubemaps" 来预览选定的立方体贴图。


==Building cubemaps==
==构建立方体贴图==
{{Note|If the option "Build cubemaps on load" is checked in Hammer Build Map dialog, as soon the game loads the map after it is compiled, the cubemaps will be automatically built, and the map will be automatically reloaded.}}
{{Note|如果在Hammer Build Map 对话框中勾选了 "Build cubemaps on load" 选项,那么一旦游戏在编译后加载该地图,立方体贴图将自动构建,并且地图也将自动重新加载。}}
{{Note|Unlike {{Src|1}}, which displays the building cubemaps process by showing the captured image on each sides, Source 2 will instead hangs while building cubemaps, so look at the console log (in [[VConsole]]) instead for progress.}}
{{Note|{{Src|1}} 不同, (该功能)会通过显示每个面捕获的图像来展示构建立方体贴图的过程,而 Source 2 在构建立方体贴图时则会假死,因此请转而查看控制台日志 (在 {{L|VConsole}} 中) 以获取进度信息。}}
If you didn't enable the option to automatically build cubemaps through Hammer, submit the following commands into the game's console in order to build cubemaps manually:
若你未启用通过Hammer自动构建立方体贴图的选项,请将以下命令依次提交到游戏控制台以手动构建立方体贴图:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Command !! Description
! 命令 !! 描述
|-
|-
| {{Command|map}} ''map_name''</code> || Loads the map; replace "''map_name''" with the map's actual name
| {{Command|map}} ''map_name''</code> || 加载地图;将"''map_name''"替换为地图实际名称
|-
|-
| {{Command|buildcubemaps}} || Begins building cubemaps. The map will be automatically reloaded, and the new cubemap texture will be shown. {{Note|Source 2 does not support building cubemaps with number of iterations (e.g.: <code>buildcubemaps 2</code>).<small>(confirmed on {{hla}} {{cs2}})</small>}}
| {{Command|buildcubemaps}} || 开始构建立方体贴图。地图将自动重新加载,新的立方体贴图纹理将显示出来。 {{Note|Source 2 不支持通过指定迭代次数构建立方体贴图 (例如: <code>buildcubemaps 2</code>) 。在 <small>({{hla}} {{cs2}}) 中已证实</small>}}
|-
|-
|}
|}


[[Category:Cubemaps]]
{{ACategory|Cubemaps}}
[[Category:Level Design]]
{{ACategory|Level Design}}

Revision as of 23:27, 22 June 2025

English (en)中文 (zh)Translate (Translate)
Env cubemap.png
某些模型上的镜面反射示例(通过使用 materials/dev/spheretest.vmat 覆盖道具材质实现的夸张效果) 。

一张 立方体贴图 (cubemap) 是一种表示区域三维渲染的纹理。 起源2 起源2 使用 env_cubemap(en)env_cubemap_box(en) 和/或 other cubemap entities(en) 作为采样点来生成这些纹理,然后将其整合进 地图文件(en)。 在 Source 2 中,如果使用了 env_cubemap_box,立方体贴图也会进行 视差校正(en)

待完善: 关于 env_cubemap_fog 的文档。

实体

在 Hammer 中预览 (存在于 反恐精英2 之中)

您可以通过前往 "Preview Baked Lighting" 菜单 > 用来烘焙所有立方体贴图。你也可以使用 "Bake Selected Cubemaps" 来预览选定的立方体贴图。

构建立方体贴图

Note.png注意:如果在Hammer Build Map 对话框中勾选了 "Build cubemaps on load" 选项,那么一旦游戏在编译后加载该地图,立方体贴图将自动构建,并且地图也将自动重新加载。
Note.png注意:起源 不同, (该功能)会通过显示每个面捕获的图像来展示构建立方体贴图的过程,而 Source 2 在构建立方体贴图时则会假死,因此请转而查看控制台日志 (在 VConsole(en) 中) 以获取进度信息。

若你未启用通过Hammer自动构建立方体贴图的选项,请将以下命令依次提交到游戏控制台以手动构建立方体贴图:

命令 描述
map map_name 加载地图;将"map_name"替换为地图实际名称
buildcubemaps 开始构建立方体贴图。地图将自动重新加载,新的立方体贴图纹理将显示出来。
Note.png注意:Source 2 不支持通过指定迭代次数构建立方体贴图 (例如: buildcubemaps 2) 。在 (半衰期:爱莉克斯 反恐精英2) 中已证实