Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

Materiały

Używanie istniejących materiałów

One way in which the exporter can handle materials is to attempt to match the Blender material with an existing Godot material. This has the advantage of being able to use all of the features of Godot's material system, but it means that you cannot see your model with the material applied inside Blender.

To do this, the exporter attempts to find Godot materials with names that match those of the material name in Blender. So if you export an object in Blender with the material name PurpleDots then the exporter will search for the file PurpleDots.tres and assign it to the object. If this file is not a StandardMaterial3D or ShaderMaterial or if it cannot be found, then the exporter will fall back to exporting the material from Blender.

W przypadku wyszukiwania pliku .tres przez eksportera, należy skorzystać z opcji "Ścieżki wyszukiwania materiału":

../../../_images/material_search.jpg
Może to przyjąć wartość:
  • Katalog Projektów - Próby znalezienia pliku project.Godot i cykliczne przeszukiwanie podkatalogów. Jeśli projekt.Godot nie może być znaleziony, to wyrzuci błąd. Jest to przydatne w przypadku większości projektów, w których nazywanie konfliktów jest mało prawdopodobne.

  • Katalog eksportu - wyszukiwanie materiałów w podkatalogach lokalizacji eksportu. Jest to przydatne w przypadku projektów, w których możesz mieć podwójne nazwy materiałów i potrzebujesz większej kontroli nad tym, jaki materiał zostanie przypisany.

  • Brak - Nie wyszukuj materiałów. Eksportuj je z pliku Blendera.

Export of Cycles/EEVEE materials

The exporter has a primitive support for converting Cycles/EEVEE material node tree to Godot Shader Material. Note that some of the Shader Node are not supported yet due to difficulties in implementation, which are:

  • all the noisy textures

  • generated texture coordinates

  • group node

  • shader nodes except PrincipledBSDF, Diffuse, Glossy, Glass, add shader and mix shader

Ostrzeżenie

If possible, try to use PrincipledBSDF node with GGX distribution as the output shader node, it is the only one guaranteed to be exactly correct. Others are just based on approximation.

Sometimes materials may not be valid for exporting (e.g. has some unsupported node) or it is using Blender Internal Engine, only the diffuse color and a few flags (e.g. unshaded) are exported and form a StandardMaterial3D.

Generate external materials

The default configuration of material exporting would keep all the materials internal to the escn file. There is an option which could enable generating external .material file when the escn file opens in Godot.

../../../_images/external_mat_option.jpg

.material file can be assigned to any material slot to be a external resource.

../../../_images/gd_dot_material.jpg