class_resourceimporterobj.rst 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/4.3/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.3/doc/classes/ResourceImporterOBJ.xml.
  6. .. _class_ResourceImporterOBJ:
  7. ResourceImporterOBJ
  8. ===================
  9. **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Imports an OBJ 3D model as an independent :ref:`Mesh<class_Mesh>` or scene.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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.
  15. See also :ref:`ResourceImporterScene<class_ResourceImporterScene>`, which is used for more advanced 3D formats such as glTF.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Importing 3D scenes <../tutorials/assets_pipeline/importing_3d_scenes/index>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+
  26. | :ref:`bool<class_bool>` | :ref:`force_disable_mesh_compression<class_ResourceImporterOBJ_property_force_disable_mesh_compression>` | ``false`` |
  27. +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+
  28. | :ref:`bool<class_bool>` | :ref:`generate_tangents<class_ResourceImporterOBJ_property_generate_tangents>` | ``true`` |
  29. +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+
  30. | :ref:`Vector3<class_Vector3>` | :ref:`offset_mesh<class_ResourceImporterOBJ_property_offset_mesh>` | ``Vector3(0, 0, 0)`` |
  31. +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+
  32. | :ref:`bool<class_bool>` | :ref:`optimize_mesh<class_ResourceImporterOBJ_property_optimize_mesh>` | ``true`` |
  33. +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+
  34. | :ref:`Vector3<class_Vector3>` | :ref:`scale_mesh<class_ResourceImporterOBJ_property_scale_mesh>` | ``Vector3(1, 1, 1)`` |
  35. +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+
  36. .. rst-class:: classref-section-separator
  37. ----
  38. .. rst-class:: classref-descriptions-group
  39. Property Descriptions
  40. ---------------------
  41. .. _class_ResourceImporterOBJ_property_force_disable_mesh_compression:
  42. .. rst-class:: classref-property
  43. :ref:`bool<class_bool>` **force_disable_mesh_compression** = ``false`` :ref:`🔗<class_ResourceImporterOBJ_property_force_disable_mesh_compression>`
  44. 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.
  45. .. rst-class:: classref-item-separator
  46. ----
  47. .. _class_ResourceImporterOBJ_property_generate_tangents:
  48. .. rst-class:: classref-property
  49. :ref:`bool<class_bool>` **generate_tangents** = ``true`` :ref:`🔗<class_ResourceImporterOBJ_property_generate_tangents>`
  50. 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.
  51. 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.
  52. .. rst-class:: classref-item-separator
  53. ----
  54. .. _class_ResourceImporterOBJ_property_offset_mesh:
  55. .. rst-class:: classref-property
  56. :ref:`Vector3<class_Vector3>` **offset_mesh** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_ResourceImporterOBJ_property_offset_mesh>`
  57. 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.
  58. .. rst-class:: classref-item-separator
  59. ----
  60. .. _class_ResourceImporterOBJ_property_optimize_mesh:
  61. .. rst-class:: classref-property
  62. :ref:`bool<class_bool>` **optimize_mesh** = ``true`` :ref:`🔗<class_ResourceImporterOBJ_property_optimize_mesh>`
  63. Unused parameter. This currently has no effect.
  64. .. rst-class:: classref-item-separator
  65. ----
  66. .. _class_ResourceImporterOBJ_property_scale_mesh:
  67. .. rst-class:: classref-property
  68. :ref:`Vector3<class_Vector3>` **scale_mesh** = ``Vector3(1, 1, 1)`` :ref:`🔗<class_ResourceImporterOBJ_property_scale_mesh>`
  69. 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.
  70. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  71. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  72. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  73. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  74. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  75. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  76. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  77. .. |void| replace:: :abbr:`void (No return value.)`