> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/gou-jian/import-items.md).

# 导入自定义资源

导入你自己的 3D 模型、图片、声音等，用于场景中。

你可以将自己的 3D 模型导入到场景编辑器中。你可以从互联网上大量免费或付费资源中选择模型，或者创建自己的自定义模型。你还可以导入其他资源，如图像、声音文件和视频。

{% embed url="<https://www.youtube.com/watch?v=UepXpH-k0EI>" %}

## 导入资源

要从本地磁盘将 3D 模型、图像、声音文件或视频导入到你的场景中：

1. 直接将文件拖到底部面板上。你也可以点击 **+ 导入资源** 按钮（位于底部面板左上角），然后从本地磁盘中选择。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-5948f0f1cc9c6dcf332a8b5398abf3a03bfa5a6b%2Fimport-assets.png?alt=media)

2. 查看模型缩略图并点击 **导入**。导入多个资源时，请使用箭头按钮逐个浏览每个资源。

![](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-40d2f049b11f39a8ff535565ffb2c47f1366e916%2Fimport-confirmation.png?alt=media)

现在你可以在 **本地资源** 选项卡中找到你的资源。资源按类型分文件夹：3D 模型位于 *assets/Models* 文件夹下，图像位于 *assets/Images*，声音文件位于 *assets/Audio*，视频位于 *assets/Video*.

内置免费资源包中的项目存储在 *assets/asset-packs/*&#x4E0B;，而从编辑器创建的自定义项目存储在 *assets/custom/*。旧场景中的用户导入内容可能位于 *assets/scene/* 中。这些路径在你的场景代码中都可用，只需引用资源所在的文件夹即可。

* 对于 3D 模型，将 `.glb` 或 `.gltf` 文件拖到画布上，即可将它们作为场景中的物品添加。
* 图像和声音文件等其他资源也可以拖到物品的字段上。例如，你可以拖动一个 `.mp3` 文件到该 *路径* 物品的字段 *音频源* 组件。

{% hint style="info" %}
**💡 提示**：你也可以直接将文件粘贴到项目文件夹中。完成后，点击 **刷新** 按钮，位于 **导入资源** 按钮旁，即可查看新文件。

<img src="https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-b1d21406bc228bc4e5def5af418231be27f50405%2Frefresh-assets.png?alt=media" alt="" data-size="original">
{% endhint %}

### 支持的格式

#### 音频

支持以下音频格式：

* *.mp3*
* *.wav*
* *.ogg*

#### 图像

支持以下图像格式：

* *.png*
* *.jpg*
* *.jpeg*

#### 视频

支持以下视频格式：

* *.mp4*

#### 3D 模型

支持以下 3D 模型格式：

* *.glTF*
* *.glb*

两者都可以包含外部纹理图像文件，或外部二进制（*.bin*）文件。

你可以使用各种不同的编辑器和工具将其他格式转换为这些格式。参见 [3D 建模](/creator/content-creator-zh/3d-jian-mo-he-dong-hua/3d-models.md) 以获取建议和技巧。

模型中的所有材质都需要为 *基础材质* 或 *PBR*，并且所有纹理的尺寸都需要为 2 的幂（例如：256、512）。参见 [场景限制](/creator/content-creator-zh/chang-jing-sdk7/you-hua/scene-limitations.md) 了解详情。

任何类型的导入文件要能在场景中使用，其大小都必须小于 50 MB。不支持更大的文件。

**3D 模型免费库**

除了自己制作 3D 模型外，你也可以从多个免费或付费资源库下载它们，或者使用 AI 工具生成它们。参见 [实用资源](/creator/content-creator-zh/chang-jing-sdk7/ru-men/useful-resources.md) 以查看推荐的资源库和生成式 AI 工具列表。

{% hint style="warning" %}
**📔 注意**：请注意你下载内容所附带的许可限制。
{% endhint %}

请注意，在其中一些网站上，你可以选择下载模型的格式。始终选择 *.glTF* 或 *.glb* 格式（如果可用）。如果不可用，你必须先将它们转换为 *.glTF* 或 *.glb* ，之后才能在场景中使用。为此，我们建议将它们导入 Blender，并使用可用的某个 *.glTF* 导出插件导出。

### 碰撞体

你可能会发现，在运行预览时，玩家可以穿过你导入的 3D 模型。这很可能是因为这些模型缺少一个 *碰撞器网格* 用于定义碰撞几何体的内容。参见 [碰撞体](/creator/content-creator-zh/3d-jian-mo-he-dong-hua/colliders.md) 以获取更多详情和说明。

{% hint style="info" %}
**💡 提示**：与其编辑模型来添加一个 *碰撞器网格*，更简单的替代方法是添加一个 *隐形墙* 形状大致相同的智能物品来代替它。
{% endhint %}

### 动画

如果导入的模型包含动画，那么模型中打包的第一个动画将会循环播放。

请注意，你无法控制动画何时开始或停止，也无法控制在有多个动画时播放哪一个。

如果场景中有多个玩家，他们看到的动画可能彼此不同步。

要更改此行为，你可以添加一个 **动画器** 组件遍历所有玩家。参见 [让任意项目变为智能项目](/creator/content-creator-zh/chang-jing-bian-ji-qi/jiao-hu-xing/make-any-item-smart.md) 用于无代码工具，让你的物品变为可交互。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.decentraland.org/creator/content-creator-zh/chang-jing-bian-ji-qi/gou-jian/import-items.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
