-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Document Label3D and text mesh (4.0) #5841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <https://github.com/godotengine/godot-demo-projects/tree/master/viewport/2d_in_3d>`__ | ||
| 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 <doc_3d_rendering_limitations_transparency_sorting>` | ||
| 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. | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,3 +19,4 @@ | |
| using_multi_mesh_instance | ||
| csg_tools | ||
| procedural_geometry/index | ||
| 3d_text | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.