Models
The engine draws meshes, and it loads exactly one mesh format: .esmesh. A .gltf,
.glb or .fbx is a source, not an asset — bringing one into a project runs an import
that writes the assets a scene can actually reference.
Both formats produce the same products and go through the same settings; where FBX differs is its own section below.
That import is the subject of this page. For the component that draws the result see the component reference; for materials in general see Materials.
Built-in primitives
Section titled “Built-in primitives”Seven shapes need no import and no file. + Add → Create entity… → Cube (or Sphere, Capsule, Cylinder,
Cone, Plane, Quad) makes an entity whose MeshRenderer.mesh holds a builtin: ref, and the
same seven appear at the top of the picker on any MeshRenderer.mesh field.
| Ref | Shape |
|---|---|
builtin:cube |
100-unit box, one flat normal per face |
builtin:sphere |
100-unit sphere, smooth normals |
builtin:capsule |
100 units tall — radius 25, 50 of cylinder between the caps, the shape CapsuleCollider3D describes |
builtin:cylinder |
100-unit upright cylinder, flat caps |
builtin:cone |
100-unit cone standing on its base |
builtin:plane |
100-unit square in XZ, facing up — a ground |
builtin:quad |
100-unit square in XY, facing the camera — a backdrop |
They are built in code at load time, so they cost no bytes in a package and a scene that
references one carries no dependency. All eight are the same size as a new ShapeRenderer,
so one dropped into a scene is visible without being scaled first; give it the size you
want through the Transform, the way an imported model gets one.
The five closed shapes are created opaque and back-face culled, which is what lets them
hide each other instead of blending in submission order; plane and quad are flat, so
they stay two-sided and are still there when seen from behind.
A primitive is 100 units deep as well as wide, which a camera placed for flat content is not far enough back for: leave it at the 2D default and the near half of every solid falls in front of the near plane. Put the scene camera a few hundred units away, as the 3D examples do.
Importing a model
Section titled “Importing a model”Three doors, one import:
| How | What happens |
|---|---|
Drag a .gltf/.glb/.fbx onto the Content Browser |
The source is copied in (with the files it points at) and imported. |
| Put one in the project folder | The editor notices and imports it — a git checkout, a copy in Finder, a re-export from Blender. |
estella import-model <file> [outDir] --project <dir> |
The same import, on the command line. --scale <n> sizes it. |
Products land beside the source, not in whatever folder the browser is showing: re-importing has to overwrite the same files.
What the import writes
Section titled “What the import writes”For robot.gltf with two primitives and one image:
| Product | What it is |
|---|---|
robot_0_0.esmesh, robot_1_0.esmesh |
One per primitive — geometry, named <stem>_<mesh>_<primitive> (just <stem> for a single one). |
robot_0.png |
Images the file carries inline. An image already on disk is referenced, never copied. |
robot_m0.esmaterial |
Only when the source’s material says something a MeshRenderer cannot — see Materials. |
robot_Walk.estimeline |
One per animation in the source, named <stem>_<animation> — see Animations. |
robot.esprefab |
How the pieces go together: the node hierarchy, each MeshRenderer with its mesh, texture, tint and flags. |
Drag the prefab into a scene. The individual .esmesh files are assets too — a
MeshRenderer.mesh field takes one directly — but the prefab is the model as authored.
Folded under the model
Section titled “Folded under the model”In the Content Browser a model’s products are folded under it, as Unity folds a model’s sub-assets: the model is one entry with an arrow at its thumbnail’s edge (at the start of its row in the list), and its meshes, materials, clips and prefab show right after it, on one darker band, while it is open. A search lists everything it finds, unfolded, and Browse to Asset on a folded product opens its model and selects it. Folding moves nothing: the products are the same files beside the model, referenced by uuid as before.
Each product’s .meta says which model it came from: source, the model’s uuid, written by the import (as Unreal keeps
an imported asset’s source). A product folds under that model while the two are in the same folder. A project imported
before this was recorded folds by the names the import gives (<stem>.esprefab and the meshes, materials, clips and
baked data named <stem>_…); an image beside the model is the artist’s and never folds by its name.
A model dropped on an asset slot in Details (or given to it with Use Selected Asset) puts in the product the slot takes: a mesh slot gets the model’s mesh, a material slot its material, a prefab slot its prefab. Where several fit (the meshes of a many-part model), a menu at the drop asks which, as Unreal does; where none does, the slot stays as it was and says so. The Content Browser keeps its selection, greyed, while an entity is selected, so Use Selected Asset still has something to use.
Tangents
Section titled “Tangents”A mesh that has normals and UVs is written with a tangent at each vertex, so a normal map is read against the frame it was
baked in rather than one derived per pixel from screen-space derivatives (which is right on average and wrong at a UV seam or on
a stretched texture). A glTF’s own TANGENT keeps its direction; a mesh without one gets it from its UVs, weighted by the angle each
triangle makes at the vertex. The bitangent’s side is always taken from the geometry as stored, so it is right whichever way the
importer turned V. A mesh imported before this carries none and is shaded as it was; re-import it to get them. A shader of your own
that calls perturbNormal gets the mesh’s frame without any change.
Models are authored in metres — an FBX authored in centimetres is converted on the way in. A world unit is a design pixel. A 1.7 m character therefore arrives 1.7 units tall — a couple of pixels — unless you say otherwise.
The import does not guess a factor. It tells you when a model came in small, and the
number that fixes it is Scale in the source’s Import Settings (select the source in the
Content Browser). Saving it re-imports the model.
Scale lands on the prefab root’s Transform, never baked into the geometry — the
.esmesh stays faithful to the source, and the number stays visible and editable.
A triangle budget
Section titled “A triangle budget”A sculpt, a scan or a generated model can carry a million triangles or more, far past what a game draws. Set
Max Triangles in the model’s import settings and the import cuts the model to at most that many, every mesh by the
same share; 0, the default, leaves it as it is. The source file keeps every triangle, so the number can be raised
later. Skinned meshes are cut too and keep their rig and animations; morphing meshes are left as they are. A model
generated with the editor’s Tripo tools is a smart low-poly one by default, under 20,000 triangles; asked for at Tripo’s full topology, it keeps every triangle unless the agent also asks for a budget (max_triangles).
Cluster LOD
Section titled “Cluster LOD”A triangle budget throws detail away for every view. Cluster LOD keeps all of it and draws the part a view can tell
apart. Tick it in the model’s import settings and each dense static mesh is cut into clusters of up to 128 triangles;
neighbouring clusters are simplified together to half their triangles, level after level, down to a handful. Each
frame, every part of the mesh is drawn from the level whose error is under a pixel from where the camera stands: the
mesh’s own triangles under the camera and a few hundred across the valley, with no seam where two levels meet and no
LODGroup to set up. Shadows are drawn from the same triangles as the surface.
What it costs: the .esmesh grows by about the size of its index data (every level’s triangles are stored, and they
share the mesh’s vertices), the engine keeps those indices in memory, and a camera that moves has the index buffer
rewritten for each mesh whose clusters changed. What it leaves alone: skinned and morphing meshes are drawn whole, and
so is a mesh placed many times through MeshInstances. The download is no smaller, so where package size is the
limit, as in a mini-game, a triangle budget is still the tool. A mesh with Cluster LOD gets no Generate LODs levels.
The frame counters say what it did: render.cluster.triangles is what the scene drew of the
render.cluster.sourceTriangles its clustered meshes have, and render.cluster.rebuilt is how many of them had their
index buffer rewritten this frame. To see it, pick Clusters in the viewport’s shading menu: every cluster is drawn
in a colour of its own, so the size of the patches says which level each part of a surface is drawn at. Select one
such mesh and the viewport’s selection readout says what the view drew of it, such as 8,512 of 9,216 tris drawn ·
67 clusters, and follows the camera as it moves; a mesh without clusters shows its own count.
Generated levels of detail
Section titled “Generated levels of detail”A mesh seen from far away does not need the triangles it has up close. Set
Generate LODs in the model’s import settings to 1, 2 or 3 levels and the
import collapses each mesh into cheaper copies — about 50%, 20% and 7% of its
triangles — written beside it as <mesh>_lod1.esmesh, _lod2 and _lod3, and
adds a LODGroup to the entity that draws it. The
group swaps a level in as the object shrinks on screen (below 40%, 18% and 7% of
the viewport height).
The collapse keeps the shape within a small error of the mesh’s own size and refuses to pull apart a UV seam or a hard edge, so a texture still lands where it did. Every surviving vertex is a copy of one the source had, so vertex colours and the lightmap UV come along. A level that would shed less than 15% of the level above is left out, and a mesh under LOD Minimum Triangles (256 by default) gets none. A skinned or morphing mesh keeps a single level.
Levels are extra files: three of them add about three quarters of the original
meshes’ size to the project. They cost memory only when a view needs them — they
are what makes a large scene cheaper to draw, not smaller to ship. The
command-line import takes --lods <0-3>.
Lightmap UVs
Section titled “Lightmap UVs”A baked lightmap is read through a second UV set, and it has to be one where no two surfaces land on the same texels. The set the art is wrapped in is not: two arms deliberately share one arm’s pixels, which is what keeps a texture small. Give them the same lightmap texels and one arm’s shadow falls on the other.
Turn on Generate Lightmap UVs in the model’s import settings and the import unwraps one: the surface is cut into nearly-flat charts, each is projected onto its own plane, and they are packed into the unit square at one world-to-texel ratio — so a wall is lit at the same resolution as the floor it meets. Vertices on a chart boundary are split, so the mesh comes back with more of them than the source had; nothing moves, and every shape, skin weight and vertex colour follows its vertex.
It is off by default because most models are never baked, and a split vertex costs memory whether or not anything reads the channel. Two models never get one:
- A skinned mesh, because bones move it and a bake cannot follow.
- A model that already carries a second UV set, because the layout is the author’s and the art may be painted against it. Blender’s Smart UV Project into a second UV map is exactly this, and it is usually better than what an importer can infer.
The import reports how much of the atlas the charts fill. A low number means the charts are many and small: raise the chart angle and they merge, at the cost of more stretch inside each one.
See Baked light for what reads the result.
Re-importing
Section titled “Re-importing”An import runs again when:
- the source file changes (re-exported over the top of the old one);
- Reimport is chosen on it in the Content Browser;
- an import setting is saved.
Asset uuids survive, so scenes and prefabs that reference the products keep working.
Materials
Section titled “Materials”A glTF material is split by what can carry it.
On the MeshRenderer component — base colour, because that is what the engine’s mesh path
already is (texture(uv) × vertexColor × tint):
| glTF | Component field |
|---|---|
baseColorTexture |
texture |
baseColorFactor |
color |
alphaMode ≠ BLEND |
opaque |
doubleSided: false |
cullBackfaces |
a NORMAL attribute |
lit: true |
In an .esmaterial — shading, which is per-material constants and samplers a
component has no room for. Written only when the source uses one of them, on the built-in
Model shader:
| glTF | Material parameter |
|---|---|
normalTexture / normalTexture.scale |
u_normalMap / u_normalScale (default 1) |
emissiveFactor / emissiveTexture |
u_emissive / u_emissiveMap |
occlusionTexture (+ strength) |
u_occlusionMap / u_occlusionStrength |
alphaMode: MASK + alphaCutoff |
u_alphaCutoff |
metallicFactor / roughnessFactor / metallicRoughnessTexture |
u_metallic / u_roughness / u_metallicRoughnessMap |
KHR_materials_pbrSpecularGlossiness |
Model variant ES_SPECULAR_GLOSSINESS; u_specularColor, u_glossiness, and the packed map in u_metallicRoughnessMap |
KHR_materials_clearcoat |
u_clearcoat / u_clearcoatRoughness |
KHR_materials_sheen |
u_sheenColor / u_sheenRoughness |
KHR_materials_anisotropy |
u_anisotropy / u_anisotropyRotation |
KHR_materials_ior, KHR_materials_specular (specularFactor) |
u_ior, u_specular |
KHR_materials_iridescence |
u_iridescence / u_iridescenceIor / u_iridescenceThickness (the middle of the min–max range) |
KHR_materials_diffuse_transmission |
u_translucency / u_translucencyColor |
KHR_materials_transmission, KHR_materials_volume |
u_transmission, u_thickness, u_attenuationColor — and the material draws blended |
Metal and roughness are written even when they match the engine’s own defaults: glTF defaults both factors to 1 (a fully rough metal) and the shader defaults metal to 0, so a product that left them out would describe a surface the source did not.
For a legacy specular/glossiness material, its diffuse texture and factor replace
the metallic/roughness fallback’s base colour on MeshRenderer. Its specular RGB
and glossiness alpha use the same native lighting path as other Model materials;
RGB is decoded from sRGB, alpha stays linear, and roughness is 1 - glossiness.
The packed map reuses the existing sampler slot. Character-name presets do not
replace this explicitly authored workflow. New authoring can use metallic/roughness;
this variant preserves existing glTF exports without an approximate conversion.
Normal strength scales the tangent-space X/Y channels before normalization, on Model, Skin and Hair materials. Zero produces a flat normal; negative values invert the relief. Blended model materials test depth against opaque geometry while leaving depth writes off, so transparent leaves behind a wall remain behind it.
A texture the material names that is not in the project (the file is missing next to the model) is left off: the model imports without it and a warning says so, instead of keeping a reference that fails to load on every use.
The material also restates the draw’s blending, depth and culling, because a material replaces them — a model told to occlude itself keeps doing so through its material.
Character materials
Section titled “Character materials”A model’s materials import on the Model shader. Turn on Character Materials (characterMaterials: auto) in the model’s import settings and a material whose name says skin, face, head, hair or eye gets the Skin, Hair or Eye shader instead, with its normal map and its occlusion/roughness map bound to them. The hair’s triangles are also put in the order a blended draw wants, the cards nearest the middle of the hair first, which is back to front from any side for a shell of cards around a head (a ponytail that leaves the shell is not ordered by it). A hair material is cut out by its alpha (u_alphaCutoff, 0.5 unless the source says otherwise) and drawn without blending, so its edges are feathered by coverage. The name is read word by word, so BodySkin and Hair_A match while Eyelashes and Headband do not, and the colour texture’s file name counts too. A name is a convention, not a fact: look at what it chose in the materials the import writes, and change a shader by hand where it guessed wrong. Eyes need their iris maps (u_depthMap, u_irisNormalMap) assigned by hand, as the source has no slot for them. Hair’s strand-direction and highlight-shift maps have no glTF slot either, so a hair material names them in its extras (flow_map and shift_map, paths from the model, and suggested_tipSoftness) and the import binds them as u_flowMap, u_shiftMap and u_tipSoftness. It is off by default, so re-importing never changes a material you did not ask about.
Spring bones and the specular map
Section titled “Spring bones and the specular map”Two more model import settings, both under advanced:
| Setting | Default | What it does |
|---|---|---|
Spring Bones (springBones) |
Off | From File Data and Names gives hair its secondary motion from what the model already says: a VRM spring-bone extension or extras.estella.springBone / springCollider is used as stated, and for what they leave out a bone called Hair_<region>_<chain>_00 becomes a SpringBone and an empty called SBC_Sphere_<name>_r<cm> or SBC_Capsule_<name>_r<cm>_h<cm> a collider. See Spring bones. |
Specular Map (specularMap) |
Specular Color | What the source’s specular map holds. Packed ORM binds it as occlusion, roughness and metalness, for scenes that pack them there (Bistro, Sun Temple); the default reads it as a highlight tint, which the metal/rough shading has no slot for. FBX only. |
Animations
Section titled “Animations”Each animation in the source becomes an .estimeline beside the meshes, and the prefab’s
root carries a TimelinePlayer pointing at the first one with playing off — what to play
is the scene’s decision. Set playing, or call the timeline API, to run it.
A clip drives the nodes it was authored against, addressing each by its path of names under the prefab root. Two sibling nodes sharing a name are given distinct ones during the import so a track cannot drive the wrong one; that name is what the prefab shows.
LINEAR, STEP and CUBICSPLINE all carry across, tangents included.
A weights channel (an animation of a model’s morph targets) comes too: it becomes a
track per primitive the node draws, with one channel per target, so the clip drives the
MeshMorph weights described under Morph targets.
Lights and cameras
Section titled “Lights and cameras”A glTF’s KHR_lights_punctual lights and cameras, and an FBX’s point, directional and
spot lights and cameras, become Light and Camera components on their nodes inside
the prefab, turned to face -Z as the engine’s do. Colour, cone angles, reach, field of
view and clip planes carry over; intensity is carried as the file states it, since the
engine’s has no photometric unit. An imported camera is never the active one, so a
model cannot take the view away from the scene’s own camera.
Skinning
Section titled “Skinning”A rigged model comes in rigged: the mesh carries its joint indices, weights and bind pose,
and the prefab gives the entity a MeshSkin naming the joint entities in the order those
matrices are in. Moving a joint — by hand, or by the animation above — deforms the mesh.
A skinned mesh’s own transform is ignored, which glTF requires: its joints are already placed in the world, so moving the mesh entity does nothing. Move the rig’s root, or the joints.
| Limit | Why |
|---|---|
| 256 joints per mesh | The pose is a uniform block, which is 16KB at that size — exactly what a WebGL2 block is guaranteed. A draw sends only the joints it has, so a small rig pays nothing for the room. A mesh wanting more draws undeformed. |
| Joint count must match the bind pose | A mesh whose MeshSkin names a different number of joints draws undeformed rather than with vertices resolved against the wrong matrices. |
Morph targets
Section titled “Morph targets”A model that carries shapes to blend towards — blend shapes, in most DCC tools — brings
them with it: the .esmesh holds one delta per vertex per target beside the vertices, and
the prefab gives the entity a MeshMorph whose weights say how far it is blended towards
each. Entry i is target i, in the order the file lists them; the names the source
carries are kept with the geometry, so a weight addresses a shape by position.
A weight of 0 leaves the mesh as authored and 1 is the target in full. Neither is a bound: glTF states none, and pushing past 1 or below 0 is a shape an author may want.
| Limit | Why |
|---|---|
| 64 shapes blended at once | A budget on what is LIVE, not on what a mesh carries. A draw pays only for the shapes it is using, each a texture read or two per vertex, so dozens live on a dense mesh cost more than a handful. Past 64 the heaviest weights are taken; the rest read as zero, which is what an untouched weight already means. |
| 4,194,304 deltas per mesh | Shapes × vertices, twice that with normals: a 2048-square texture, the most WebGL2 guarantees. Past it the mesh draws but never changes shape. |
| Normals deform only where the geometry has them | A mesh with no NORMAL channel is shaded off a constant normal, which no delta can bend. |
| Morph targets carry no tangents | The mesh keeps the tangent frame it has at rest; a shape moves the surface but not the frame its normal map was baked in. |
| An FBX’s in-between shapes | A channel that passes through shapes on its way to the last one carries only the last; the import says which it dropped. |
FBX is read by ufbx, built into the editor — no Autodesk FBX SDK, nothing to install. Binary and ASCII, and every version from the 5000-series up, go through the same reader.
What the format needs that glTF does not, the import settles before anything downstream sees it:
| FBX says | What arrives |
|---|---|
| Its own up axis and unit (centimetres, Z-up, …) | Converted to the engine’s: +Y up, one unit is one metre. |
| Polygons of any size | Triangles. |
| Geometry offset from its node with no node to hold it | A child entity holding that offset, named GeometryTransform. |
| A mesh split across several materials | One .esmesh per material run — the same split glTF calls a primitive. |
| Rotations as Euler angles around pivots, with pre- and post-rotation | Baked into position/rotation/scale keyframes (resampled at 30 fps where the curves are not already linear). |
Materials are read through ufbx’s own mapping, so Phong, Lambert, Maya’s Standard Surface, 3ds Max’s Physical and Blender’s Principled all arrive as the same parameters listed under Materials — a Phong material’s roughness is derived from its specular exponent, and it reports no metalness rather than a made-up zero-metal surface.
Two things about FBX materials are worth knowing before you author for it:
- Separate metalness, roughness and occlusion maps are packed for you. The engine’s Model
shader samples one image packed the way glTF packs it (occlusion in red, roughness in
green, metal in blue). Exporters normally write a separate image for each, so the import
reads them (the value is the red channel; a glossiness map is inverted), packs them into
one
<material>_orm.pngbeside the model, and binds it to both slots. A channel with no map stays at full, so the material’s own metallic or roughness value still says it, and maps of different sizes are lined up on the largest. Only PNG and DDS can be read there: with another format the import says so and uses the constants. - An opacity map is not carried. Alpha comes from the base colour image’s own channel.
Compressed geometry (glTF)
Section titled “Compressed geometry (glTF)”EXT_meshopt_compression and KHR_draco_mesh_compression are decoded during import, so a
compressed export produces the same .esmesh as an uncompressed one. Nothing about the
runtime changes: compression is a property of the source file, not of the product.
What is reported, not imported
Section titled “What is reported, not imported”The import never drops anything in silence — whatever it cannot carry appears as a note when it runs.
| Not imported | Why |
|---|---|
A material texture that asks for TEXCOORD_1, a KHR_texture_transform that offsets, scales or rotates, an FBX uv transform |
A material samples the first UV set as authored. (The mesh itself keeps its second UV set, which a lightmap or a material’s v_texCoord1 can read.) |
Non-triangle primitives (mode ≠ 4) |
The renderer draws triangle lists. |
The textures of a shading layer (clearcoatTexture, sheenColorTexture, anisotropyTexture, …), specularColorFactor, attenuationDistance |
Each layer is a constant for the whole material; its factors are kept and the textures are reported. See Shading layers. |
| Area and volume lights | Named in the import notes and skipped. (Point, directional and spot lights, and cameras, are imported: see Lights and cameras.) |
| Separate FBX metalness/roughness maps, an FBX opacity map | See FBX. |
Limits worth knowing
Section titled “Limits worth knowing”- A material that writes its own vertex stage is not redirected onto mesh geometry — it would ignore the per-object transform. Fragment-only materials work on both.
- Geometry with no
NORMALattribute still takes light, off the constant normal a 2D surface has — flat, but not black.