Skip to main content

Assets

Tellusim assets are represented as directories with a *.asset extension or as archive files. Each asset must include a meta info file describing its properties.

info

The meta info file can be based on either Xml or Json.

info

The meta info file can include additional user-defined parameters.

info

ZIP archives with zero compression are highly effective for fast asset loading.

Object Assets​

Object assets are designed for use with ObjectMesh types. These assets must include an object.asset meta info file.

The meta info file must define the following parameters:

  • mesh_name - The name of the mesh file within the archive.

  • mesh_flags - (Optional) A comma-separated string representing ObjectMesh::Flags. This parameter overrides the flags argument passed to ObjectMesh::loadAsset().

info

Valid mesh_flags values include: upd, dir, ver, opt, ske, ani, mat, tes, v16, i16, mes, tra, spa, poi, lin, tri, qua, bas, nor, ski, tex, tex2, tex4, col, col2, col4, mor.

Example (Object Asset)​

<?xml version="1.0" encoding="utf-8"?>
<object>
<mesh_name>model.usdc</mesh_name>
<mesh_flags>opt,mat,ski</mesh_flags>
</object>

Material Assets​

Material assets are designed for use with Material types. These assets must include a material.asset meta info file.

The meta info file must define the following parameters:

  • num_textures - (Optional) The number of texture entries in the asset.
  • texture - One or more blocks defining texture parameters.
  • num_uniforms - (Optional) The number of uniform entries in the asset.
  • uniform - One or more blocks defining uniform parameters.

Each texture block includes:

  • name - Name of Material texture parameter.
  • hash - (Optional) String-based hash to avoid filename collisions.
  • file - Filename of the texture within the asset.

The uniform block contains:

  • name - Name of Material uniform parameter.
  • size - Size of the uniform parameter (number of elements).
  • data - Value of the uniform parameter.
info

Material assets can override texture and uniform parameters of any Material instance.

Example (Material Asset)​

<?xml version="1.0" encoding="utf-8"?>
<material>
<name>Copper_scuffed</name>
<category>metals</category>
<num_textures>3</num_textures>
<texture>
<name>normal</name>
<file>Copper_scuffed_normal.jpg</file>
</texture>
<texture>
<name>diffuse</name>
<file>Copper_scuffed_diffuse.jpg</file>
</texture>
<texture>
<name>metallic</name>
<file>Copper_scuffed_metallic.jpg</file>
</texture>
<source>freepbr.com</source>
</material>