Hello,
I like the way new Geo Text works, but I would like to ask for couple of features that I miss when compared to standard Text TOP.
Word wrap shouldn’t wrap individual letters, only words (just like it works in Text TOP).
It would be really handy to have Auto-Size Font options (same as in Text TOP).
Accessing text width and text height (per string when using specification DAT) would greatly help in various situations. (For example at this moment I would be able to write some simple word wrap and auto-size thanks to these values.)
Having an option of somehow showing the layout box would be great. EDIT - Found nice example on how to do this one in operator snippets.
I am not sure if this is possible or not, but it would be great if one could explicitly specify newline character within strings in specification DAT. So far I haven’t figured out how to do this, please let me know if it is already possible
Thanks for the feedback. Items 2-5 are all on our todo list.
The Geo Text and Text COMPs use a new 3rd party word wrapping engine which is why it behaves a little differently than the Text TOP. It will generally only wrap on specific break characters (spaces, tabs, etc) unless a single word is longer than the layout width, at which point it will break at the closest character.
I’m not sure what would be involved in updating that engine to work like the Text TOP, but I’ll look into it.
Thanks for info @robmc. Maybe the best scenario would be to have optional character breaking (meaning it won’t break long words unless it is explicitly allowed). I don’t want to break long words, but now I am thinking someone might be using it that way (who knows).
@robmc Please may I ask what is preferred way of dealing with zfighting on overlapping Geo Text characters? I felt like disabling Write Depth Values on used material might be a good solution, but I just wanted to check if I am not missing some other approach. Thanks. text_geo_zfigth.zip (698.2 KB)
Disabling the depth test when you draw the text can potentially work if you’re controlling the draw order, or you can also use the ‘Polygon Depth Offset’ on the MAT common page to give a slight offset to one of the objects ( Polygon Depth Offset | Derivative )
The best approach really depends on what else is in your scene and how much your camera is moving around.
Thank you very much for info. ‘Polygon Depth Offset’ sounds like a good solution, but I am not sure if there is some easy way of applying this offset per single character (so that individual overlapping characters wouldn’t be zfighting)?
The depth offset is applied to everything in the render call, so I think you’d need to break up your string into separate parts with different material settings if you need different values per character.
In theory, you could also write a custom GLSL shader for the text that manually applied a slight depth offset depending on the character, but that might start to get messy. If you went that route, you should be able to identify which character it is based on the vertex index, since there are always 4 vertices to each character.
I see, thanks. I guess custom GLSL shader would be a better option here as it is kind of hard to determine which characters might be overlapping (therefore I might apply slight offset to each character). But maybe I will simply get away with disabling Write Depth Values and controlling draw order. Thanks once again
@robmc I have recently been thinking about this. I thought it might be cool to have an option of specifying exactly what characters should the text break on (with default value containing list of characters that you currently use). This, along with explicit control over breaking within words (so that one can disable word breaking) would be great.
I found this thread trying to figure out how to show the layout box in the Geo Text. There’s an example in the operator snippets for the Geo Text where if you go inside the Geo Text network you’ll see a Geo with an orange line mat on it. Just paste that into your Geo Text.