Răsfoiți Sursa

Update escn exporter doc on material and animation (#2197)

Lu Jiacheng 6 ani în urmă
părinte
comite
826a00bff4

+ 18 - 12
getting_started/workflow/assets/escn_exporter/animation.rst

@@ -16,29 +16,35 @@ a single AnimationPlayer and makes it easy to switch actions.
 This workflow makes use of blender nla_tracks. Here is a brief guide on how
 to use this feature:
 
-**1. Switch workspace to 'Dope Sheet'**
+**1. Stash active action**
 
-.. image:: img/dope_sheet.jpg
+New created action is always an active action binded to object. There are 
+several ways to place an active action into NLA track, 
+one is of course doing it in ``NLA Editor``
 
-**2. Stash the active action**
+.. image:: img/nla_editor.jpg
+.. image:: img/nla_pushdown.jpg
 
-The stashed action, while not active, will still be exported.
+Or it can be done stashing the action in ``Dope Sheet``
 
+.. image:: img/dope_sheet.jpg
 .. image:: img/stash_action.jpg
 
-**3. Check stashed actions in 'NLA Editor' [optional]**
+**2. Check mute status of NLA tracks**
 
-Switch workspace to 'NLA Editor'.
+An NLA track can be ``mute`` or ``unmute``, the exporter will export all
+the ``mute`` NLA track as a separate action, while blends all the ``unmute``
+NLA tracks into every action (including the action action) being exported.
 
-.. image:: img/nla_editor.jpg
+.. image:: img/nla_strip.jpg
 
-Make sure all stashed actions are muted.
+**3. Export the scene**
 
-.. image:: img/nla_strip.jpg
+Make sure the ``Export Stashed Actions`` option has been turned on.
 
-**4. Export the scene**
+.. image:: img/stash_action_option.jpg
 
-All the stashed actions, as well as the active action, are exported
+Then all the stashed actions, as well as the active action, are exported
 to an AnimationPlayer.
 
 .. image:: img/in_godot.jpg
@@ -49,7 +55,7 @@ Constraints
 Sometimes complicated animation is built with object constraint; a usual
 example is inverse kinematics. The add-on would automatically check if an
 object has some constraint; if it does, all the constraints are baked into
-every action the object has and then exported.
+actions and then exported along with the object.
 
 
 Animation Mode

BIN
getting_started/workflow/assets/escn_exporter/img/external_mat_option.jpg


BIN
getting_started/workflow/assets/escn_exporter/img/gd_dot_material.jpg


BIN
getting_started/workflow/assets/escn_exporter/img/nla_editor.jpg


BIN
getting_started/workflow/assets/escn_exporter/img/nla_pushdown.jpg


BIN
getting_started/workflow/assets/escn_exporter/img/nla_strip.jpg


BIN
getting_started/workflow/assets/escn_exporter/img/stash_action_option.jpg


+ 31 - 12
getting_started/workflow/assets/escn_exporter/material.rst

@@ -2,7 +2,8 @@ Materials
 =========
 
 Using existing Godot materials
---------------------------------
+------------------------------
+
 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
@@ -32,18 +33,36 @@ This can take the value of:
  - None - Do not search for materials. Export them from the Blender file.
 
 
-Export of Blender materials
----------------------------
+Export of Cycles/EEVEE materials
+--------------------------------
 
-The other way materials are handled is for the exporter to export them from
-Blender. Currently only the diffuse color and a few flags (e.g. unshaded) are
-exported.
+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:
 
-.. warning::
-    Export of Blender materials is currently very primitive. However, it is the
-    focus of a current GSoC project
+- all the ``noisy textures``
+- ``generated texture coordinates``
+- ``group node``
+- shader nodes except ``PrincipledBSDF``, ``Diffuse``, ``Glossy``, ``Glass``, ``add shader`` and ``mix shader``
 
 .. warning::
-    Materials are currently exported using their "Blender Render" settings.
-    When Blender 2.8 is released, this will be removed and this part of the
-    exporter will change.
+  If possible try to use PrincipledBSDF node with GGX distribution as the output shader
+  node, it is the only one guarantee to be exactly correctly. 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 Spatial Material.
+
+
+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. 
+
+.. image:: img/external_mat_option.jpg
+
+``.material`` file can be assigned to any material slot to be a external resource.
+
+.. image:: img/gd_dot_material.jpg