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

Spline File Format

Spline File Structure#

A spline file is an .spl text file, based on the json format. This file contains all necessary information to define a spline graph consisting of points in 3D space, connected by cubic Bezier spline segments. Spline graphs can be adjusted by manually editing an .spl file in a text editor or via API.

There are 2 basic sections in the .spl file:

  • Points. This section contains the list of all points of the spline graph represented by their coordinates (X, Y, Z).
  • Segments. This section contains the list of spline segments connecting different points.

In general the syntax of the .spl file is as follows:

Source code
{
	"points": [
		[
			-1335.1749267578125,
			78.811111450195313,
			4.7690000534057617
		],
		
		...
		
	],
	"segments": [
		{
			"start_index": 0,
			"start_tangent": [
				-4.7529296875,
				4.06640625,
				-2.1245796233415604e-009
			],
			"start_up": [
				0,
				0,
				1
			],
			"end_index": 1,
			"end_tangent": [
				2.8794116973876953,
				-1.2208551168441772,
				8.9795076929632955e-010
			],
			"end_up": [
				0,
				0,
				1
			]
		},
		
		...
		
	]
}

Points Data#

The first section of the .spl file contains the array of spline points. Each point is represented as an array of 3 coordinates (X, Y, Z). The number of points is not limited. Vertex indices come in the order of appearance starting from 0.

Source code
"points": [
		[
			-1335.1749267578125,
			78.811111450195313,
			4.7690000534057617
		],
		[
			-1404.5445556640625,
			150.18548583984375,
			3.8284587860107422
		],
		[
			-1427.984130859375,
			153.21903991699219,
			3.1477432250976562
		],
		[
			40.473739624023438,
			563.27911376953125,
			2.1209244728088379
		], 
		
		...
	]

Segments Data#

The second section of the .spl file contains the list of spline segments connecting the points described above. The number of segments is not limited and does not depend on the number of points.

Each of the segments is represented by the following elements:

start_index

Index of the spline segment's starting point in the list of points.

start_tangent

Tangent coordinates at the starting point of the spline segment. Tangent coordinates define the form of the segment.

start_up

"Up" vector coordinates at the starting point of the spline segment.

end_index

Index of the spline segment's ending point in the list of points.

end_tangent

Tangent coordinates at the ending point of the spline segment. Tangent coordinates define the form of the segment.

end_up

"Up" vector coordinates at the ending point of the spline segment.

Source code
"segments": [
		{
			"start_index": 0,
			"start_tangent": [
				-4.7529296875,
				4.06640625,
				-2.1245796233415604e-009
			],
			"start_up": [
				0,
				0,
				1
			],
			"end_index": 1,
			"end_tangent": [
				2.8794116973876953,
				-1.2208551168441772,
				8.9795076929632955e-010
			],
			"end_up": [
				0,
				0,
				1
			]
		}, 
		
		...
	]
Last update: 19.12.2023
Build: ()