123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/4.3/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/4.3/doc/classes/ResourceImporterOBJ.xml.
- .. _class_ResourceImporterOBJ:
- ResourceImporterOBJ
- ===================
- **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
- Imports an OBJ 3D model as an independent :ref:`Mesh<class_Mesh>` or scene.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- Unlike :ref:`ResourceImporterScene<class_ResourceImporterScene>`, **ResourceImporterOBJ** will import a single :ref:`Mesh<class_Mesh>` resource by default instead of importing a :ref:`PackedScene<class_PackedScene>`. This makes it easier to use the :ref:`Mesh<class_Mesh>` resource in nodes that expect direct :ref:`Mesh<class_Mesh>` resources, such as :ref:`GridMap<class_GridMap>`, :ref:`GPUParticles3D<class_GPUParticles3D>` or :ref:`CPUParticles3D<class_CPUParticles3D>`. Note that it is still possible to save mesh resources from 3D scenes using the **Advanced Import Settings** dialog, regardless of the source format.
- See also :ref:`ResourceImporterScene<class_ResourceImporterScene>`, which is used for more advanced 3D formats such as glTF.
- .. rst-class:: classref-introduction-group
- Tutorials
- ---------
- - :doc:`Importing 3D scenes <../tutorials/assets_pipeline/importing_3d_scenes/index>`
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+
- | :ref:`bool<class_bool>` | :ref:`force_disable_mesh_compression<class_ResourceImporterOBJ_property_force_disable_mesh_compression>` | ``false`` |
- +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+
- | :ref:`bool<class_bool>` | :ref:`generate_tangents<class_ResourceImporterOBJ_property_generate_tangents>` | ``true`` |
- +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`offset_mesh<class_ResourceImporterOBJ_property_offset_mesh>` | ``Vector3(0, 0, 0)`` |
- +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+
- | :ref:`bool<class_bool>` | :ref:`optimize_mesh<class_ResourceImporterOBJ_property_optimize_mesh>` | ``true`` |
- +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`scale_mesh<class_ResourceImporterOBJ_property_scale_mesh>` | ``Vector3(1, 1, 1)`` |
- +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_ResourceImporterOBJ_property_force_disable_mesh_compression:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **force_disable_mesh_compression** = ``false`` :ref:`🔗<class_ResourceImporterOBJ_property_force_disable_mesh_compression>`
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ResourceImporterOBJ_property_generate_tangents:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **generate_tangents** = ``true`` :ref:`🔗<class_ResourceImporterOBJ_property_generate_tangents>`
- If ``true``, generate vertex tangents using `Mikktspace <http://www.mikktspace.com/>`__ 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 on 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ResourceImporterOBJ_property_offset_mesh:
- .. rst-class:: classref-property
- :ref:`Vector3<class_Vector3>` **offset_mesh** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_ResourceImporterOBJ_property_offset_mesh>`
- Offsets the mesh's data by the specified value. This can be used to work around misaligned meshes without having to modify the source file.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ResourceImporterOBJ_property_optimize_mesh:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **optimize_mesh** = ``true`` :ref:`🔗<class_ResourceImporterOBJ_property_optimize_mesh>`
- Unused parameter. This currently has no effect.
- .. rst-class:: classref-item-separator
- ----
- .. _class_ResourceImporterOBJ_property_scale_mesh:
- .. rst-class:: classref-property
- :ref:`Vector3<class_Vector3>` **scale_mesh** = ``Vector3(1, 1, 1)`` :ref:`🔗<class_ResourceImporterOBJ_property_scale_mesh>`
- Scales the mesh's data by the specified value. This can be used to work around misscaled meshes without having to modify the source file.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
- .. |void| replace:: :abbr:`void (No return value.)`
|