material.rst 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. Materials
  2. =========
  3. Using existing Godot materials
  4. --------------------------------
  5. One way in which the exporter can handle materials is to attempt to match
  6. the Blender material with an existing Godot material. This has the advantage of
  7. being able to use all of the features of Godot's material system, but it means
  8. that you cannot see your model with the material applied inside Blender.
  9. To do this, the exporter attempts to find Godot materials with names that match
  10. those of the material name in Blender. So if you export an object in Blender
  11. with the material name ``PurpleDots`` then the exporter will search for the
  12. file ``PurpleDots.tres`` and assign it to the object. If this file is not a
  13. ``SpatialMaterial`` or ``ShaderMaterial`` or if it cannot be found, then the
  14. exporter will fall back to exporting the material from Blender.
  15. Where the exporter searches for the ``.tres`` file is determined by the "Material
  16. Search Paths" option:
  17. .. image:: img/material_search.jpg
  18. This can take the value of:
  19. - Project Directory - Attempts to find the ``project.Godot`` and recursively
  20. searches through subdirectories. If ``project.Godot`` cannot be found it
  21. will throw an error. This is useful for most projects where naming conflicts
  22. are unlikely.
  23. - Export Directory - Look for materials in subdirectories of the export
  24. location. This is useful for projects where you may have duplicate
  25. material names and need more control over what material gets assigned.
  26. - None - Do not search for materials. Export them from the Blender file.
  27. Export of Blender materials
  28. ---------------------------
  29. The other way materials are handled is for the exporter to export them from
  30. Blender. Currently only the diffuse color and a few flags (eg unshaded) are
  31. exported.
  32. .. warning::
  33. Export of Blender materials is currently very primitive. However, it is the
  34. focus of a current GSOC project
  35. .. warning::
  36. Materials are currently exported using their "Blender Render" settings.
  37. When Blender 2.8 is released, this will be removed and this part of the
  38. exporter will change.