Textured Fonts in Torque?
by Paul Jan · in Torque Game Engine · 11/01/2005 (10:35 pm) · 8 replies
I'm trying to incorporate the one resourse that touches on this
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4645
and am finding it really tough going. I've attapted it partially to work with texturemanager, but I can't get any transparency out of it.
Right now its being made using the Torque billboard, and a png file with a transparency color. Does anyone know how to make the billboard do transparency?
edit: Meh. Have transparency working,
(glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );)
but now OpenGL is getting in the way since I went and put this in ShapeBase::RenderObject, and now everything except the terrain is disappearing in the transparency.
As always, help from someone who knows about this would be appreciated :)
edit2: Okay, so this part needs to go in a seperate section for transparent stuff. Too dang late, can't think straight.
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4645
and am finding it really tough going. I've attapted it partially to work with texturemanager, but I can't get any transparency out of it.
Right now its being made using the Torque billboard, and a png file with a transparency color. Does anyone know how to make the billboard do transparency?
edit: Meh. Have transparency working,
(glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );)
but now OpenGL is getting in the way since I went and put this in ShapeBase::RenderObject, and now everything except the terrain is disappearing in the transparency.
As always, help from someone who knows about this would be appreciated :)
edit2: Okay, so this part needs to go in a seperate section for transparent stuff. Too dang late, can't think straight.
#2
11/03/2005 (12:29 am)
Hurray, just a little modelview.normalize() later, and it works!
#3
11/03/2005 (2:04 am)
Nice screenshot =)
#4
11/14/2005 (4:14 pm)
Nice work, looks great! Any way you can post it as a resource or post your changes in here? Thanks!
#5
11/14/2005 (4:21 pm)
Neat. That would be a kickass resource. ;)
#6
11/19/2005 (11:11 pm)
Anyone have a way to get ahold of Paul? I would like to speak to him about his work
#7
02/19/2006 (11:21 pm)
Ah whoops - I've been bouncing around to other things - I'll try to get something together. Personally I think my implimentation has been horible which is why I forgot about it... :P
#8
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9805
02/20/2006 (12:11 am)
Dont worry about it Paul, I got tired of waiting and wrote my own :)www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9805
Torque Owner Paul Jan
I'm using the following code from dglDrawBillboard:
MatrixF modelview;
dglGetModelview( &modelview );
modelview.transpose();
for( int i=0; i<4; i++ )
{
rotMatrix.mulP( points[i] );
// modelview.mulP( points[i] );
// points[i] += position;
}
I know the commented code is resposible for rotating it, but when uncommented, the text gets moved to somewhere I can't see it, or rotated perpendicular to the camera?
Sigh - forgotten most of the matrix math... :(
Okay, its getting translated into the great beyond since modelview isn't a rotation matrix - which brings us to how do we get a rotation matrix out of it?