Banter Synced Objects, Kit Items, Avatar Pedestals, and AO Baking
Banter's special components cover several focused jobs: instantiate a prefab from a kit bundle, enable object synchronization, mark world geometry, display an avatar, or merge static child meshes and bake ambient occlusion into vertex colours.
Add the component that matches the object's role, and keep ambient-occlusion baking limited to organized static geometry.
- Use kit, synchronized, world, or avatar-pedestal components for their documented runtime roles.
- Place static geometry under a clean root parent before adding BanterAOBaking.
- Preview the merged result, bake it, and clear it when the source hierarchy must be restored.
Instantiate a Kit Item
BanterKitItem instantiates a prefab from an asset bundle:
kitObject.AddComponent(new BS.BanterKitItem({
path: "assets/prefabs/myitem.prefab"
}));
The path must identify the prefab inside the bundle.
Enable Object Synchronization
BanterSyncedObject enables network synchronization for a GameObject:
sharedObject.AddComponent(
new BS.BanterSyncedObject()
);
Use it on the object whose runtime state requires the SDK's synchronized-object behaviour.
For shared values that are not represented by this component, the scene API also provides public, protected, and user properties plus one-shot messages.
Mark a World Object
BanterWorldObject marks a GameObject as part of the non-interactive world:
building.AddComponent(new BS.BanterWorldObject());
Use this for geometry that belongs to the environment rather than an interactive prop.
Display an Avatar Pedestal
BanterAvatarPedestal displays an avatar on a pedestal:
pedestal.AddComponent(
new BS.BanterAvatarPedestal()
);
Place and scale the pedestal GameObject before adding surrounding labels or interaction.
What BanterAOBaking Does
BanterAOBaking merges child meshes and bakes ambient occlusion into vertex colours. The official documentation recommends it for static geometry such as buildings, terrain features, and collections of primitives that will not move.
The shader used for the result must support vertex colours.
Prepare the Hierarchy
Create a root parent and place the static primitives beneath it:
const building = new BS.GameObject({
name: "Building"
});
const wall = new BS.GameObject({
name: "Wall",
parent: building
});
wall.AddComponent(new BS.BanterBox({
width: 5,
height: 3,
depth: 0.2
}));
The root hierarchy is required for the baker to process the intended child geometry.
Configure the AO Baker
const baker = building.AddComponent(
new BS.BanterAOBaking({
subdivisionLevel: 2,
sampleCount: 128,
aoIntensity: 1.2,
aoBias: 0.005,
aoRadius: 0,
hideSourceObjects: true,
targetShaderName: "Mobile/StylizedFakeLit"
})
);
The official reference documents:
| Setting | Purpose |
|---|---|
subdivisionLevel |
Add vertices for a smoother AO result. |
sampleCount |
Set ray samples per vertex. |
aoIntensity |
Control occlusion strength. |
aoBias |
Offset rays to reduce self-intersection artifacts. |
aoRadius |
Limit occlusion distance, or use automatic sizing at 0. |
hideSourceObjects |
Hide the original child meshes after baking. |
targetShaderName |
Apply a shader that supports vertex colours. |
Higher subdivision and sample values increase processing work.
Preview, Bake, and Clear
baker.Preview();
baker.BakeAO();
baker.Clear();
Preview()merges and subdivides without baking AO.BakeAO()merges, subdivides, and calculates ambient occlusion.Clear()removes the generated mesh and restores the source objects.
The component exposes read-only processing and progress values while it runs.
Bake Order
The official guide recommends building and baking in layers:
- Background and distant scenery
- Ground and floors
- Large structures
- Detail objects
It also recommends rebaking existing geometry when nearby or intersecting objects are added, so the new occlusion relationship is included.
Common Questions
Why does BanterAOBaking not include my primitives?
Place the static primitive GameObjects beneath the root GameObject that contains BanterAOBaking.
Why does the baked ambient occlusion not appear?
Check that the target shader supports vertex colours and confirm the baker completed without remaining in its processing state.
Official References
Related Navigation
- Banter GameObjects and Hierarchies
- Banter Rendering and Geometry
- Banter Multiplayer State and Events
- Banter VR Documentation