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: 351
Joined: Tue Jan 06, 2009 1:12 pm
x 7

Labels on terrain

Post by kubatp » Thu Feb 28, 2019 7:18 pm

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?
0 x

rpgplayerrobin
Gremlin
Posts: 151
Joined: Wed Mar 18, 2009 3:03 am
x 16

Re: Labels on terrain

Post by rpgplayerrobin » Sat Mar 02, 2019 4:45 am

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.
0 x

kubatp
Gnome
Posts: 351
Joined: Tue Jan 06, 2009 1:12 pm
x 7

Re: Labels on terrain

Post by kubatp » Mon Mar 11, 2019 7:41 am

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?
0 x

Post Reply