ResourceImporterOBJ
繼承: ResourceImporter < RefCounted < Object
Imports an OBJ 3D model as an independent Mesh or scene.
說明
與ResourceImporterScene不同,ResourceImporterOBJ預設會匯入單一Mesh資源,而不是匯入PackedScene。這使得在節點中使用Mesh資源變得更加容易需要直接Mesh 資源,例如GridMap、GPUParticles3D 或CPUParticles3D。請注意,無論如何,仍然可以使用高階匯入設定 對話方塊從3D 場景儲存網格資源的來源格式。
另請參閱 ResourceImporterScene,它用於更高級的 3D 格式,例如 glTF。
教學
屬性
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
屬性說明
bool force_disable_mesh_compression = false 🔗
If true, mesh compression will not be used. Consider enabling if you notice blocky artifacts in your mesh normals or UVs, or if you have meshes that are larger than a few thousand meters in each direction.
bool generate_lightmap_uv2 = false 🔗
If true, generates UV2 on import for LightmapGI baking.
float generate_lightmap_uv2_texel_size = 0.2 🔗
Controls the size of each texel on the baked lightmap. A smaller value results in more precise lightmaps, at the cost of larger lightmap sizes and longer bake times.
Note: Only effective if generate_lightmap_uv2 is true.
如果true,則產生網格的較低細節變體,這些變體將顯示在遠處以提高算繪效能。並非所有網格都受益於LOD,特別是如果它們永遠不會從遠處算繪。停用此功能可以減少輸出檔案大小並加快匯入速度。請參閱網格細節等級(LOD) 了解更多。
bool generate_shadow_mesh = true 🔗
如果true,則在匯入時啟用陰影網格的產生。這可以最佳化陰影算繪,而不會在可能的情況下透過將頂點焊接在一起來降低品質。這反過來又減少了記憶體算繪陰影所需的頻寬。陰影網格產生目前不支援使用比來源網格更低的細節等級(但陰影算繪將在相關時使用LOD)。
bool generate_tangents = true 🔗
如果true,則使用Mikktspace 產生頂點切線(如果來源網格不存在)沒有切線資料。如果可能,建議讓 3D 建模軟體在匯出時產生切線,而不是依賴此選項。需要切線才能正確顯示法線和高度貼圖,以及需要切線的任何材質/著色器功能。
如果您不需要需要切線的材質特徵,則停用此功能可以減少輸出檔案大小並加快匯入速度(如果來源 3D 檔案不包含切線)。
Vector3 offset_mesh = Vector3(0, 0, 0) 🔗
將網格資料偏移指定值。這可用於解決未對齊的網格,而無需修改原始檔案。
Vector3 scale_mesh = Vector3(1, 1, 1) 🔗
會依照指定值縮放網格資料。這可用於解決縮放錯誤的網格,而無需修改來源檔案。