polygon font demo + 3d text demo

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
User avatar
Mochino
Gnoblar
Posts: 15
Joined: Fri Feb 02, 2007 9:00 pm

Post by Mochino »

nop, it acually run, but it crashed, sorry
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Post by Assaf Raman »

I see. can you compile it? does my demo application crashes? can you show me the call stack?
Watch out for my OGRE related tweets here.
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Post by lonewolff »

This looks awesome. I can think of many uses for it.

Wel done! 8)
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Post by lonewolff »

Is there a DirectX version of this or is it for OpenGL users only?
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Post by Assaf Raman »

It works for both - it only creates a mesh...
Watch out for my OGRE related tweets here.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

Woohoo! Looks like I missed this! Great work, Assaf Raman! :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Post by lonewolff »

This looks great.

Only problem I had was that I didn't have 'ARIALUNI.TTF' installed on my system which caused a fatal exception when loading the program.

After installing that font all was good!
Mike_Z
Gnoblar
Posts: 1
Joined: Sun Nov 04, 2007 2:11 am

Post by Mike_Z »

I realize this thread is a bit old, but I was using this recently and it works fantastically...except for one thing - the bounding boxes of the final mesh are totally off. This requires 2 fixes:
-=-=-=-=-=-=-=- one -=-=-=-=-=-=-=-
The version of FTGL you included with your project has a bug in it.
In FTPolyGlyph.cpp,
void FTPolyGlyph::AddOneToMesh( const FTPoint& pen, FTPMesh & mesh,unsigned int i, float normal, float zOffset)
the code at the end of the function should be

Code: Select all

	mesh.minX = min(mesh.minX, triangleStripBuffer[i * 3 + 0] + pen.x);
	mesh.maxX = max(mesh.maxX, triangleStripBuffer[i * 3 + 0] + pen.x);
	mesh.minY = min(mesh.minY, triangleStripBuffer[i * 3 + 1] + pen.y);
	mesh.maxY = max(mesh.maxY, triangleStripBuffer[i * 3 + 1] + pen.y);
-=-=-=-=-=-=-=- two -=-=-=-=-=-=-=-
At the bottom of createTextMesh(), you need to add depth into the final bounding box:

Code: Select all

	Ogre::Vector3 minV(mesh.minX, mesh.minY, 0.f), maxV(mesh.maxX, mesh.maxY, 0.f);
	if(depth > 0.f)
        minV.z = -depth;
    else
        maxV.z = -depth;
	ogreMesh->_setBounds(Ogre::AxisAlignedBox(minV, maxV), false);
-=-=-=-=-=-=-=- end -=-=-=-=-=-=-=-

Then everything is perfect. Kudos to you for this very useful utility.
Mike Z
User avatar
ancestral
Halfling
Posts: 54
Joined: Tue Nov 13, 2007 4:48 pm
Location: Verona, Italy

Post by ancestral »

For successfully compiling on Linux with gcc I had to add a few modifications:

in file FTPolyGlyph.cpp you have to include <algorithm> otherwise gcc won't find min and max functions.
Moreover, min and max requires same types, so a cast is needed:

modifications to do in File FTPolyGlyph.cpp

Code: Select all

#include "FTPolyGlyph.h"
#include "FTVectoriser.h"

#include <algorithm>

...
...
...

void FTPolyGlyph::AddOneToMesh( const FTPoint& pen, FTPMesh & mesh,unsigned int i, float normal, float zOffset)
{
...
...
...

	mesh.minX = std::min((double)mesh.minX, triangleStripBuffer[i * 3 + 0] + pen.x);
	mesh.maxX = std::max((double)mesh.maxX, triangleStripBuffer[i * 3 + 0] + pen.x);
	mesh.minY = std::min((double)mesh.minY, triangleStripBuffer[i * 3 + 1] + pen.y);
	mesh.maxY = std::max((double)mesh.maxY, triangleStripBuffer[i * 3 + 1] + pen.y); 

}

...
...


and of course you have to change the path for ttf font file in PolygonFont.h

Byez
Till
Gnoblar
Posts: 22
Joined: Tue Sep 30, 2008 5:47 pm
Location: Paris, France

Extra Segments

Post by Till »

Hi everyone,
the work looks definitely very nice, and deserves being added as a standard feature.

I know this thread is quite old, but I did try to use the 3D Text PlugIn recently.
I did compile librairy and demo on Shoggoth (1.6.0RC1).

Everything runs fine, but looking at wireframe gives extra segments.(see picture)
Image
What can we do to fix this?

Is this plug going to be official and realeased? I'd say it's worth being.
Till
Gnoblar
Posts: 22
Joined: Tue Sep 30, 2008 5:47 pm
Location: Paris, France

Post by Till »

Hi all,
after a chat with Assaf (conceiver of the demo) I realized the extra segments were only present when using the DirectX Renderer.

So it looks like the project might be enanced.
I don't know yet if I have time to put my hands on it.
(I'm just yet learning how far I can go with the whole beast).

My feeling is that this tool is worth being released and included in future versions.
So it's up to the community (including me) to try to figure out how we can make this growing up.

Thanks to anyone who's feeling concerned.
User avatar
edoardo
Kobold
Posts: 36
Joined: Thu Apr 28, 2011 8:44 am
Location: Torino, Italy

Re: polygon font demo + 3d text demo

Post by edoardo »

Any news about the Addon?

Is there a version for C#?

Thanks in any case for a kind reply...
--
"Fatti non foste a viver come bruti, | ma per seguir virtute e canoscenza."
"You were not made to live your lives as brutes, | but to be followers of virtue and knowledge."
(Divina Commedia, Inferno, Canto XXVI, 119 – 120)
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: polygon font demo + 3d text demo

Post by Assaf Raman »

I don't understand.
Watch out for my OGRE related tweets here.
User avatar
cose
Halfling
Posts: 46
Joined: Thu Jul 24, 2008 5:48 pm
Location: Marseille

Re: polygon font demo + 3d text demo

Post by cose »

hopefully the ogre procedural project could integrate this feature in their next releases. it could be great.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: polygon font demo + 3d text demo

Post by Assaf Raman »

Include what?
Watch out for my OGRE related tweets here.
User avatar
cose
Halfling
Posts: 46
Joined: Thu Jul 24, 2008 5:48 pm
Location: Marseille

Re: polygon font demo + 3d text demo

Post by cose »

Outline Fonts import with extrusion to generate the mesh.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: polygon font demo + 3d text demo

Post by Assaf Raman »

You can just use the code from this thread...
Watch out for my OGRE related tweets here.
User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia
x 81

Re: polygon font demo + 3d text demo

Post by Mind Calamity »

I'm amazed at how people can find and dig out a 3-4 year old thread.

I didn't even know it existed, still great work, it really reminds me of Blender's text tool.
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: polygon font demo + 3d text demo

Post by Assaf Raman »

I think this is from the time before I even was a part of the team.
Watch out for my OGRE related tweets here.
User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia
x 81

Re: polygon font demo + 3d text demo

Post by Mind Calamity »

Assaf Raman wrote:I think this is from the time before I even was a part of the team.
Which tells us you were awesome before and after you joined the team, and that your place there is deserved :)
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: polygon font demo + 3d text demo

Post by Assaf Raman »

The funny thing is that I got into the team for the D3D11 render system - that no one ever used. :lol:
Watch out for my OGRE related tweets here.
User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia
x 81

Re: polygon font demo + 3d text demo

Post by Mind Calamity »

Assaf Raman wrote:The funny thing is that I got into the team for the D3D11 render system - that no one ever used. :lol:
It will be used, it just needs more time, it's definitely not wasted effort, I mean when it's complete and stable enough (it's not now, is it ?) to be used, I'm sure it will be, and also the requirement of shaders, no matter how simple the scene/objects may be is not that easy to meet, I think that's the reason it's not as used as D3D9.
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt
User avatar
zarlox
Halfling
Posts: 70
Joined: Tue Apr 19, 2011 12:32 am
Location: Canada
x 2

Re: polygon font demo + 3d text demo

Post by zarlox »

Mind Calamity wrote:I'm amazed at how people can find and dig out a 3-4 year old thread.

I didn't even know it existed, still great work, it really reminds me of Blender's text tool.
I didn't know this existed either and I am glad someone brought it back up. I actually was about to look into doing something like this for my game as it is a racing game and i want a 3...2...1...GO 3D countdown :D

Good Job Assaf
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: polygon font demo + 3d text demo

Post by Assaf Raman »

Use the code - and save mesh files if your text is always the same...
Watch out for my OGRE related tweets here.
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 136

Re: polygon font demo + 3d text demo

Post by spacegaier »

AFAIK, the code is not really working anymore. At least I remember testing it some months ago and quite some interfaces have changed since your initial release (I think mainly of the libs you used). Perhaps if someone gets it running again with updated libs, they could provide the new version.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...