Build an Inside-Out Sphere Room in Banter
BanterInvertedMesh reverses mesh normals so an object renders inside-out. Add it to BanterSphere geometry when the viewer should see the sphere from its interior.
Create a large sphere around the viewing area, invert its mesh, and apply the intended texture material.
- Create a sphere centred on the enclosed visual area.
- Add
BanterInvertedMeshto reverse its normals. - Add
BanterMaterialwith the texture URL and colour tint.
Create the Sphere
const sphereRoom = new BS.GameObject({
name: "InsideOutSphereRoom",
localPosition: new BS.Vector3(0, 0, 0)
});
sphereRoom.AddComponent(
new BS.BanterSphere({
radius: 20,
widthSegments: 32,
heightSegments: 16,
phiStart: 0,
phiLength: Math.PI * 2,
thetaStart: 0,
thetaLength: Math.PI
})
);
The official sphere component exposes radius, segment counts, and the phi and theta ranges.
Invert the Mesh
sphereRoom.AddComponent(
new BS.BanterInvertedMesh()
);
The inverted-mesh component reverses the mesh normals so the sphere renders from the inside.
Apply a Texture
sphereRoom.AddComponent(
new BS.BanterMaterial({
shaderName: "Unlit/Diffuse",
texture:
"https://example.com/panorama.jpg",
color: new BS.Vector4(1, 1, 1, 1),
side: BS.MaterialSide.Front,
generateMipMaps: true
})
);
Replace the example texture URL with the image used by the experience. The component supports a shader name, texture URL, RGBA tint, material side, and mip-map generation.
Build a Partial Dome
The sphere geometry exposes angular ranges:
const dome = new BS.BanterSphere({
radius: 20,
widthSegments: 32,
heightSegments: 16,
phiStart: 0,
phiLength: Math.PI * 2,
thetaStart: 0,
thetaLength: Math.PI / 2
});
Adjust phiStart, phiLength, thetaStart, and thetaLength when the geometry should cover only part of the full sphere.
Keep the Room Non-Interactive
When the sphere is only part of the environment, the documented world-object component marks it as non-interactive:
sphereRoom.AddComponent(
new BS.BanterWorldObject()
);
Common Questions
Why is the inside of my Banter sphere invisible?
Add BanterInvertedMesh. The official reference states that it reverses mesh normals so the object renders inside-out.
How do I create only a Banter dome instead of a full sphere?
Adjust the documented phi and theta start and length values on BanterSphere to generate a partial spherical surface.
Official References
Related Navigation
- Banter Rendering, Geometry, and Materials
- Add a Street View Panorama to Banter
- Build a Procedural Banter Room
- Banter VR Documentation