importing_3d_meshes.rst 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. Importing 3D meshes
  2. ===================
  3. Introduction
  4. ------------
  5. Godot supports a flexible and powerful [[3D Scene importer]], that
  6. allows for full scene importing. For a lot of artists and developers
  7. this is more than enough. However, many do not like this workflow as
  8. much and prefer to import individual 3D Meshes and build the scenes
  9. inside the Godot 3D editor themselves. (Note that for more advanced
  10. features such as skeletal animation, there is no option to the 3D Scene
  11. 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 [[API: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. [[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 is needed for regular shading, while
  30. Tangents is 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. mach, 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) 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.