Labels on terrain

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
kubatp
Gnome
Posts: 368
Joined: Tue Jan 06, 2009 1:12 pm
x 43

Labels on terrain

Post by kubatp »

Hello everyone,
I would like to start a discussion about possible techniques how to add labels onto terrain. To illustrate what I mean:
Image

What techniques would you use to achieve this?
rpgplayerrobin
Gnoll
Posts: 619
Joined: Wed Mar 18, 2009 3:03 am
x 353

Re: Labels on terrain

Post by rpgplayerrobin »

You can do this by making an atlas texture using a font, then using that atlas to render out text using simple quads/triangles using the UV needed for each letter in the atlas.
This works for both 2D (GUI) and for 3D.

From the picture, it seems each letter in the text is just rotated a bit, you could probably just do a simple curve (any kind) and place the quads/triangles with that.

Take a look at the GUI system called Gorilla: http://wiki.ogre3d.org/Gorilla.
There you can basically do everything I explained, even in 3D.
kubatp
Gnome
Posts: 368
Joined: Tue Jan 06, 2009 1:12 pm
x 43

Re: Labels on terrain

Post by kubatp »

Thank you rpgplayerrobin, I will investigate it.
I was also thinking about a solution other way around - create textures with library like this https://www.codeproject.com/Articles/13 ... ith-VB-NET and placing it just as a rectangle above the map. This would probably mean higher performance impact than the solution you are proposing, correct?
Post Reply