This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
创建内容
内容优化
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Debug Materials

A debug material is a material that can be used for debugging of the image generation stages. By using the debug materials, you can check how the scene looks on a certain stage, visualize contents of the rendering buffers, check how they are blended into the final image. It means that you can render only reflections, or lighting, or only cubemaps, and so on.

The debug materials also allow you to check how sRGB correction and automatic exposure affect the final image.

The debug material includes all deferred buffers that are used on the Deferred Composite stage of the rendering sequence: you can compose contents of these buffers in any desired way. However, note that according to the rendering sequence, the debug materials are rendered after transparent objects rendering. So, the deferred buffers will contain data written by the transparent objects (if their materials have the Deferred Buffers flag set).

Notice
The debug material can be used as a composite material.

UNIGINE provides a set of preconfigured materials inherited from the debug_materials material: you can use one of them or inherit from debug_materials and set up your own debug material.

Notice
The debug material doesn't change the image rendered in the viewport: it is rendered atop the current viewport as a debug image. This image can be modified: you can change its size, or specify an offset along the axes.

The debug materials have the higher priority than the settings in the Rendering Debug Panel of the UnigineEditor.

Applying Debug Materials#

To apply a debug material, perform the following:

  1. Enable rendering of the debug materials in one of the following ways:
    • Via the UnigineEditor: on the Menu Bar, choose Rendering -> Features -> Debug.
    • Via the console: specify 1 for the render_debug console command.
  2. Specify the debug material that should be applied in one of the following ways:
Notice
You can specify several comma-separated materials: they will be applied in the specified order, so the last material in the list will be rendered atop the other debug materials.

Masking Debug Materials#

By using the mask, you can control the area of debug material visibility. For example, by using the mask, you can create a smooth transition between the image that displays a rendering buffer and the final image. Or you can combine these images as follows:

Diffuse Lighting Image (debug_lights material) Combined with Final Image

Debug Materials Presets#

UNIGINE provides a set of preconfigured debug materials that allow debugging lighting, reflections, screen space effects, and so on. These materials are available in the Materials Hierarchy Window:

Debug Materials Presets in Materials Hierarchy

Such materials are inherited from debug_materials. You can apply one of them as is, or inherit a new material from one of them and change the parameters, apply a mask texture, or toggle the states on and off.

The following pictures demonstrate some of the preconfigured debug materials applied to the scene:

debug_ssao Material
debug_ssr Material
debug_ambient_light Material
debug_diffuse_light Material
Last update: 2022-03-10
Build: ()