← Index · Prev · Next →

02 — Components

How the Babylon Object panel authors per-object gameplay data. The runtime never reads Blender PropertyGroups directly — only the manifest rows you export.

Component stack UI

Select an object → Babylon ObjectAdd Component. Each row is one manifest entry when enabled:

Cut/paste moves a component to another object; copy/paste duplicates it. Clipboard is session-scoped.

GUID identity

Adding a component (or Assign GUID) stamps bjs_id on the object. That id rides in glTF node extras and manifest entities[].id — renaming the object in Blender does not break links.

Entity references (@exposed({ type: "entity" }), camera targets, Event Message targets, constraints) store GUIDs, not names. Trace: trace-guid.

Event Messages (colliders)

On any Collider component, the Event Messages section lists authored reactions: When (Trigger Enter/Exit, Collision Enter/Exit), Target entity, Message string, optional Only Tag filter. At runtime the engine dispatches matching rows via SendMessage → target behaviors' OnMessage. Trigger-phase rows on non-trigger colliders (and collision-phase rows on pure triggers) warn at export. See 06 — Physics › Event Messages.

Script components and @exposed

  1. Open Script… — pick a .ts behavior file; registry key = filename stem (Rotator.tsRotator)
  2. Exposed fields appear as typed widgets (parsed from source — not executed)
  3. Sync — refresh widgets after you change @exposed / @inputMap in code

Cross-language rules: decorator stays lowercase @exposed; single-line literal defaults; press Sync after edits. Entity fields need type: "entity" in the decorator. Trace: trace-exposed. Runtime scripting: 05 — Scripting.

Collider preview

On a selected object with a Collider, enable Show Preview to draw a cyan wireframe in the viewport. Manual size/offset/rotation are in Blender axes (what you see); export converts to Babylon Y-up. Convex/mesh shapes use the mesh geometry — no separate wireframe.

Trace: trace-collider-preview. Dynamic bodies also show a center-of-mass cross when preview is on: trace-cog-preview.

Compound colliders

Multiple enabled Collider rows on one object merge into one physics body at runtime. The panel numbers headers (Collider 1/3, …) and shows a compound notice.

Reflection probe preview

On a selected object with a Reflection Probe, enable Show Influence Preview to draw a warm yellow wireframe of the influence volume (box or sphere) in the viewport. Place an Empty at the capture point, size the influence box to cover only the glossy meshes that need local reflections (walls, floor, props) — not the whole level. Leave Refresh Rate on Once unless reflected geometry animates.

Render All captures every scene mesh into the cubemap (minus excludes and the probe host). Turn it off to author an explicit render list. At runtime, level meshes inside the influence volume get the probe cubemap on PBR reflectionTexture; the visible skybox is always excluded and keeps scene IBL.

Real-Time Filtering (PBR section) improves how glossy materials sample the probe — it does not change what the probe captures. For sky-heavy reflections, use Babylon Scene › Environment instead of enlarging the probe volume.

Runtime: 07 — Rendering › Reflection probes.

Rendering group & layer mask

Two optional components under Rendering control how Babylon draws or filters meshes. They are not the same as a logical Tag (gameplay label) or Babylon’s 2D Layer overlay class.

ComponentBabylon propertyWhat it controls
Rendering Groupmesh.renderingGroupIdDraw order — groups 0–3 render in ascending order (useful for transparency sorting and overlays). Also applies to this entity’s particle systems.
Layer Maskmesh.layerMaskCamera / light visibility — a mesh renders when (mesh.layerMask & camera.layerMask) !== 0. Used for multi-camera HUD setups.

Both components share two toggles:

If a toggle is off, that scope keeps Babylon defaults (rendering group 0, layer mask 0x0FFFFFFF). A child’s own Rendering Group or Layer Mask always supersedes the parent for that branch — regardless of the parent’s toggles.

Layer Mask presets: Default (0x0FFFFFFF), Slot 0–3 (0x100000000x80000000 — typical HUD / overlay bits), or Custom (full 32-bit value). Matching cameras must use the same mask in app code for exclusive visibility.

Runtime detail: 07 — Rendering › Render layers · Feature trace: 10 — Feature Traces.

Collision layer (physics)

Under Physics, the optional Collision Layer component assigns one named layer from the scene master list (authored in Babylon Scene › Collision Layers). At runtime the engine resolves the scene matrix into Havok filterMembershipMask / filterCollideMask on every physics shape on the entity's body.

Two toggles mirror render layers:

Entities without this component (and no inherited propagation) keep Havok defaults — they collide with everything. Filtered pairs will not generate contacts or trigger events.

The component stores the layer name, so removing or reordering layers in the scene panel never silently retargets other components. If you rename a layer, re-pick it on components that used the old name — Validate flags stale layer names.

Runtime detail: 06 — Physics › Collision layers · Feature trace: 10 — Feature Traces.

Auto-derived blocks (not components)

These appear as child panels when relevant — no Add Component row:

Full component table: 13 — Feature List.