CryTIF Plugin

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 CryTIF Plugin for Photoshop tutorial in the CRYENGINE Overview documentation.

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.

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

Pre-CRYENGINE 3.8:

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.

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.