I’m currently working on a sport game using UE4 and blueprints. I would like to have the name and number of the player added to the jersey material.
So far I have not found a way to do it so if anymone can give me any direction that would be gold.
Idealy, I would like to have a character editor menu similar to what you can find in UE4 games like Supercross the game or MXGP.
Make flipbook texture with all digits.
Then make material that display given number. Make this with texture scaling and shifting it.
First make for single digit, then combine 3 such sections into one 3 digit string.
Names would be bit complicated to do this way.
When you have material that displays numbers, use again UV scalling and shifting to place that number material in right spot.
This all can be done with just materials.
However for that right look of number (various sizes depends on digit etc), you should consider just making name with number and storing that as texture per player.
And yes in text based shaders i could just copy paste code after googling some.
Ok i have some time, i will try to make such material for you in some stages (just like i am creating it), hard to get to last stage without creating simple versions:
This is simplest material that can potentially create what you need.
You need texture with numbers 0 to 9, in 4x4 grid yes not all slots will be used.
I googled such texture, and i am not sure if its copyright free, so you get only material.
Now working on second step: material that will display number from that texture using only 0…9 integet (combine x and y inputs)
Amazing, thanks a lot for your time I really appreciate.
I kept searching for the best solution and one guy on a discord channel told me without any more precisions that he did it using a render target with 2 text layers and saving the result as new material.
He told me that it also allows using different font etc.
I’m yet not sure how to set this up and need to learn more about render targets.
But I will for sure try your solution too.
Yes render target would work,
However my solution is not finished (done half way trough)
I could not modify UV coordiates for digits to properly display, there is some error in cvalculations.
And i cannot find where.
This also can have different fonts, you just need to make textures.
However for digits and alpha, they will be quite big if you want any decent looks.
This can work for displaying logo, emblems etc, where you have to display single picture out of 16
Hello Nawrot, I am member of one editing team who is working at one new Football Game. I need to add dynamic fonts(numbers,names) for each player that I will import from my data table. I saw your answers above, that’s why I am asking you, your progress was good but unfinished!! Could you help me??
Best Regards
Xaris