importing_3d_meshes.rst 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. .. _doc_importing_3d_meshes:
  2. Importing 3D meshes
  3. ===================
  4. Introduction
  5. ------------
  6. Godot supports a flexible and powerful :ref:`3D scene importer
  7. <doc_importing_3d_scenes>` that allows for full scene importing. For a lot of
  8. artists and developers this is more than enough. However, many do not like this
  9. workflow as much and prefer to import individual 3D Meshes and build the scenes
  10. inside the Godot 3D editor themselves. (Note that for more advanced features
  11. such as skeletal animation, there is no option to the 3D Scene Importer).
  12. The 3D mesh import workflow is simple and works using the OBJ file
  13. format. The imported meshes result in a .msh binary file which the user
  14. can put into a :ref:`class_meshinstance`, which in turn can be placed
  15. somewhere in the edited scene.
  16. Importing
  17. ---------
  18. Importing is done through the Import 3D Mesh menu:
  19. .. image:: /img/mesh_import.png
  20. Which opens the Mesh import window:
  21. .. image:: /img/mesh_dialog.png
  22. This dialog allows the import of one more more OBJ files into a target
  23. path. OBJ files are converted to .msh files. Files are imported without
  24. any material on them, material has to be added by the user (see the
  25. :ref:`doc_fixed_materials` tutorial). If the external OBJ file is changed it
  26. will be re-imported, while keeping the newly assigned material.
  27. Options
  28. -------
  29. A few options are present. Normals are needed for regular shading, while
  30. Tangents are needed if you plan to use normal-mapping on the material. In
  31. general, OBJ files describe how to be shaded very well, but an option to
  32. force smooth shading is available.
  33. Finally, there is an option to weld vertices. Given OBJ files are
  34. text-based, it is common to find some of these with vertices that do not
  35. match, which results in strange shading. The weld vertices option merges
  36. vertices that are too close to keep proper smooth shading.
  37. Usage
  38. -----
  39. Mesh resources (what this importer imports to) are used inside MeshInstance
  40. nodes. Simply set them to the Mesh property of them.
  41. .. image:: /img/3dmesh_instance.png
  42. And that is it.