I want to change the color of some text in my game. I've tried adding materials, but whenever I press P to play the game, the text stays the same white color. Any ideas?
-
$\begingroup$ Can i do that straight to this site or does it have to be hyperlinked? $\endgroup$– christaiCommented Jul 24, 2014 at 20:23
-
$\begingroup$ Hyper-linked, but now its not necessary since gandalf3 found the issue. $\endgroup$– GiantCowFilmsCommented Jul 24, 2014 at 20:24
-
$\begingroup$ Related: blender.stackexchange.com/q/8399/599 $\endgroup$– gandalf3Commented Jul 24, 2014 at 20:32
2 Answers
You need to set the Object color in Properties > Display:
Text objects are made out of polygons in the 3D view, however in the game engine they are rendered straight as text (there are also some issues with picking the resolution to render it at, which is why it sometimes looks pixelated).
If you want to have your text look as it does in the 3D view (3D, with materials/textures), then you'll have to convert it to a mesh (AltC> Convert to mesh). Note that once it's a mesh you can no longer edit it as text.
If you do need to have dynamically editable text, then perhaps the technique mentioned in this comment will help:
. . . I don't recommend using text objects at all, since they are a hack right now. The other problems you get are no depth sorting, does not respect materials, Z buffer issues, no alignment. I recommend using this method. If anything you could use text objects to render text off-screen and combine it with the uv mapping technique.
-
$\begingroup$ Why does it use object color instead of materials though...? Could you add some more detail. $\endgroup$ Commented Jul 24, 2014 at 20:23
-
2$\begingroup$ @GiantCowFilms I have no idea why, I guess it's just a strange quirk. I'll do some digging and see what I can find out. $\endgroup$– gandalf3Commented Jul 24, 2014 at 20:25
-
1$\begingroup$ Does this mean i can't add any gloss or anything? $\endgroup$– christaiCommented Jul 24, 2014 at 20:25
-
$\begingroup$ @christai There's probably a better way, but you could convert it to a normal mesh with
Alt C
. As long as your text doesn't need to change in real time, converting it should work fine. $\endgroup$– gandalf3Commented Jul 24, 2014 at 20:26
you can use sverchok add-on.
hide text object in layer 2, use sverchok's (object in) node to get text object, then use (viewer bmesh) node to assign material and output mesh. this way you can keep text object and edit text content!
-
$\begingroup$ You can still keep the text object and edit its content with the approved answer above. $\endgroup$– christaiCommented Aug 14, 2017 at 9:20