This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Basics
Rendering
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Animations-Related Classes
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
VR-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Blackbody Sample

Blackbody sample

These material graph samples demonstrate how to implement simulation of black-body radiation for physically accurate emissive materials. Two material graphs are included.

The blackbody_box material showcases the change of color based on the temperature on a box.

The horizontal component of UV coordinates taken via the x port adapter from the Vertex UV 0 node is multiplied by the Temperature value (in Kelvin) provided by the Slider parameter node (enabling you to adjust the maximum temperature in the Parameters panel). Thus the changing temperature values are mapped horizontally on the box faces.

Then, we simply pass the temperature to the Blackbody node to get the corresponding color.

Additionally, the source temperature in the [0; 1000] range is remapped (the Rerange node) to the [0; 1] range and multiplied by the U texture coordinate and the color is multiplied by the saturated result preventing cold parts from being red.

Finally, the resulting sRGB color is to be converted to RGB values via the SRGB Inverse node and passed to the material's Emissive port.

Albedo and Specular values are specified directly using the Float nodes.

The blackbody_rifle material graph contains a ready-to-use implementation of blackbody-based emission of hot parts of an object.

Temperature-based colorization is applied the same way as in the previous sample, but this time vertex positions in the object space are used to define the hot parts. The y component of the Vertex Position node is adjusted via the Contrast node to make a sharper transition along the Y axis.

And the resulting mask multiplied by the Temperature parameter is used in the familiar network implementing the blackbody emission.

Albedo, Metalness and Roughness values are obtained from the corresponding textures via the Sample Texture nodes and multiplied by the corresponding intensity parameters. The Specular value is specified directly using the Float nodes.

Last update: 2024-08-16
Build: ()