# 1.2   3D Inscription (Experimental Stage)

This is an explanation of the attribute settings for 3D resources in Metaverse Resources. These attributes are still under experimental development, and any reference and usage at this stage are for testing purposes only and do not represent the final resource specification. Developers should assess the related issues at their own discretion.

<figure><img src="https://640704271-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOB6P9pbqh9eg6TOEDjRO%2Fuploads%2FHHh2lgU6yGK9nlZcBrHm%2Fcar.png?alt=media&#x26;token=2a275e0f-0b86-4376-8b84-fa67716545cd" alt=""><figcaption></figcaption></figure>

## Idea

3D resources are much more complex than 2D resources, and their file sizes are relatively larger as well. They also occupy more space on the blockchain and their configurations are also more complex.&#x20;

This experimental protocol divides 3D models into:

* ModelData (Model Data): The basic data of the model, generally in universal model file formats like OBJ, FBX, GLB, etc., or specific engine package resources such as UnityAsset, UEAsset, etc. This includes all vertices, normals, tangents, and other relevant data of the model.
* MaterialData (Material Data):\
  Base :  If there is a complete material data format, it can be directly referenced.

  Textures : The texture resources referenced by the material.

  Shader :  The shader resources on which the material depends.

  Animation :  The animation data of the model, which records the keyframe information for one or more animations. This is usually highly dependent on the engine but can also use universal data formats.\
  Physical : The physical properties of the model, used for physics calculations.

  Other : Other data of the model.

{% hint style="info" %}
Some 3D resource data formats can not only store the basic data of the model but also materials, shaders, and even animations, such as GLB, UnityAsset, UEAsset, etc.
{% endhint %}

### ModelData

<table><thead><tr><th width="176">key</th><th width="136.33333333333331">required?</th><th>description</th></tr></thead><tbody><tr><td>modelsrc</td><td>Yes</td><td>On-chain address of the model's source files</td></tr><tr><td>modeltype</td><td>Yes</td><td>Type of 3D model file; can be OBJ, FBX, GLB, UnityAsset, UEAsset, etc.</td></tr></tbody></table>

### MaterialData&#x20;

Material settings can either directly reference a material resource format or be assembled through Texture and Shader references. Grouped under \<meterialdata>.

#### Base

<table><thead><tr><th width="183.33333333333331">key</th><th width="124">required?</th><th>description</th></tr></thead><tbody><tr><td>src</td><td>No</td><td>If present, the data source address for the material. Ready to use.</td></tr><tr><td>type</td><td>No</td><td>Linked to data source; can be UnityAsset, UEAsset, Mat, etc.</td></tr><tr><td>basemat</td><td>No</td><td>Default texture, e.g., leather, metal, marble, etc.</td></tr><tr><td>basecolor</td><td>No</td><td>Default color</td></tr></tbody></table>

#### Texture

<table><thead><tr><th width="180.33333333333331">key</th><th width="126">required?</th><th>description</th></tr></thead><tbody><tr><td>src</td><td>Yes</td><td>Data source address for the related texture image.</td></tr><tr><td>type</td><td>No</td><td>Image format, e.g., PNG, JPG, TGA, etc.</td></tr><tr><td>propname</td><td>No</td><td>Property keyword when referenced by shader, e.g., main, normal, specular, etc.</td></tr></tbody></table>

#### Shader

Shader is a critical dependency in material resources and determines the rendering. Developers can upload their custom shader code.

{% hint style="warning" %}
Due to differences in compilation and parsing methods across engines and platforms, the 'type' attribute is crucial.
{% endhint %}

About \<shader> key:

<table><thead><tr><th width="167.33333333333331">key</th><th width="133">required?</th><th>description</th></tr></thead><tbody><tr><td>src</td><td>Yes</td><td>Data source address for the shader source code or a parseable file.</td></tr><tr><td>type</td><td>No</td><td>Shader file parsing format; can be GLSL, HLSL, UnityAsset, UEAsset, etc.</td></tr><tr><td>propname1</td><td>No</td><td><p>Default attribute settings in shader. E.g., propname1="1.8"</p><p>Animation.</p></td></tr><tr><td>...</td><td></td><td>...</td></tr><tr><td>propnameN</td><td></td><td>...</td></tr></tbody></table>

Similar to 2D settings and  \<animation> keys:

<table><thead><tr><th width="165.33333333333331">key</th><th width="132">required?</th><th>description</th></tr></thead><tbody><tr><td>src</td><td>Yes</td><td>On-chain address of the animation data resource</td></tr><tr><td>type</td><td>Yes</td><td>Parsing format for animation files; can be anime, ani, UnityAsset, UEAsset, etc.</td></tr><tr><td>name</td><td>Yes</td><td>Animation name</td></tr><tr><td>duration</td><td>Yes</td><td>Playback speed</td></tr><tr><td>loop</td><td>No</td><td>Whether it loops or not</td></tr></tbody></table>

### Physical&#x20;

<table><thead><tr><th width="158.33333333333331">key</th><th width="137">required?</th><th>description</th></tr></thead><tbody><tr><td>weight</td><td>No</td><td>Weight for physical calculations</td></tr><tr><td>friction</td><td>No</td><td>Coefficient of friction</td></tr><tr><td>status</td><td>No</td><td>Default is static; can be static or dynamic</td></tr></tbody></table>

### Other

<table><thead><tr><th width="158.33333333333331">key</th><th width="139">required?</th><th>description</th></tr></thead><tbody><tr><td>type</td><td>No</td><td>Type of model, e.g., avatar, building, transportation, plant, etc.</td></tr><tr><td>speed</td><td>No</td><td>Initial speed if it's a dynamic 3D object.</td></tr><tr><td>others</td><td></td><td>...</td></tr></tbody></table>
