[null,null,["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Spatial environments\n\nWhen a user launches your Android XR app in [Full Space](/design/ui/xr/guides/foundations#full-space), you can present it\nin passthrough or override their environment with an immersive virtual space.\nYour app can trigger certain environments based on content or experiences. For\nexample, an app could show a stormy environment when a thunderstorm is\nmentioned, or a history app could show a virtual Roman Colosseum when explaining\ngladiators.\n\nEnvironments are a versatile way to customize your app and enhance immersion. In\nFull Space, you have full flexibility to create the experience you envision.\nCreate unique visuals and audio to draw users in, while striving to make them\nfeel comfortable and safe.\n| **Preview:** For this developer preview release, spatial environments are only available in Full Space, and teleportation and interactivity aren't supported.\n| **Note:** If a user enters Full Space and you haven't defined a spatial environment, your app inherits the system environment selected in Home Space.\n\nElements of a spatial environment\n---------------------------------\n\nEnvironments can incorporate depth, texture, and 3D geometry. When in Full\nSpace, you can provide your own virtual environment in standard gITF format.\n[Learn how to add spatial environments](/develop/xr/jetpack-xr-sdk/add-environments).\n\nThese optional components can help you build your scene. Choose one, or combine\nthem all to create a complex visual experience.\n\n\n**Surrounding 3D geometry**\n\nYou can create [immersive environments](/develop/xr/jetpack-xr-sdk/add-environments#overview-spatial) by providing a `.gltf` or `.glb` file\ncontaining both the environment's geometry and a 360° image for the texture. You\nshould also include an Image Based Lighting (IBL) file created from a high\ndynamic range [EXR image](/develop/xr/jetpack-xr-sdk/add-environments#create-exr), which is necessary for realistic lighting and\nreflections on 3D objects.\n\n\u003cbr /\u003e\n\n\n**Additional 3D geometry**\n\nTo enhance spatial awareness, strategically place supportive geometry near a\nuser. Avoid placing objects above 0.9 meters within 1.5 meters of a user, as\nthis can lead to depth conflicts with UI elements.\n\n\u003cbr /\u003e\n\nFor surrounding or additional 3D geometry, Android XR supports either a `.gltf`\nor `.glb` file extension. You can create and export these file formats from\nthird-party tools such as [Blender](https://www.blender.org/), [Maya](https://www.autodesk.com/products/maya),\n[Spline](https://spline.design/), among others.\n\nCreate safe and comfortable experiences\n---------------------------------------\n\nFollow these guidelines to create a spatial environment that's safe and\ncomfortable for users to explore.\n\n- **Add clear visual cues** to let users quickly switch between Full Space and Home Space. For example, you can use [collapse content](https://fonts.google.com/icons?icon.query=collapse+content) and [expand content](https://fonts.google.com/icons?icon.query=expand+content) icons for buttons to trigger transitions.\n- **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.\n- **You can create multiple environments**, and add a menu for users to switch between them.\n\nOptimize for performance\n------------------------\n\nSome spatial environments demand high performance, and require optimization to\nmaintain smooth frame rates, low latency, and avoid user discomfort.\n\nGiven the processing demands of stereoscopic rendering and real-time\ninteractions, we recommend following efficient 3D model design and judicious use\nof textures and shaders. These guidelines can help you create XR experiences\nthat are visually rich and perform well across a range of devices.\n\n**Optimize files**\n\n- Polycount will directly affect performance, try to optimize where possible.\n- Employ efficient mesh structures and reduce unnecessary detail and overlapping geometry.\n- Reduce draw calls by simplifying complex models and using texture atlases. Try combining multiple textures into a single file.\n- 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.\n- Use [KTX2](https://github.khronos.org/KTX-Specification/ktxspec.v2.html) texture compression to optimize GPU performance.\n- Bake lighting information into textures where possible.\n\nConsider a 360° UI safe zone\n----------------------------\n\nStay in a safe tonal range with no spikes in brightness that could conflict with\nthe UI or fatigue users.\n\nMake it accessible\n------------------\n\nEnsure the UI is legible in all directions, especially in the middle horizontal\nband of a user's field of view. Avoid complexity or details that might distract.\n\nDesign for comfort\n------------------\n\nIf you are using mid-field large UI panels, consider the position of a user in\nrelation to it. A user should be at least 5 feet above the surface that the\nscreen floats above. This leaves enough distance for comfortable, centered\nviewing of a large virtual screen without having to look up."]]