-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add TextTexture for 3D signs #11443
Comments
Is this a feature in Unity? It's been a little while now since I've used the engine, so maybe it's been added since or I've just forgotten about it, but I don't remember there being a built-in way to generate a texture with text on it. Godot does have Label3D, which is pretty similar to a TextMeshPro object in Unity (what you might be thinking of from there). |
Ok, that's interesting, thank you. That is extremely helpful to me. However, I am not so sure we can't also still "break up" the implementation. I mean, there could be cases where people would like to put text on other kinds of meshes. Also, it has the advantage of letting you tile the text if needed. Although, I don't think I will personally need it at least for the time being. For example, imagine if you wanted the sign bent or curved. |
If you want actual mesh-based text, you can use a MeshInstance3D node with a TextMesh mesh. This will generally be slower and look worse than Label3D unless you use some kind of antialiasing with subpixel precision (MSAA/TAA/FSR2) though.
TextMesh can achieve this if you apply a custom shader on a material override set on the MeshInstance3D node. There's an example of this in the 3D Labels and Texts demo. |
For a texture with text displayed on it, that you could apply to any texture-displaying object, it sounds neat but I could also imagine it scope-creeping its way up into something nearly indistinguishable from a separate Viewport. These are some questions about the functionality I could see people asking:
If these things were to be implemented, I feel like it'd more or less just be a second implementation of a Godot SubViewport and ViewportTexture. |
Yeah so I'm making a city builder in Godot. One of the requirements is I am using only built in shapes to create the art, no use of Blender. I'm rendering small signs to the buildings for their billboards/advertisements. Sometimes the TextMesh will break with certian Unicode Emojis, such as the Radioactive symbol, othertimes it don't. So I'm going to try switching out to Label3D with some extruding to get around that. |
I'm planning to release the source to the people of Godot. |
Describe the project you are working on
Heavily UI based with a lot of billboard signs with text
Describe the problem or limitation you are having in your project
I would like to add signs to my game with various text written on them.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
There would be a special texture type called TextTexture that renders text onto it. It would make it so much easier than having to code anything or hack around with viewports. I don't know if MeshTexture is able to do this but I haven't figured out how to use it yet as its not got hardly any documentation. I have however used TextMesh but it's inefficient for simple billboards and especially if you have a lot of text plus it sometimes doesn't work with certain non-monochrome glyphs.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
You want to add a 3D sign to your game, you would:
Voila, 3D sign
If this enhancement will not be used often, can it be worked around with a few lines of script?
Not really you have to code a viewport and make a mess of your scene since there's no directly renderable textures.
Is there a reason why this should be core and not an add-on in the asset library?
It's very common feature, in a lot of engines including Unity/Roblox, etc. It's important to a lot of games to just quickly slap some text on 3D signs and stuff.
The text was updated successfully, but these errors were encountered: