# 3D模型

3D模型是設計遊戲關卡最關鍵的部分之一。您可以從各種文件格式導入3D模型，這些模型將被創建為可以放置在遊戲中的資產。

## 輸入模型

可以通過將支持的文件格式拖入編輯器來導入模型。您也可以一次選擇多個文件拖放入編輯器。 &#x20;

<div align="center" data-full-width="false"><figure><img src="/files/6ixG6o24bNOFdCeyTW3h" alt="" width="375"><figcaption><p>Drag and drop files</p></figcaption></figure></div>

<figure><img src="/files/qdC6HjuRm6JrJfLZNjfP" alt="" width="375"><figcaption><p>An imported 3D model</p></figcaption></figure>

### 支持的文件格式

* **glb, gltf** - 這是3D模型的首選文件格式。如果文件引用了位於單獨文件中的紋理，這些紋理文件將在導入過程中自動嵌入，因此您不需要再單獨導入它們。
* **fbx** - 另一種流行的格式。由於FBX通常使用1單位 = 1厘米/1 unit = 1cm的比例，因此會對這些資產應用重新縮放因子，將其縮放到1單位 = 1米/1 unit = 1m。
* **obj** - 一種文本基礎的文件格式，通常伴隨著包含材質的MTL文件。MTL文件將自動導入。

### 名稱

導入文件的名稱將用於創建導入資產的名稱

## 設置

從資產瀏覽器中，您可以打開資產的編輯對話框。

<figure><img src="/files/yEFPhJZQIJqZOafOlzRY" alt="3D Model asset settings" width="375"><figcaption><p>3D model asset settings</p></figcaption></figure>

* **Name -** 資產的名稱
* **Collision detection** - 開啟或關閉碰撞檢測。預設設定啟用。如果您不希望角色和其他物理對象被此模型阻擋，請關閉此選項。
* **Rescale** - 更改模型的默認比例。Hology引擎使用米作為單位。例如，如果您的對象是以厘米建模的，您需要將此值設置為0.01以轉換為米。如果模型是從FBX文件導入的，默認會設置為0.01。
* **Cast shadow** - 此對象是否應創建陰影。預設設定禁用。計算陰影可能會影響載入和視覺效能，特別是當需要考慮大數量對象陰影時。因此，請嘗試只為視覺影響顯著的對象啟用陰影。
* **Receive shadow** - 此對象是否應顯示投射到它上面的陰影。


---

# Agent Instructions: 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:

```
GET https://docs.hology.app/zh-tw/assets/3d-mo-xing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
