Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How can i do Text render Unlit with custom font?

i'm new to the engine and i'm trying to learn by making a little 2d Side-Scrolling game, everything was going right until i tried to make that when the player hits a enemy the value of the damage pops up, i found that with Text render component you can make that, the problem is that i can't find how to set it to Unlit, so that i don't have to put a light source. I'd like to know how to use a custom font aswell.

Basically i'd like to know how to use a custom font and be Unlit on Text render component.

Product Version: UE 4.14
more ▼

asked Mar 16 '17 at 08:55 PM in Using UE4

avatar image

20 3 3 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

To make the material unlit, click the magnify glass beside the material to find it in the content browser, then copy it into your own project files (DefaultTextMaterialOpaque). Open your copied material, change the shading model to Unlit, and disconnect VertexColor from BaseColor, and plug it into EmissiveColor instead:

alt text

To add a custom font to a Text render:

  1. Go to content browser, right click, User Interface>Font, give it a name.

  2. Open the created asset, in it's details under Font, change Font Cache Type to be "Offline"

  3. A list will open where you can pick your font, search and select it. Pick font size 22 or so. Larger is smoother but takes more space it seems.

  4. Set Texture Page Width to 512, and Max Height to 256, then go to Asset > Re-import.

  5. Check Use Distance Field Alpha and save

  6. Click the texture in the viewport, and under Page Details scroll down to Compression Settings, change this to DistanceFieldFont(R8) alt text

If your texture is in two or more pages you will need to set the compression for each one, so click it, then change it.

Go back to your text redner and set the font, the material doesn't appear to matter:

![alt text][3]

t.png (218.9 kB)
text.png (73.6 kB)
f.png (232.3 kB)
f.png (232.3 kB)
more ▼

answered Mar 16 '17 at 10:03 PM

avatar image

1.8k 49 22 67

avatar image Marokaro Mar 16 '17 at 11:04 PM

Exactly what i needed and really fast, thank you very much.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question