Text mograph nodes design

Maybe here you can add the opacity as an attribute and reference that attribute in the shader graph.

1 Like

I created an index attribute and tested this and it seems to work great. I can also add attributes for words and lines.

26 Likes

You are doing some amazing dev work with this, it looks really awesome! Any chance of an updated build on the blender.org site?

This is some awesome and fast working @ecke101

1 Like

I will have to refactor and clean up before updating the build, but maybe in the beginning of next week or so. Depends how much time I get this weekend. I have a few other projects as well.

7 Likes

A new build of D11522 is available now at Blender Builds - blender.org

I bundled all nodes I’ve been working with:

  • String to Curve (could maybe be renamed to something more fitting as it’s now basically a node to create a text paragraph.)
  • Text Instance (Instances characters on the points created by “String to Curve”)
  • Curve to Mesh 2D (creates surfaces that can be solidified for example)
  • String nodes: Value to String, String Join, String Substring, String Length

19 Likes

I’ve been playing with this and it is aweseome! I really hope this gets into master soon.
Do you think it would be possible to decide where the pivot point of the letters are with respect to the letters? Currently it’s in the bottom left corner. It would be great to be able to set it to the other corners or the middle, but I don’t know how feasible that is.

4 Likes

Nice to hear that you like it so far. Yes I have thought about that. I think adding an option in the “Text Instance” node to choose pivot point between origin and center (or all 4 corners and center) could be possible.

I had a comment on the patch page that bold/italic/underline should be solved. If someone has an idea how to design those features that would be helpful. I’m thinking using tags in the string, or using attributes. Then there’s the problem that a node can only store a pointer to one ID (Font/Material or whatever) by default.

You can try the new build now, I added an option for pivot point.

7 Likes

Thanks! I just tried it. It works great for rotation, but for size the pivot seems to be always in the bottom left corner still.

Yeah you’re right, I made it that way deliberately because I couldn’t get it to act naturally. The problem is the characters in the Text Instance node don’t know their original size from the String To Curve node so there’s no point to move them back to after scaling.
There are some ways to solve this. Maybe the easiest would be to have separate size and scale attributes where the size is a float attribute and the scale attribute defaults at (1,1,1).

edit: I’ve done those changes to the patch, but not updated the build yet.

2 Likes

What do you think about “text editor node” This way you can add features (like: italic, underline, multi line input… Etc) to the text editor and instance the whole thing as single node.
Moreover, IMHO it’s much better to write on a page than on a single line.

4 Likes

Yes, that could be useful. The problem is it’s probably not realistic to add those features to the text editor. It would take adding support for RTF or something similar. But still, a node that can take a text block and output to string could be something to think about.

6 Likes

Wow, this is amazing! After playing around with it and seeing what it can do, I found that this is useful for more than just mograph. You can generate attribute names dynamically, which is incredibly powerful. For instance, say I wanted to reuse an attribute and automatically generate a new one to store it in, without interfering with my old one.


Before, this would require the user to name the new attribute themself, make sure they already don’t have one named the same thing etc.

Now, this is incredibly easy to generate everything, which is what geometry nodes is about.

There is only one part missing. The ability to read strings and convert the found float into a float again. Then I would not have to connect an index to the next node, and it would be so much more powerful.

Anyways, thanks for all the hard work you put into this. This is definitely going to make geometry nodes better for everyone.

6 Likes

This is indeed super cool ! Btw you’re using attribute convert to duplicate an attribute, is this the normal way?

The attribute convert would give the new attribute the same values as the original attribute. I believe this is the generally used way to save the current value of an attribute to another attribute in the middle of the node tree.

1 Like

I have updated the build today, available here (D11522)

Changes

  • New node “Text to String” which takes a text block and outputs a string. An alternative name for this could maybe be “Text Block to String”
  • “Text Instance” is renamed to “Text Distribute” again after discussing it in the patch comments.
  • “Text Distribute” outputs a spline-attribute “group_index” where each character is a group.
  • The “Curve Fill”-node will use Constrained Delaunay Triangulation to fill the characters. It uses the “group_index” attribute to know which splines are forming a single character. This way now characters can be rotated/translated in all directions and still be filled. They can then be solidifed by a Solidify modifier (with Offset: 0 because of normal direction issues) after the geometry nodes modifier.

  • “Text Distribute” pivot point has been fixed by using separate attributes for fontsize (float) and scale (vector)

bild

I think that was it for now. Here’s a quick demo showing the characters being rotated, filled and solidifed.

Some flying text.

30 Likes

Thanks for the new build! These new additions look really good, I’ll give it a try tonight after work :nerd_face:

2 Likes

I still have to get my head around some GN concepts that are not completely clear to me, but man these latest changes make things so much easier to work with text!
It’s finally possible to keep the text editable, and I can just reuse the node tree with different objects :nerd_face:
For simple motion graphics stuff like lower thirds and title cards I can finally start migrating from AE, thank you SO VERY MUCH!

6 Likes

Excellent job!!!
This is extremely useful, I really hope it ends up in master, I’ll be using it often for my job.
Eventually it could be nice to have an alternative to the string to points node that can take a text object data, but it’s not strictly necessary, it works really well as it is.

2 Likes