Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
English

Texture Compilation

In order to use a source texture (.tif) in CRYENGINE, the Resource Compiler must be invoked to compile the texture to a more optimized format that can be loaded efficiently by the engine (usually .dds).

When a TIF file is saved with the CryTIF Plugin for Photoshop, the plugin opens the texture dialog of the Resource Compiler where specific settings for the texture can be made.

For installation instructions for the CryTIF Plugin, please refer to the Installing the Photoshop CryTIF Plugin for Photoshop tutorial in the CRYENGINE Overview documentation.

Table of Contents
maxLevel2
minLevel2

Overview

The primary function of the texture dialog is to add meta data to the texture, which the Resource Compiler can later use to create a texture tailored for the target platform. Several settings like compression scheme, mipmap generation parameters, and also normalmap/alpha map combinations can be configured in the dialog. The user interface is a part of the Resource Compiler and is launched when saving a file as CryTIF from Photoshop.

The CryTIF (.TIF) format is used as an intermediate file format, based on the TIFF format, which contains the uncompressed texture as well as the different settings for the Resource Compiler stored as meta information. Whenever saving a texture as a .TIF (CryTIF) file, the plugin sends the texture to the Resource Compiler, creating a texture in the file format specifically for the target platform. By using presets on an uncompressed texture, the final output format can be specified in a very flexible way. Engineers can easily instruct the Resource Compiler to create a PC and console texture with optimal settings specific to the target platform from a single source file.

Please note that the TIF is not reloaded after its meta data was modified in the RC user dialog. So if the file is saved again in Photoshop without having been reloaded before, the settings need to be specified again.

Warning

Creating .dds files directly without the Resource Compiler is not recommended or supported.

In order to save a texture in Photoshop, go to the File menu, click Save. When the file dialog shows up, choose CryTIF as the format, choose a name and save. After the TIF file has been written to disk, the texture dialog of the Resource Compiler will show up.

Preview Windows

In the upper area you can see two images, the original image on the left, and a preview of the processed image using the preset on the right.

If the dimensions of the Photoshop image that you are trying to save are not a power of two (i.e. 256x256, 512x512, 1024x1024), you will see a warning text instead of a preview.

Directly below the preview images, you can see different image properties such as resolution, number of mip maps, texture format, and memory. The original values are displayed on the left, the values on the right are based on the chosen preset or the custom settings.

Mouse Navigation

Description

Mouse Wheel

Zoom in/out.

Mouse Button Click+Move

Move texture.

Preset

The presets come from the preset list file (normally rc_presets_pc.ini).

This drop-down list holds the presets that you can assign to a texture. The texture using the preset values is automatically displayed in the preview window on the right. Texture properties are also updated.

Please select a preset depending on the type of texture that you are saving (i.e. Diffuse_highQ for a diffuse texture, Normalmap_highQ for a Normalmap).

The options ending with _lowQ produce slightly lower quality results at the benefit of less memory consumption. These presets will automatically select an appropriate pixel format, such as 3DC compression for normal maps.

The list below describes the full set of available presets shipped with the SDK. It can be extended by adding new presets to the .ini file referenced in the Bin64/rc/rc.ini. By default this is the rc_presets_pc.ini file.

PresetDescription / Use
Albedo 
AlbedoWithOpacity 
AlbedoWithCoverage 
AlbedoWithGenericAlpha 
Reflectance 
Reflectance_Linear 
ReflectanceWithSmoothness_Legacy 
Normals 
NormalsWithSmoothness 
NormalsWithSmoothness_Legacy 
NormalsFromDisplacement 
Displacement

Grey-scale Alpha channel use only. Used for Displacement Maps textures.

Terrain_Albedo

For use with the Terrain.Layer Shader. Automatically applies a high-pass filter to remove low frequency colors.

Terrain_Albedo_HighPassed

This preset should be used instead of Terrain_Albedo, if the texture is already high-passed.

Decal_AlbedoWithOpacity 
Detail_MergedAlbedoNormalsSmoothness

For use with Unified Detail Mapping.

Detail_MergedAlbedoNormalsSmoothness_Lossless

For use with Unified Detail Mapping. No compression.

CloudShadows 
EnvironmentProbeHDR 
EnvironmentProbeHDR_Irradiance 
SkyboxLDR 
SkyboxHDR 
ColorChart

For use with ColorChart textures. See Color Grading for more information.

Gradient 
Greyscale

Similar to Gradient preset but uses BC4 compression and mipmaps.
Automatically selected for _mask texture filenames.


Diffuse_HighQ
on the left - Greyscale on the right

LensOptics

For use with Lens Flare Editor textures. No mips will prevent blurry results.

LightProjector

For use with Textures that will be projected from lights and lightbeams. Uncompressed format.

LoadingScreen

DEPRECATED
Use "SF_Image" for Scaleform UI.

Minimap 
Muzzleflash 
Opacity 
Uncompressed 
ReferenceImage 
ReferenceImage_Linear 
UserInteface_Lossless 
UserInterface_Compressed 
LUT_RGBA8 
LUT_RG8 
LUT_RG16 
SF_Image

This preset should be used for textures used by Scaleform, such as loading screens.

SF_Image_nonpower2 
SF_Gradient 
SF_Font 
Info

Pre-CRYENGINE 3.8:

Expand

Preset

Description

Bump2Normalmap_highQ

 

Bump2Normalmap_lowQ

 

ColorChart

For use with ColorChart textures. See Color Grading for more information.

DetailBumpMap

 

DetailTexture

Unified Detail Textures utilize RGB + Alpha channels for both Normals and Detail with Gloss.

DiffuseWithAlphaTest_highQ

 

DiffuseWithAlpha_highQ

 

Diffuse_Decal

 

Diffuse_highQ

Uses the best available settings for RGB textures. i.e. DXT1 for RGB images and DXT5 for RGB+Alpha images.

Diffuse_highQ_nomips

Same as Diffuse_highQ but disables mipmaps.

Diffuse_lowQ

Uses a lower quality setting for RGB textures, i.e. DXT3 for RGB+Alpha images.

DisplacementMap

Grey-scale Alpha channel, used for Displacement Maps textures.

Gradient

Gradient textures should use this for best results as there is no compression and no sRGB.

Greyscale

Similar to Gradient preset but uses BC4 compression and mipmaps. Automatically selected for _mask texture filenames.


Diffuse_HighQ
on the left - Greyscale on the right

HDRCubemapRGBK_highQ

 

HDRCubemap_highQ

 

HDRDiffuseCubemapRGBK_highQ

 

HDRDiffuseCubemap_highQ

 

HDRReflectionsRGBK_highQ

 

LUT_RGBA8

 

LensOptics

For use with Lens Flare Editor textures. No mips will prevent blurry results.

LightProjector

For use with Textures that will be projected from lights and lightbeams. Uncompressed format.

LoadingScreen

Deprecated - Use "SF_Image" for Scaleform UI.

MergedDecal

 

MergedDetailMap

For use with Unified Detail Mapping, RGB+Alpha, DXT5 compression.

MergedDetailMap_HighQ

For use with Unified Detail Mapping, RGB+Alpha, no compression.

Minimap

Uses an automatic size reduction, mimaps and DXT1 compression for optimization purposes.

MuzzleFlash

 

NormalmapWithGlossInAlpha_highQ

 

Normalmap_highQ

 

Normalmap_highQ_nomips

 

Normalmap_lowQ

 

OpacityMap

 

ParticleDiffuse

 

ParticleDiffuseStreamable

 

ReferenceImage

 

ReferenceImage_NoSrgb

 

SF_Font

 

SF_Gradient

 

SF_Image

This preset should be used for textures used by Scaleform, such as loading screens.

SF_Image_nonpower2

 

SkyboxHDR

 

Skybox_highQ

For use with Skybox Textures.

SpecularLinear_highQ

 

SpecularWithGlossInAlpha_highQ

 

Specular_highQ

 

Specular_highQ_nomips

 

Specular_lowQ

 

TerrainDiffuse

For use with the Terrain.Layer Shader. Automatically applies a high-pass filter to remove low frequency colors.

TerrainDiffuseHighPassed

This preset should be used if the texture is already high-passed. Same settings as TerrainDiffuse, DXT1, Mips and no sRGB.

Uncompressed

Saves the texture in an uncompressed format.

UserInterface

 

UserInterface_Compressed

 

Preview Options

Option

Description

Zoom In & Zoom Out

Changes the preview size of the textures in the previews. This enables you to see details and how they are affected by the compression.
You can pan the images by clicking in the preview area and dragging your mouse.

Tiled

Enables/disables a tiling of the texture if the display size is smaller than the original texture size.

Bi-linear Filter

Enables/disables bi-linear filtering. Simulates the appearance of the texture inside the game engine.

Channel drop-down list

Several features can be previewed using this drop-down list. Below the list is an explanation of what is being displayed in the preview window.

  • RGB: Displays the RGB Color channels (Default mode)
  • Alpha: Previews the alpha channel in grayscale (no gamma correction).
  • RGB Alpha: Alpha blended with the background (no gamma correction).
  • Debug Normals: Normal map Debugger. The brighter a pixel, the better normal. Blue indicates very short normals, red impossible normals (>1).
  • RGB*A (HDR): RGB multiplied with Alpha, useful to get cheap HDR textures.
  • Alpha Test: Shows the Alpha Channel visualized with an AlphaTest of 0.5
  • mCIE2RGB: mCIE to RGB conversion (for internal tests).

RGB Bump2Normal Tab

The CryTIF plugin can convert a grayscale bumpmap into a normal map. To do this, select Bump2Normalmap _highQ from the preset list, and go to the advanced options at the bottom to change the parameters. You can adjust the following parameters:

Parameter

Description

Filter Type

Changes the filter used for processing the texture. Default is "gauss".

Strength

Defines the strength of the bumps. This can be used as additional compensation, but you normally have better control over this by editing the grayscale texture in Photoshop (range 0 – 15; Default 5).

Blur

Blurs the texture (range 0 – 10; Default 0).

Invert

Inverts the height map. Whites are then interpreted as pits and blacks as bumps.

Resolution Tab

Reduce Resolution drop-down list lets you select different resolution adjustments. Useful if you keep the source file in a huge resolution, although you know it will appear in a much smaller size in the game (i.e. a texture used for promotion and for the final game asset).

Amount

Result

0

Keeps the texture at its original size (default).

1

Reduces the texture resolution by 1/2,reduces the memory consumption to 1/4 of the original memory.

2

Reduces the texture resolution by 1/4,reduces the memory consumption to 1/16 of the original memory.

3

Reduces the texture resolution by 1/8,reduces the memory consumption to 1/64 of the original memory.

-1

Increases the texture resolution by factor 2, increases the memory consumption to 4 times the original memory.

-2

Increases the texture resolution by factor 4, increases the memory consumption to 16 times the original memory.

There might be automatic texture resizing processes inside the engine in place. Please check with your programmers, if they enabled such optimizations for your development environment. Additionally the Resolution tab features optimization and exception functions.

  • Auto optimize file: This check box should be selected for normal textures and deselected only for use as a very high-spec texture. It automatically scales all the textures that are over 512 pixels in width or height. This is used to improve the performance and optimize the memory consumption. In most of the cases, the difference between the 1024 pixels and 512 pixels versions is a good trade off for better performance. Some profile options can be overwritten by the Resource Compiler when this option is enabled.
  • Suppress engine reduce: If you're switching from high to low spec, the textures are automatically scaled down to allow them to be loaded into the graphics card memory. This flag overwrites all the RC settings and keeps the original size throughout all the different quality settings. This should be used for textures that feature text. When this is enabled, the flag "/ser=1" will be added into the TIF meta data.

AlphaUsedAsBump Tab

In the production process, you sometimes need to blend a low frequency normal map with a second high frequency normal map to create a variation from from the original low frequency version. If you did this in Photoshop directly, you would loose intricate detail when scaling the texture during the conversion process. This would come with a loss of detail in the high frequency part of the texture and possibly wrong normals. This function converts the high frequency greyscale alpha channel of a normal map and combines it with the normal RGB channels of the normal map.

As this function is done after scaling and using a proprietary sharpening algorithm, as well as a normalization pass on the low frequency normal map, the detail is better than in the traditional approach. It also allows it to be tweaked much easier. To enable this function, select Normalmap_highQ from the preset list and set the filter option in the AlphaUsedAsBump tab to Gauss.

The preview window should change now to indicate the change.

MIP Control Tab

The controls allow the manual adjustment of the Alpha channel mip maps. This is especially useful when the texture contains fine details, like in a chain link fence.

You can shift the alphatest bias in the different mip levels using the sliders. The value of the texture is adjusted and assuming a constant alphatest value you can tweak the result.

The lowest slider, which you see when you scroll down, controls the mip sharpening. This is a sharpness filter that is applied to the mip maps to counteract the blur that naturally occurs when down-scaling the textures during mip map generation. This feature can greatly improve image quality. The default value is 35.

Mip maps drop-down list

 

None (0)

Does not create mip maps.

max, tiled (1)

Default Setting. Creates the maximum number of mip maps possible.

Generate Output

Pressing the Generate Output button, forces an immediate conversion to the target output format without closing the CryTIF dialog box.

It is then possible to switch to CryENGINE and look at the results of the settings that you have changed (Sandbox automatically reloads/updates changed textures). This is useful for quickly testing compression settings without re-saving or reopening the dialog box every time you make a change.

 

Excerpt
hiddentrue
This topic contains an overview of using the CryTIF plugin for Photoshop to compile textures with the Resource Compiler and an description of the plugin's parameters.

Troubleshooting

Please note that the TIF is not reloaded after its meta data was modified in the RC user dialog. So if the file is saved again in Photoshop without having been reloaded before, the settings need to be specified again.

In order to run the RC, the CryTIF plugin needs to know the path where the RC is located. This can be configured in Photoshop under Help -> About Plugin -> CryTIFPlugin. If the RC executable cannot be found, the configuration dialog is opened automatically.

 

Chinese

纹理编译

为在 CryENGINE 中使用源纹理 (.tif),必须调用“资源编译器”将纹理编译成更优化的格式以使引擎有效地加载纹理(通常是 .dds)。使用 *CryTIF 插件*为 Photoshop 保存 TIF 文件时,插件就会打开“资源编译器”中的纹理对话框,可在此对话框中为纹理指定特定的设置。

有关 CryTIF 插件的安装说明,请参阅“CryENGINE 概述”文档中的安装 CryTIF 插件教程。

Table of Contents
maxLevel2
minLevel2
 

概述

纹理对话框的主要功能是将元数据添加到纹理,稍后“资源编译器”可用元数据来为目标平台创建特定的纹理。可在此对话框中配置压缩方案、Mip Map 生成参数和法线贴图/alpha 贴图组合的设置。用户界面是“资源编译器”的一部分,从 Photoshop 中将文件保存为 CryTIF 时就会启动。CryTIF (.TIF) 格式被用作中间文件格式,基于 TIFF 格式,不仅包含作为元信息储存的“资源编译器”的不同设置还包含未压缩的纹理。每当将纹理保存为 .TIF (CryTIF) 文件时,插件就会将纹理发送到“资源编译器”,为目标平台创建特定的文件格式的纹理。通过在未压缩的纹理上使用预设,就可以用更灵活的方式指定最终的输出格式。工程师就能轻松地指示“资源编译器”使用针对单个源文件中的目标平台的优化设置创建 PC 和控制台纹理。

请注意,在 RC 用户对话框中修改 TIF 的元数据后,TIF 不会被重新加载。因此,如果之前没有重新加载文件就将其再次保存在 Photoshop 中,就需要再次指定设置。

 

不推荐或不支持在没有“资源编译器”的参与下直接创建 .dds 文件。

 

用户界面

若要在 Photoshop 中保存纹理,请转到*文件*菜单,单击*保存*。出现文件对话框时,将格式选为 CryTIF,选择名称并保存。TIF 文件被写入磁盘后,“资源编译器”的纹理对话框就会出现。

预览窗口

上部区域中有两个图像,左侧是原始图像,右侧是使用预设预览已处理的图像。

如果要保存的 Photoshop 图像的尺寸不是 2 的幂次方(例如 256x256、512x512、1024x1024),就会看到警告文本而不是预览。预览图像的正下方是就是不同的图像属性,如D分辨率、Mip Map 数目、纹理格式和内存等。左侧显示原始值,右侧的值基于选择的预设或自定义设置。


鼠标导航

按钮描述
鼠标滚轮l放大/缩小
鼠标按钮单击 + 移动移动纹理

预设

预设位于预设列表文件(通常是 rc_presets_pc.ini)。

下拉列表暂存指定到纹理的预设。预览窗口的右侧自动显示使用预设值的纹理。纹理属性也被更新。请根据要保存的纹理类型选择预设(例如:漫反射纹理就选择 Diffuse_highQ ,法线贴图就选择 Normalmap_highQ)。以 _lowQ 结尾的选项能减少内存消耗,但会产生稍微低质量的结果。这些预设将自动选择适当的像素格式,例如对于法线贴图,就选择 3DC 压缩。如果想自定义像素格式,请从预设列表中选择 " "

上述列表描述最常见的常见预设。通过将新预设添加到 bin32/rc/rc.ini 引用的 .ini 文件就能扩展列表。默认情况下是 rc_presets_pc.ini 文件。

预览选项

*放大*和*缩小:*更改预览中纹理的大小。使用此选项能看到纹理细节以及纹理受压缩的影响。单击预览区域并拖动鼠标就能平移图像。

*重复拼贴:*如果显示大小比原始纹理大小小,就启用/禁用纹理重复拼贴。

*双线性滤镜:*启用/禁用双线性滤镜。模拟游戏引擎内的纹理外观。

*通道下拉列表:*使用此下拉列表可预览若干个功能。列表下方是对显示在预览窗口的项目的解释。

RGB: 显示 RGB 颜色通道(默认模式)

RGB Bump2Normal 选项卡

CryTIF 插件能将灰度凹凸贴图转换成法线贴图。为达到此目的,请从预览列表中选择 CryEngine.Bump2Normalmap _highQ,然后转到底部的高级选项更改参数。可调整下列参数:

分辨率选项卡

 

*“降低分辨率”下拉列表*能选择不同的分辨率调整。尽管游戏中高分辨率的源文件会非常小,此列表对此种文件很有用(例如,用于升级和最终游戏资源的纹理)。

引擎内在恰当的位置也许存在自动纹理调整过程。请使用程序员检查是否为开发环境启用了此种优化。

其他分辨率选项卡以优化和例外功能为特点。

AlphaUsedAsBump 选项卡

生产过程中,有时需要将低频法线贴图与第二高频法线贴图混合来创建于原始低频版本不同的变化。如果直接在 Photoshop 中做此操作,转换过程中缩放纹理时就会分散复杂的细节。这就会导致纹理高频部件细节的丢失,甚至可能导致错误的法线。此功能转换法线贴图的高频灰度 alpha 通道并将其与法线贴图的标准 RGB 通道结合。因为此功能是在缩放、使用专有锐化算法以及低频法线贴图标准化后使用,所以得到的细节比用传统方法更好。对此功能的调整也很简单。若要启用此功能,请从预设列表中选择 Normalmap_highQ 并在 AlphaUsedAsBump 选项卡中将*滤镜*选项设为 Gauss

此时预览窗口应有所变化来表明更改。

MIP 控制选项卡

控件允许对 Alpha 通道 mip map 进行手动调整。这对纹理包含细节,如在铁网围栏中,尤其有用。可使用滑杆在不同的 Mip 关卡中转变 alphatest 偏移。可调整纹理值并假设一个微调结果的常数 alphatest 值。

向下滚动时,最底部的滑杆控制 mip 锐化。这是一种应用于 mip map 以抵消 mip map 生成期间降低纹理尺度时自然产生的模糊的锐化滤镜。此功能能极大地提高图像质量、默认值是 35。

Mip map 下拉列表

生成输出

按*生成输出*按钮,在不关闭 CryTIF 对话框的情况下,强制直接转换至目标输出格式。

然后就能切换至 CryENGINE 并查看更改的设置结果(Sandbox 自动重新加载/更新更改的纹理)。这对每次更改后无需重新保存或重新打开对话框而直接测试压缩设置非常有用。