When a user launches your Android XR app in Full Space, you can present it in passthrough or override their environment with an immersive virtual space. Your app can trigger certain environments based on content or experiences. For example, an app could show a stormy environment when a thunderstorm is mentioned, or a history app could show a virtual Roman Colosseum when explaining gladiators.
Environments are a versatile way to customize your app and enhance immersion. In Full Space, you have full flexibility to create the experience you envision. Create unique visuals and audio to draw users in, while striving to make them feel comfortable and safe.
Elements of a spatial environment
Environments can incorporate depth, texture, and 3D geometry. When in Full Space, you can provide your own virtual environment in standard gITF or EXR formats. Learn how to add spatial environments.
These optional components can help you build your scene. Choose one, or combine them all to create a complex visual experience.
For surrounding or additional 3D geometry, Android XR supports either a
.gltf
or .glb
file extension. You can create and export these file
formats from third-party tools such as Blender,
Maya, Spline, among others.
Create safe and comfortable experiences
Follow these guidelines to create a spatial environment that's safe and comfortable for users to explore.
- Add clear visual cues to let users quickly switch between Full Space and Home Space. For example, you can use collapse content and expand content icons for buttons to trigger transitions.
- Keep objects at least 1 meter away from the user to avoid collisions. This gives the user enough room to move around while avoiding real-world physical objects.
- You can create multiple environments, and add a menu for users to switch between them.
Optimize for performance
Some spatial environments demand high performance, and require optimization to maintain smooth frame rates, low latency, and avoid user discomfort.
Given the processing demands of stereoscopic rendering and real-time interactions, we recommend following efficient 3D model design and judicious use of textures and shaders. These guidelines can help you create XR experiences that are visually rich and perform well across a range of devices.
Optimize files
- Polycount will directly affect performance, try to optimize where possible.
- Employ efficient mesh structures and reduce unnecessary detail and overlapping geometry.
- Reduce draw calls by simplifying complex models and using texture atlases. Try combining multiple textures into a single file.
- Use efficient texture compression and reduce asset sizes to prevent GPU overload, and to optimize models and textures. Recommended asset sizes for optimal performance are approximately 80 MB for 3D wallpaper or glb, and 15 MB for audio files.
- Use KTX2 texture compression to optimize GPU performance.
- Bake lighting information into textures where possible.
Consider a 360° UI safe zone
Stay in a safe tonal range with no spikes in brightness that could conflict with the UI or fatigue users.
Make it accessible
Ensure the UI is legible in all directions, especially in the middle horizontal band of a user's field of view. Avoid complexity or details that might distract.
Design for comfort
If you are using mid-field large UI panels, consider the position of a user in relation to it. A user should be at least 5 feet above the surface that the screen floats above. This leaves enough distance for comfortable, centered viewing of a large virtual screen without having to look up.