Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
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 🔗
If true, generate vertex tangents using Mikktspace if the source mesh doesn't have tangent data. When possible, it's recommended to let the 3D modeling software generate tangents on export instead of relying on this option. Tangents are required for correct display of normal and height maps, along with any material/shader features that require tangents.
If you don't need material features that require tangents, disabling this can reduce output file size and speed up importing if the source 3D file doesn't contain tangents.
Vector3 offset_mesh = Vector3(0, 0, 0) 🔗
將網格資料偏移指定值。這可用於解決未對齊的網格,而無需修改原始檔案。
Vector3 scale_mesh = Vector3(1, 1, 1) 🔗
會依照指定值縮放網格資料。這可用於解決縮放錯誤的網格,而無需修改來源檔案。