500 words with jit.gl.text3d

Sep 17, 2009 at 12:13pm

500 words with jit.gl.text3d


i would like to display 500 different words, in 500 different places, using jit.gl.text3d. Then, i would like to be able to navigate in these words with the camera.

I’ve tried using 500 different jit.gl.text3d, and i’ve tried using just one jit.gl.text3d (for the 500 words and positions). With the 2 solutions, I’ve a huge drop in fps.

Would you have any idea ?

Thank you !!!

Sep 18, 2009 at 6:30am

add patch?

tried it with jit.gl.model?
or jit.gl.multiple

Sep 18, 2009 at 10:16am

Thank you for your answer.

Here is a patch that illustrate what i try to do…

Sep 18, 2009 at 10:18am

To use it, you need this .jxf patch to fill a matrix with the 10 words and the 10 coordinates.

jit.gl.multiple seem to do the trick, but how can I use it to display 500 different words ?

Thank you !!!

Sep 19, 2009 at 11:22am

Anybody know how to, with this patch, display 500 different words without using 500 jit.gl.text3d ?

Sep 19, 2009 at 11:58am

You have many possibilities.
Yes [jit.gl.multiple] is one.
Here is a start.

– Pasted Max Patch, click to expand. –
Sep 19, 2009 at 3:52pm

Thank you very much for your patch. I’ve learnt a lot with it.

Unfortunately, if I have understand well, jit.gl.multiple allow me to reproduce a texture (named zzz in your patch), in different locations.

In this way, each texture has the same word. How can I do to display 500 different words in 500 different location ? Thank you !

Sep 19, 2009 at 5:51pm

did you try to poly~lize your patch?
1023 instance should do the work??
But however it’s going to be heavy duty for the processor i think
look on the forum there was a patch using poly~ and jit.qt.movie
and apply it to your needs

Sep 20, 2009 at 3:53pm

Hello maxers,

Problem with 500 x [jit.gl.text3d] is CPU cost to draw them (about 50% of my white macbook) ; maybe a way is to not draw all of them (have a look to automatic attribute) but just few you really need to (euclidian distance from the camera for exemple).

I post here a quick_made exemple done with javascript, should do the same with [poly~], but i prefer javascript…


Sep 21, 2009 at 9:52am

Hello maxers,

or something like that…

Sep 21, 2009 at 11:07am

Thank you so much for all those answers !
Your patches are great Vanille B. ! It gives me a lot of idea for futur work!!
But I would like to see the 500 words at the same time. (They will come closer to the camera in time.)
So I’ve tried poly~
Here is my patch:

Sep 21, 2009 at 11:08am

jxf file:

Sep 21, 2009 at 11:10am

And the patcher for poly.

On my macbookpro (2.8ghz), I have around 50% of cpu load, and only 5 fps.

Is there a way to do better ?

Thank you !

Sep 21, 2009 at 3:29pm

Only thing i can add is that i don’t think jit.gl.text3d is the right object to do this. No matter how you use it (js or not), it’s too heavy.

I tried to draw 500 words using 1 text3d and a couple colls. Then I removed the colls to see if the coll lookup time would matter, and it does, but not nearly enough to make those 500 words happen. I only get about 5 fps too on my MacPro.

Loading 500 small textures with text and drawing those would probably be a better option than this. Or load a bigger texture and use tex_offset and tex_scale to show parts of it.

Anyway, here’s my try, don’t know if it’s of any use. GL!

– Pasted Max Patch, click to expand. –
Sep 21, 2009 at 11:30pm

My advice would be to create one or two big textures with all your words rendered into equal-sized chunks. From there you can use a variation of the TinyVideo jit.gl.mesh Recipe to render a bunch of quads with different texcoords. It’s definitely a more advanced approach than just a bunch of jit.gl.text3d objects, but you will get much greater efficiency with this method. In this patch I use jit.lcd to render the text into a larger matrix.

Andrew B.

– Pasted Max Patch, click to expand. –

You must be logged in to reply to this topic.