Best practices to display a lot of different Text on screen?

Hello,

I would like to know which is the best approach to display a lot of text (say 10 000 different words that need to be separately moved on the screen).



-1- create Text3D objects? => what are pro and cons?

-2- use Texture rendering on quad => what are pro and cons?

-3- other?



Thanks for your comments,

NG

It also depends on what kind of graphic quality you want.

3D objects will use many polygons, but have a depth if you want to turn around them.

Maybe you can create a quad for each letter, and create words using these sharded quads. (also works with 3D letters)



I dont think that create 10k differents words is a good solution, because it means create 10k different cases so lot of memory use.

You know that 10000 words are a lot?



10000 words will fit never readable on a screen.

Sample:

1 character = 10x15 pixel = 150 pixel

1 word = 6 characters = 900 pixel

10.000 words = 9.000.000 pixel

Normal screen resolution = 1280x720 pixel =  921.600 pixel

=> Ten times more pixels are required than you have available on a normal screen.



Have you created a mockup of the screen?

I think you will need some kind of level of detail, not only for performance reasons, but also to make the text readable.

Could you provide soemthing like a sketch how you think it should look like so we know what

you want it to be? For me still the easiest way to create text is use something like this:


Node text = Text.createDefaultTextLabel(name, initialText)



Actually I never used that in a mode != ORTHO....

To be able to help you, you must be more precise

Hi all,

First thanks for your replies.


pitchonel said:

It also depends on what kind of graphic quality you want.
3D objects will use many polygons, but have a depth if you want to turn around them.
Maybe you can create a quad for each letter, and create words using these sharded quads. (also works with 3D letters)

I dont think that create 10k differents words is a good solution, because it means create 10k different cases so lot of memory use.


For the quality, I expect the best of course :)
Although I know I'm encountering limitations since the FPS is very low...

Sharing the letters to build words is a good idea but aren't the Glyph3D already present for that (Text3D / Font3D)?

About memory usage, you are right but I can't see any other way for the moment. Culling is maybe my solution regarding
speed (only) not memory of course.

JackNeil said:

You know that 10000 words are a lot?

10000 words will fit never readable on a screen.
Sample:
1 character = 10x15 pixel = 150 pixel
1 word = 6 characters = 900 pixel
10.000 words = 9.000.000 pixel
Normal screen resolution = 1280x720 pixel =  921.600 pixel
=> Ten times more pixels are required than you have available on a normal screen.

Have you created a mockup of the screen?
I think you will need some kind of level of detail, not only for performance reasons, but also to make the text readable.


JackNeil, you are absolutely right; your post is all about reality and I think I'll have to review my methodology.

Of course all the text doesn't need to be readable at the same time. And I will surely use transparency.

I didn't create a mockup so far but your remarks will surely help me.


ttrocha said:

Could you provide soemthing like a sketch how you think it should look like so we know what
you want it to be? For me still the easiest way to create text is use something like this:

Node text = Text.createDefaultTextLabel(name, initialText)



Actually I never used that in a mode != ORTHO....

To be able to help you, you must be more precise



ttrocha, following is a brief idea of the kind of application I wish to create:

http://www.sharewareplaza.com/images/screenshot/72082.gif

It is a tool used to display a database schema. I wish to create one to be able to
see in seconds the complexity of relationships between tables...

I tested this tool and the interface looks great but that's all, the ergonomy doesn't
please me: http://www.sharewareplaza.com/DIVA-download_72082.html

My mockup:

http://lolosav.free.fr/tmp/mockup_1.jpg

In the theater, I can turn around and see all existing tables of the schema. The mouse
pointer could display the table name when it is over a table. With a mouse click, I can
select a table and a zoom can then display table information (the famous text).

And I'll surely add a quick search by table name.

It should be better since less text would be displayed at a time.

Comments appreciated.

Regards,
NG


By the way, I don't think ortho could help me here.

If you need to be able to rotate the planes on which the text is written then 2D text is no good, you would have to render it to a texture or use 3D text.



3D text seems like a very cumbersome option for an app with complex text layouts such as this.



A possible approach:



Base the view on textured quads.

Use the fact that you can't relistically read the data from most tables as they are underneath others and/or at an angle. You just get a feel for some general information such as its relative position and if there are a lot of fields or just a couple.

  • Have a pool of quads representing the currently visible section of the database.
  • Have a set of generic textures for tables that are not in a readable position - eg. generic small table, medium and complex.
  • Have a small pool of textures for the quads currently in the foreground. These will accurately represent the data for the table that this quad represents. They could be rendered using Java2D, and updated using something like this whenever a different table comes into position.
  • Write a simple controller to swop the textures between generic and accurate as things move in and out of the foreground.



    This should give you good visible quality and flexibility while not using up to much memory or getting over complicated. You could do it using minimal geometry and probably 10 small-ish textures.

    It also avoids entagling your data with your view.

3D test is the absolute worst option if you need to display lots of text on the screen. I would go with simple quad-based text like the AngelCode BitmapText available in jME2.