Move Text/3D-Text along spline

Hi!

Is it possible to have a customizable Text orbiting around an object on a spline (e.g. the Universal logo)?
All i’ve seen during my research wasn’t quite what i was trying to achieve. I guess i could draw the text on a mesh and have it orbiting around an object, but that would only be my backup plan.

I’m grateful for any push into the right direction.

Orbiting is not an issue here. You need the geometry to adapt to the curvature of the spline. Even though the TextRender is using a single quad to display each character (I think) and would be flexible enough to bend nicely, it is not a static mesh - an asset that spline meshe components normally work with.

If you are not planning on updating the text during gameplay, it would be best to prepare it in advance as a simple mesh. Applying spline tangents to the spline mesh will allow you to deform it and adapt it to the spline’s shape.

Thanks for your answer. That’s definitely a start. I’ll look further into and report back.

Alternatively, if you want to be cheeky and use the TextRender, you could create a TextRender for every character in the text (this can be automated nicely, no need to do it by hand!). Put them all in an array and slide them along the spline in a loop. As a bonus you would be able to adjust character kerning dynamically and even update the text since TextRender Components can be spawned during run-time.

Let me know how any of this pans out in case you get stuck.

edit:
Also, if you need to create a perfectly circular, closed spline:

Alright, after 2 days of further research and testing various things, i thought it was time to give an update on my progress. Which is sadly not much i’m afraid.

1: No matter what i did, i just couldn’t get the TextRender to adapt to the shape of my spline. I guess you have to do some manual work to the TextRender (set start/end position/tangents), which i wasn’t able to figure out how to do it.

2: I tried to reproduce the vine growth example from the UE content examples with my own mesh. Deforming the mesh worked nicely. However, when i tried to animate it to follow the spline path, only the end tangent followed the path as expected. I guess my own mesh is set up incorrectly.

It would be fantastic, if you could find some time to provide an example (primarely for the TextRender solution), because it’s either not really covered much or it was sitting right under my nose all along and i was just too blind to see it.

1: No matter what i did, i just
couldn’t get the TextRender to adapt
to the shape of my spline. I guess you
have to do some manual work to the
TextRender (set start/end
position/tangents), which i wasn’t
able to figure out how to do it.

As I mentioned initially, text render is not a spline mesh so it cannot be deformed by the spline. A potential solution would be to make a text render for every letter:

MyText is converted to an array of letters, and for every letter I dynamically add a TextRenderComponent and set its text. The CharacterSpacing is not necessary as, eventually, we’re going to ask the spline to provide a position for every letter instead.

Which would give you something like that:

Next, you need a location and rotation for every letter along the spline. This can be done by dividing the spline length by the amount of letters and getting a location and rotation at the specified spline length.

It should give you something like this:

The text is stretched along the entire spline but it can be fixed easily.

2 Likes

I’ve added 2 extra variables:

  • SpacingOffset allows for controlling text spacing
  • StartOffset controls overall position of the text along the spline

Here’s how it looks in motion:

Hope it helps, let me know if any this is unclear.

1 Like

I’m feeling silly for not initially understanding what you meant by making a TextRender for each character. Now that i’m seeing it, it makes perfectly sense and is a very elegant solution actually. Pretty much exactly what i had in mind.

Thank you so much for your time and effort.

Hey Guys!

Is there any way I can receive this blueprint?
I can’t get it to work and would love to make use of this feature :slight_smile:

I no longer have this project, but the whole thing seems to be included here; admittedly, in picture format.

Which part are you having problems with?

and component

What kind of component? You do not need anything for this bar the spline. The Text Render Components are spawned dynamically - have a look at the image with Construction Script. For this to work ensure MyText string variable contains text.

but the spline isn’t circular

You may need to flag the Spline Component as closed. Ellipse should be set to 1 as default, Tilt to 0, Radius needs to have a value, too - start with a 1000 or something like that.

I’ve replicated the whole blueprint, but I don’t know how to make it work. I added a spline and component to my blueprint actor. After that, I added the perfect circle spline function and in the event graph I replicated the rest. I dragged it into the world, but the spline isn’t circular and I don’t know how to spawn any letter.

Thanks a lot for answering! That is really appreciated, especially since this post is pretty old already!

I have replicated your blueprints and processed the feedback you just gave me. I have set the spline component as closed as well, but the result is way off. All I want is to orbit my text around a sphere.

Here are some screenshots. If you’ve got some time to look at it, that would really be appreciated!

Hm, I do not see you use the function that creates the points. Place it in the Construction Script as the first thing, before the first loop.

And, most importantly, set the spline component’s points to that array:
SplineSet Spline Points (or something like that)

edit: this thread does not cover certain things, as the OP did not want to have a circular spline in the end. I believe we discussed him creating it by hand. But what I mentioned above should get you going. But please do let me know if it does not.

Sorry, I am still a noob. I was going to leave you alone, but since you asked me to let you know if it didn’t work, here is the next screenshot. I think I might have misunderstood you, but you can see the selected option in the spline’s details panel. It is still not working, and there is probably an obvious reason for that. If it is all too much to explain, don’t hesitate to let me know :wink:

EDIT:
It is actually partly working. This is what it looks like in the level.

Okay, got yah! I have got the circular spline working, which is awesome! Thanks a lot mate.

There is one thing left. I would love to have the same word orbitting the spline twice. And also with some space in between them. (See screenshot). If you haven’t got any time to help me, let me know! You have helped me a lot anyway :slight_smile:

It does not look like it’s working. It looks as if you manually set the points. There should be 12, you’ve got 4. You need to create the points in the Construction Script and then assign them, like I mentioned above.

It would look similar to this:

Looks good!

One question here. Will your spline always be a circle in this case? Or do you need the letters to follow a more complex path?


If it’s just a circle, it would be much easier (and more performant) to rotate the whole spline rather than make the letter slide along it.

For something that simple, you may just need to add a Rotating Movement component to the actor and set the rotational value to the desired speed. Place another actor for the second text.


If you need to use a single actor for both pieces of text, that can be done, too. You will need to duplicate the letters loops - wrap them with another loop.

Thank you so much for helping me out!! I do really appreciate it, thanks!!

I didn’t have to duplicate the loops. I just wrote the same word 3 times with the same amount of space between them, and it seems to be working as expected.

All I have to do now, is change the font’s settings. Is it possible to change the fontstyle, size and material? If that is fixed, I am completetly done! (I tried changing the textrender component’s settings, but that is handled seperately).

Once more, thanks a lot! The world needs more people like you <3

You are my hero, thank you so much! Now I am done, it is all working! :slight_smile: