diff --git a/tutorials/3d/3d_text.rst b/tutorials/3d/3d_text.rst new file mode 100644 index 00000000000..d9daaae9fea --- /dev/null +++ b/tutorials/3d/3d_text.rst @@ -0,0 +1,49 @@ +.. _doc_3d_text: + +Introduction +============ + +In a project there may be times when text needs to be created as +part of a 3D scene and not just in the HUD. Godot provides two +methods to do this. The Label3D node and the text mesh for a +MeshInstance3D node. + +This page does **not** cover how to display a GUI scene in a 3D +environment. For information on how to do that see `this `__ +demo project. + +Label3D +------- + +.. image:: img/label_3d.png + +Label3D behaves like a label node but in a 3D space. Unlike label +node this can not inherit properties of a GUI theme. However its +look remains customizable and uses the same font subresource +control nodes use. + +Label3D has minimal interaction with a 3D environment, it can be lit +up and shaded by light sources if the shaded flag is enabled, but it +will not cast a shadow, even with cast shadow turned on under the nodes +GeometryInstance3D settings. This is because the node is a quad mesh +(one glyph per quad) with transparent textures and has the same limitations +as Sprite3D. See :ref:`this page ` +for more information. + +Text mesh +--------- + +.. image:: img/text_mesh.png + +Text meshes have similarities to Label3D. They display text in a 3D +scene, and will use the same font subresource. However text is 3D and +has the properties of a mesh. A text mesh cast shadows onto the environment +and can have a material applied to it. Here is an example of a texture and +how it's applied to the mesh. + +.. image:: img/text_mesh_texture.png + +.. image:: img/text_mesh_textured.png + +There are two limitations to text mesh. It can't use bitmap fonts, or fonts +with self intersection. diff --git a/tutorials/3d/img/label_3d.png b/tutorials/3d/img/label_3d.png new file mode 100644 index 00000000000..8e0cd299b7f Binary files /dev/null and b/tutorials/3d/img/label_3d.png differ diff --git a/tutorials/3d/img/text_mesh.png b/tutorials/3d/img/text_mesh.png new file mode 100644 index 00000000000..cabeaef07a5 Binary files /dev/null and b/tutorials/3d/img/text_mesh.png differ diff --git a/tutorials/3d/img/text_mesh_texture.png b/tutorials/3d/img/text_mesh_texture.png new file mode 100644 index 00000000000..ec5eb8c0721 Binary files /dev/null and b/tutorials/3d/img/text_mesh_texture.png differ diff --git a/tutorials/3d/img/text_mesh_textured.png b/tutorials/3d/img/text_mesh_textured.png new file mode 100644 index 00000000000..7dec95e124f Binary files /dev/null and b/tutorials/3d/img/text_mesh_textured.png differ diff --git a/tutorials/3d/index.rst b/tutorials/3d/index.rst index 64b1e1cd3dc..f752c80223a 100644 --- a/tutorials/3d/index.rst +++ b/tutorials/3d/index.rst @@ -19,3 +19,4 @@ using_multi_mesh_instance csg_tools procedural_geometry/index + 3d_text