Description
Describe the project you are working on
A game that uses sprite3ds and label3ds to create world icons
Describe the problem or limitation you are having in your project
With the introduction of Label3D nodes, you can now create text, and place it in the world quite effortlessly.
The original way to do this, was to use a viewport assigned to a sprite3D, which, for those who are unfamiliar, is very cumbersome. Having to adjust the resolution, scale, constantly reapply the viewport texture etc. etc.
Label3D solved this problem.
However, there is one glaring issue.
Text is often not left by itself.
Normally, you want to apply some sort of border, texture, something to make the text look neat.
However, when you put a Sprite3D and Label3D on top of each other, there can be undesirable effects.
Now, there are various ways to resolve this, however, none of them are good solutions.
Option 1. Move the label in front of the sprite
Option 2. Use viewport with sprite3d
Option 3. Use combination of disable depth test with alpha cut set to discard
Option 4. Use material with grow property
Option 1. Although this will work for certain angles, if you wish to use billboard, this will not work, as you would need the center of origin to be the same
Option 2. Again, Label3D was made to avoid this issue
Option 3. This is actually a decent solution at the moment, however, this results in the texture being visible at all times, requiring use of visibility range which is a bit hacky
Option 4. I haven't experimented with this one enough, but there may be some potential here. However, you will not be able to use animated sprites without a bit more "hacking"
Overall, the solutions are very niche, and come with their sets of ups and downs.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
A z offset would allow you to have the text render in front of a sprite very easily, without all the hacky workaround.
Additionally, a z offset would allow for more intricate 3d world UI, as you can now design transparent textures modularly, and layer them with Sprite3D nodes.
The closest thing to a z offset at the moment would be the material "grow" property, which shows it should somewhat be possible?
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Simply, there will be an additional option for Z offset, and this will move the Sprite/text on the z axis.
An easy visualization for how this can work can be seen with the "grow" modifier on a material3d, where growing the texture
slides the texture across the z axis.
If this enhancement will not be used often, can it be worked around with a few lines of script?
This can be worked around, however, it would negate the work that was put into making Label3D useful to begin with. If you were to use a texture with text in a billboard scenario, you would have to go back to using a viewport with sprite3d.
Is there a reason why this should be core and not an add-on in the asset library?
Core. Also, there recently was (#60595), so why not add z axis?
Activity