add rigging.md english version

This commit is contained in:
MihailRis 2024-07-13 10:32:41 +03:00
parent 4d47a20c07
commit 043a4ce255
2 changed files with 50 additions and 6 deletions

44
doc/en/rigging.md Normal file
View File

@ -0,0 +1,44 @@
# Rigging
## Skeletons
Entity skeletons are created via json files in the *skeletons* folder.
> [!IMPORTANT]
>
> The skeleton is a non-indexable content unit. When loading it, the pack prefix is added to the name (example: *drop* in the base pack -> *base:drop*).
A skeletal element, or bone, consists of a transformation matrix defining its position, rotation and scale relative to the parent element (bone) or entity if the element is the root, a model and a list of sub-elements.
A skeleton file has the following structure:
```json
{
"root": {
"name": "name",
"model": "model_name",
"nodes": [
...
]
}
}
```
- root - root element
- name - name of the element to get the index (field optional)
- model - name of the model to display the element (field optional)
- nodes - list of elements - descendants, which are affected by the matrix of this element (the field is optional)
At the moment, positioning, rotation, scaling is done through scripting, as well as animation.
The process of working with skeletons will be simplified in the future.
## Models
Models should be located in the models folder. Currently only OBJ format is supported.
>[!IMPORTANT]
> When loading an obj model, the \*.mtl file is ignored.
A texture is defined by a material name that matches the texture naming format used in preload.json.
Textures are loaded automatically; it is not necessary to specify the textures used by the model in preload.json.

View File

@ -8,17 +8,17 @@
>
> Скелет является неиндексируемой единицей контента. При его загрузке к имени добавляется префикс пака (пример: *drop* в паке base -> *base:drop*).
Элемент скелета, или кость, состоит из матрицы транформации, определяющей её положение, вращение и масштаб относительно родительского элемента (кости) или сущности, если элемент является корневым.
Элемент скелета, или кость, состоит из матрицы транформации, определяющей её положение, вращение и масштаб относительно родительского элемента (кости) или сущности, если элемент является корневым, модели и списка под-элементов.
Файл скелета имеет следующую структуру:
```json
{
"root": {
"name": "имя",
"model": "имя_модели",
"nodes": [
...
]
"name": "имя",
"model": "имя_модели",
"nodes": [
...
]
}
}
```