
Getting text to be clear is an obvious problem for people when using Papervision, as it pops up on the list in a new thread every week or so. I’ve had this demo for a while now, but between work, writing, and trying to find a life outside my computer, I haven’t taken the the time to post the source or explain how you can easily clear up your text.
In this demo, I take a couple parameters into account, to see how they affect text clarity:
- Smoothing : If the material uses smoothing or not
- Transparency : If the material is transparent
- Anti-Aliasing : Normal or Advanced aliasing on the text field.
- Bitmap Caching : Set the cacheAsBitmap property or not
- Size : How large the text field (and parent movieclip) is
Taking these things into account, you can see in the demo above what really makes the difference. The most obvious: SIZE. Use bigger textfields! This will get you the clearest text no matter what. The difference is quite obvious between the 100 and 300 pixel textfields. I personally can’t see much change from 300 to 500, but I might be overlooking something. Remember that size is a trade off with papervision: the larger your movieclip, the longer it takes to render. Try to find the perfect balance of size (quality) and speed for your application.
Smoothing makes a significant difference. If you want to clean up your text, turn on smoothing. The sister parameter to smoothing should always be tiled, to prevent any lockups at high angles.
Transparency helps remove artifacts from the textfield. I’m not sure what actually causes the faces to show through with dynamic text, but transparency removes them. For better performance however, set cacheAsBitmap to true - as this will also remove the artifacts, but not add additional overhead during rendering. An interesting observation: these artifacts also disappear if you add any other content to the stage - I imagine things are cached to deal with other display objects. So a possible workaround for both transparency and cacheAsBitmap is to simply add a little invisible clip onto the stage.
Anti-Aliasing seemed to do absolutely nothing. Set it to advanced if you feel like it, but unless I’m blind I don’t see any advantage to having it on.
And thats about it! Hope it helps some of you with your text field woes.
30 Comments, Comment or Ping
Thanks for the demo, I had seen your preview-demo on the mailing list and sat down to try to figure out everything I needed to do. It’s still nice to see your coding style. I seem to have trouble when adding a text field to a movieclip and then using MovieMaterial, it would give me an error saying “Error #2015: Invalid BitmapData.” While I am using flashdevelop
I’m not sure what I was doing wrong but I ended up just creating a new BitmapData var and using draw method to draw the text field into a bitmap and then add that new bitmap to a movieclip.
March 11th, 2008
On a 1440 x 900 winxp 300×300 seems sharper than 500×500 which looks very slightly blurred both on medium and high quality.
It all depends on the movie size I suppose … which would mean that there is no single right decision if you are using fullscreen.
March 11th, 2008
Great example, Thanks!
March 11th, 2008
Very handy, thanks!
March 11th, 2008
And what about cpu use ?
I know that we just can’t smooth a bmp if we want the animation to run properly. It certainly do not take as many ressources to smooth text, but I think some people chose not to smooth it because of that problem.
March 13th, 2008
I think it’s a great example and i have learned how to manage different alternatives…Thanks
March 30th, 2008
how can we add diferent text on both side of the plane. can we manipulate it at runtime like changing it etc
May 12th, 2008
How use input text field in MovieMaterial ? I’ d like to make a form on a cube and text fields does not work. Thanks for advice.
May 26th, 2008
hi!
at the moment i’ve several doubts about pv3d as i’m trying to learn how to use it. i’m looking for text based aplications made with pv3d. this seams to be a good start.
Really can’t figure out why you are using wow engine in this example… could you explain it?
thanks
am
June 3rd, 2008
It would be great to know how to make a text input component work on MovieMaterial or even if it’s possible!? Thanks
June 6th, 2008
Nice Blog. Keep it up man.
http://www.hardwareforce.com
July 12th, 2008
Hi, I was wondering whether you would be able to add TextInputs in Plane. This example works as an Actionscript project in Flex but doesnt work if I do the same thing in an MXML application with a TextArea or a TextField. Can anyone please help?
July 14th, 2008
Fine
August 24th, 2008
Hallo, where i get this code from this script. can every one tell me?
October 21st, 2008
nice. so how bout small text? not so much? i gotta use size 58?
October 27th, 2008
I found one more important factor that affects smoothness of texts in 3D. The width and the height of the clip that you’re using to make the material for the plane should be rounded to whole numbers - having dimensions like 300.4×200.1 will guaranty you headaches when trying to make 3D Texts really smooth.
November 7th, 2008
Thanks for this great example! Does it make any difference whether the text field is:
1) scaled up when nested in a movieclip?
2) scaled up by scaling the TF itself?
3) scaled large “natively,” meaning you have to use larger font sizes?
Has anyone tested these conditions?
March 10th, 2009
Also, is setting the textfield property to advanced anti alias the same thing as setting the AA property in the textfield property in Flash to “Anti alias for readability”?
March 10th, 2009
Thanks man!
May 29th, 2009
Awesome post! Helped me a lot. Thank you.
June 23rd, 2009
how can i use the TextDemo.as to see this example? should i import it? i am new to papervision please guys guide through
November 11th, 2009
Reply to “Text in Papervision3D - Clearing things up”