This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Полезные советы
Программирование на C#
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров узла
Setting Up Materials
Setting Up Properties
Освещение
Landscape Tool
Sandworm (Experimental)
Использование инструментов редактора для конкретных задач
Extending Editor Functionality
Встроенные объекты
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
UnigineScript
C++
C#
Унифицированный язык шейдеров UUSL
Rebuilding the Engine Tools
GUI
Двойная точность координат
API
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
Работа с контентом
Оптимизация контента
Материалы
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

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: 24.11.2020
Build: ()