Page History
English | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Texture CompilationIn 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.
OverviewThe 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.
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 WindowsIn 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.
PresetThe presets come from the preset list file (normally 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
Preview Options
RGB Bump2Normal TabThe 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:
Resolution TabReduce 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).
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.
AlphaUsedAsBump TabIn 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 TabThe 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.
Generate OutputPressing 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.
TroubleshootingPlease 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 插件教程。
概述纹理对话框的主要功能是将元数据添加到纹理,稍后“资源编译器”可用元数据来为目标平台创建特定的纹理。可在此对话框中配置压缩方案、Mip Map 生成参数和法线贴图/alpha 贴图组合的设置。用户界面是“资源编译器”的一部分,从 Photoshop 中将文件保存为 CryTIF 时就会启动。CryTIF (.TIF) 格式被用作中间文件格式,基于 TIFF 格式,不仅包含作为元信息储存的“资源编译器”的不同设置还包含未压缩的纹理。每当将纹理保存为 .TIF (CryTIF) 文件时,插件就会将纹理发送到“资源编译器”,为目标平台创建特定的文件格式的纹理。通过在未压缩的纹理上使用预设,就可以用更灵活的方式指定最终的输出格式。工程师就能轻松地指示“资源编译器”使用针对单个源文件中的目标平台的优化设置创建 PC 和控制台纹理。 请注意,在 RC 用户对话框中修改 TIF 的元数据后,TIF 不会被重新加载。因此,如果之前没有重新加载文件就将其再次保存在 Photoshop 中,就需要再次指定设置。
用户界面若要在 Photoshop 中保存纹理,请转到*文件*菜单,单击*保存*。出现文件对话框时,将格式选为 CryTIF,选择名称并保存。TIF 文件被写入磁盘后,“资源编译器”的纹理对话框就会出现。 预览窗口上部区域中有两个图像,左侧是原始图像,右侧是使用预设预览已处理的图像。 如果要保存的 Photoshop 图像的尺寸不是 2 的幂次方(例如 256x256、512x512、1024x1024),就会看到警告文本而不是预览。预览图像的正下方是就是不同的图像属性,如D分辨率、Mip Map 数目、纹理格式和内存等。左侧显示原始值,右侧的值基于选择的预设或自定义设置。 鼠标导航
预设预设位于预设列表文件(通常是 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 自动重新加载/更新更改的纹理)。这对每次更改后无需重新保存或重新打开对话框而直接测试压缩设置非常有用。 |