> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nativeline.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# #3d — 3D Models

> Import 3D models for AR and SceneKit

The `#3d` command imports 3D model files into your app for use in augmented reality experiences, interactive 3D viewers, and SceneKit scenes. Drop in a USDZ or Reality file and tell the AI how to display it.

## What It Does

When you use `#3d`, the AI:

1. Adds the 3D model file to your Xcode project
2. Sets up the appropriate framework (RealityKit for AR, SceneKit for 3D viewers)
3. Creates a view that renders and displays the model as you describe

## Supported Formats

| Format      | Best for                   | Notes                                                                 |
| ----------- | -------------------------- | --------------------------------------------------------------------- |
| **USDZ**    | 3D viewing, AR experiences | Apple's preferred 3D format. Single-file, self-contained.             |
| **Reality** | AR scenes with behaviors   | Created in Reality Composer. Can include animations and interactions. |

## How to Use

<Steps>
  <Step title="Type #3d in the chat">
    Type `#` and select **3d** from the toolkit popover.
  </Step>

  <Step title="Select your 3D model">
    The file picker opens, filtered to USDZ and Reality files. Choose the model you want to import.
  </Step>

  <Step title="Describe how to display it">
    The model appears as an orange chip below the input. Tell the AI how users should interact with the 3D content.
  </Step>

  <Step title="Send your message">
    Press Enter. The AI sets up the 3D rendering framework and creates the view.
  </Step>
</Steps>

## Example Prompts

```
Show this 3D model in an AR view so users can place it in their room
```

```
Display this model in a 3D viewer that users can rotate
```

```
Use this USDZ model as a product preview
```

```
Show this model in AR with a 'Place Object' button
```

```
Create a 3D gallery where users can swipe between this and other models
```

## Getting 3D Models

<AccordionGroup>
  <Accordion title="Apple's Reality Converter">
    Reality Converter is a free app from Apple that converts OBJ, GLTF, and other common 3D formats to USDZ. Download it from the Apple developer site.
  </Accordion>

  <Accordion title="Apple's AR Quick Look Gallery">
    Apple provides sample USDZ files to test with. Search for "Apple AR Quick Look Gallery" to find them.
  </Accordion>

  <Accordion title="Sketchfab">
    Many models on Sketchfab can be downloaded in USDZ format. Check the license for each model.
  </Accordion>

  <Accordion title="Reality Composer">
    Apple's Reality Composer app lets you create AR scenes with built-in 3D objects, animations, and behaviors. It exports `.reality` files that work directly with `#3d`.
  </Accordion>
</AccordionGroup>

<Note>
  USDZ is Apple's preferred 3D format. You can convert other formats (OBJ, GLTF, FBX) to USDZ using Reality Converter, a free app from Apple.
</Note>

## AR vs 3D Viewer

Your prompt determines how the model is displayed:

| Approach      | What it creates                                                        | Best for                                                                |
| ------------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| **AR view**   | Camera-based view where users place the model in the real world        | Furniture, decorations, products users want to visualize in their space |
| **3D viewer** | Interactive viewer where users can rotate, zoom, and inspect the model | Product previews, educational models, 3D portfolios                     |

If you want AR, mention "AR" in your prompt. If you want a static viewer, mention "rotate" or "3D viewer."

<Tip>
  AR features require a physical device — they won't work in the Simulator. Use TestFlight to test AR on a real iPhone or iPad.
</Tip>

<Warning>
  3D model files can be large. Complex models with detailed textures may increase your app size significantly. Optimize your models before importing — reduce polygon count and compress textures where possible.
</Warning>

## Related

<CardGroup cols={2}>
  <Card title="Toolkit Overview" icon="grid-2" href="/toolkit/overview">
    See all available # commands and how the toolkit works.
  </Card>

  <Card title="TestFlight" icon="paper-plane" href="/publishing/testflight">
    Deploy your app to a physical device to test AR features.
  </Card>
</CardGroup>
