This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Браузер SDK 2
Лицензирование и типы лицензий
Дополнения (Add-Ons)
Демонстрационные проекты
API Samples
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
Унифицированный язык шейдеров UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
Справочник 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
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Matrix
Textures
Art Samples
Учебные материалы

Dot Product Node


Description

Outputs the dot product of two vectors A and B, which is the sum of the multiplication of each vectors components. For example, if A and B are 3-component vectors, then the result is A.x * B.x + A.y * B.y + A.z * B.z.

If A and B have a different number of components, a cast is performed to match the one with the greater number of components.

The geometric interpretation of the dot product is that it represents the magnitude of one vector's projection onto another. This projection can be visualized as the "shadow" of one vector cast onto the axis defined by the direction of the other.

The dot product is commutative, so the order of arguments is not important.

This operation is essential in shading, determining light intensity based on the alignment between the surface normal and the light direction.

Usage Examples

View-Dependent Shading

The example demonstrates a view-dependent shading effect, where color transitions are based on the alignment between the view direction and the surface normal.

The outputs of the View Direction and Vertex Normal nodes in Tangent space are connected to the Dot Product node that calculates the dot product of these vectors. The result is inverted by subtracting it from 1 using input adapter and passed to the Lerp node as a linear interpolation coefficient. The Lerp node blends between two colors — red and green — based on this coefficient. The result of linear interpolation provides Albedo values for the Material.

The information on this page is valid for UNIGINE 2.20 SDK.

Last update: 04.04.2025
Build: ()