Ara
Download

Search or run a command

Jump to a section or open an Ara link.

Component · render

MeshRenderer

Draws geometry at the entity's interpolated world transform.

Fields

Procedural shape, drawn when model is empty.
default "box"shown when model is

One ofboxspherecapsuleplane

size

vec3
Shape size: box extents, sphere/capsule diameter in x and capsule height in y, plane extents in x and z.
default [1,1,1]m≥ 0.0001shown when model is

model

option<asset>
Imported model (@path#id of a glTF/FBX source). Its meshes are drawn instead of the shape; skinned meshes follow this entity's Animator.
default null

node

option<string>
Source node name or numeric glTF index. name:3 selects a numeric name. The drawable subtree retains source rotation/scale and restores its pivot to the entity origin. Absent selects the complete default scene.
default nullshown when model is

primitive

option<u32>
Zero-based primitive within the selected subtree (or whole model).
default nullshown when model is

materialOverrides

list<PrimitiveMaterialOverride>
Native material assets by subtree-local primitive slot; omitted slots use the model.
default []

color

color
Linear base color multiplier and opacity.
default [1,1,1,1]

roughness

f32
Perceptual roughness.
default 0.60 – 1

metallic

f32
Metalness.
default 00 – 1

emissive

vec3
Default procedural radiance, or an RGB emission multiplier with a model/material asset. Models treat zero RGB as neutral; use emissiveEnabled to switch them off.
default [0,0,0]

emissiveEnabled

bool
Enables emission without modifying the source model or its materials.
default true

emissiveStrength

f32
Emission multiplier, applied once after the source or overridden factor.
default 1≥ 0

emissiveFactor

option<vec3>
Optional linear RGB replacement for the source emissive factor, useful for lamps.
default null≥ 0

emissiveMaterials

list<string>
Source material names or numeric indices affected by emissiveFactor. Empty targets all; name:3 disambiguates a numeric material name.
default []

Usage

Every edit is an undoable command: from the CLI as below, or the same JSON from an agent over MCP. See component.add and property.set.

Add it

ara do component.add -p entity=name:Crate -p component=MeshRenderer --why "Add MeshRenderer"

Set a field

ara do property.set -p entity=name:Crate -p path=MeshRenderer.shape -p value="box" --why "Tune MeshRenderer"

In a scene document

{
  "MeshRenderer": {
    "shape": "box"
  }
}

From C#

/// <summary>Brighten a model lamp without replacing its material.</summary>
public static void UseMeshRenderer(Entity entity, in Tick tick)
{
    ref var component = ref World.Get<MeshRenderer>(entity);
    component.EmissiveStrength = 2f;
}

From C#

Scripts read and write it with Get<MeshRenderer>(); see the MeshRenderer struct.