Page 1 of 1
Draw text to texture(billboard or overlay)
Posted: Mon Apr 14, 2014 12:54 pm
by TGrey
Hello there, my goal is output text above my character. First step is output his name, then, character speech. For now, i know 2 ways to do this:
1)Billboard
2)Overlay
Both from example page(Moving text etc...)
The problem is that some examples for Mogre, other, i think, is too complex. So my question is: is there another methods to draw text to texture or some methods to output character name and speech? It would be great if there was method like MS WinApi DrawText to HDC.
Thanks.
Re: Draw text to texture(billboard or overlay)
Posted: Tue Apr 15, 2014 8:22 pm
by TGrey
I have added Gorilla to the project, it can output string, but it works not like a billboard. When i change my position i cant read the line( Does Gorilla suitable for this?
Re: Draw text to texture(billboard or overlay)
Posted: Wed Apr 16, 2014 4:51 am
by areay
TGrey wrote:
but it works not like a billboard
What do you mean by that?
Re: Draw text to texture(billboard or overlay)
Posted: Wed Apr 16, 2014 11:03 am
by TGrey
You can see this effect here [youtube]
https://www.youtube.com/watch?v=t03LY7g3hH4[/youtube]
Attached node doesn't rotate to camera view(like a billboard does), so if somebody will stay from me on 90 degree, i cant read his name or speech.
Re: Draw text to texture(billboard or overlay)
Posted: Wed Apr 16, 2014 10:25 pm
by areay
I've only used Gorilla briefly a long time ago so I'm not sure how it all works. Why don't you ask in the Gorilla thread?
http://www.ogre3d.org/forums/viewtopic.php?f=11&t=59984
Re: Draw text to texture(billboard or overlay)
Posted: Thu Apr 17, 2014 9:10 am
by TGrey
Gorilla is one of available options. It seems i found decision for this, if my solution will work i post it here.
Re: Draw text to texture(billboard or overlay)
Posted: Tue Apr 22, 2014 12:30 pm
by TGrey
So sad news is Gorilla doesn't work at all) I can't fix it to my requirements.
So i take MovableText example, fix couple things like
1)Text raise up on char height when new line added(\n)
2)Now it work properly with strings that starts with space symbol.
Seems good.