FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Bug Fixes, Implemented Suggestions
(Moderator: fry)
   rotating text in 3D is narsty
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: rotating text in 3D is narsty  (Read 711 times)
senior

89237688923768 WWW
rotating text in 3D is narsty
« on: Sep 28th, 2003, 6:10am »

When rotating some text around in 3-space, if the window size is too small it results in some very strange clipping (and other artifacts).
 
Code:
float mx = 5.0;
BFont fontA;
 
void setup()
{
  size(512,512); //try setting to size(512,100) to see bug
  background(255);
  fontA = loadFont("Meta.vlw.gz");
  textFont(fontA, 48);
  textMode(ALIGN_CENTER);
  framerate(24);
}
 
void loop()
{
  background(255);
  translate(width/2, height/2, -50);
 
  fill(218,165,32);
  mx = mx+0.05f;
  rotateY(mx);
  text("this is my lovely text.",0,0);
}

 
Also, there seems to be some crustiness around the text when it rotates around to the backface; I don't think this occurred in earlier versions.
 
using v.0063, java 1.4.1 winXP
 
fry


WWW
Re: rotating text in 3D is narsty
« Reply #1 on: Sep 29th, 2003, 9:07pm »

yup, this is the same as the 3rd bug in the 'known bugs' list:
http://proce55ing.net/download/bugs.txt
 
senior

89237688923768 WWW
Re: rotating text in 3D is narsty
« Reply #2 on: Sep 30th, 2003, 12:10am »

ah, nice!
and the crusty text?
 
arielm

WWW
Re: rotating text in 3D is narsty
« Reply #3 on: Sep 30th, 2003, 12:32am »

ben,
 
i'm seconding senior on the "crusty text" issue:
 
if you compare typography/helix between, say, 063 and 056, it's obvious that there is a problem.
 
i guess it's due to the fact that BFont is not using image() anymore and deals with polygons directly.
 
on the other hand, all this could disappear soon when the new graphics engine is enabled (will make a test on it soon...)
 

Ariel Malka | www.chronotext.org
fry


WWW
Re: rotating text in 3D is narsty
« Reply #4 on: Sep 30th, 2003, 2:27am »

yipes, you're right.. that looks awful.
 
i'll look into it. sadly, there are about four lines of code that control some of this stuff and they've had way way too many bugs (i.e. all those ArrayIndexOutOfBoundsExceptions in older versions of the environment).  
 
text in the new engine is much worse, which is part of what's holding up the new engine.
 
arielm

WWW
Re: rotating text in 3D is narsty
« Reply #5 on: Sep 30th, 2003, 2:40am »

on Sep 30th, 2003, 2:27am, fry wrote:
text in the new engine is much worse, which is part of what's holding up the new engine.

is it related to the fact that the new engine is even more "doom-era perspective algorithm"ish than before
 

Ariel Malka | www.chronotext.org
fry


WWW
Re: rotating text in 3D is narsty
« Reply #6 on: Sep 30th, 2003, 2:56am »

on Sep 30th, 2003, 2:40am, arielm wrote:

is it related to the fact that the new engine is even more "doom-era perspective algorithm"ish than before

partly
 
sami sacrificed quality for the sake of speed in the new engine, and we just need to calibrate it back towards where the quality thing is acceptable enough. the doom-era perspective is an artifact of quality vs. speed too.. since it's leaving out transforming between world/screen space to ensure proper perspective.
 
at any rate, i'm looking into it now, and will hopefully have a fix shortly. the change happened between 59 and 60, prolly, when i made lots of engine changes.
 
fry


WWW
Re: rotating text in 3D is narsty
« Reply #7 on: Sep 30th, 2003, 6:08am »

update.. i've found the problem. the difference is between using smooth() and hint(SMOOTH_IMAGES). there's a bug that makes textures look crappy with smooth() (meaning that the polygons themselves are smooth as well as the images) versus just the old style with SMOOTH_IMAGES enabled (where the polygons are not smoothed, but the images are). from 60 onward, smooth() is enabled internally while text is being drawn.
 
i may just re-enable something like SMOOTH_IMAGES internally to get things back to their pre-0060 state, and do a release 65 to get folks on the road to recovery, then i can go back and fix the real bug with textures and smooth().
 
arielm

WWW
Re: rotating text in 3D is narsty
« Reply #8 on: Sep 30th, 2003, 10:04am »

i've been playing a lot with texture mapping, quads and text, and here is my experience:
 
i think it's important to have an option to enable/disable smoothing for text, since sometimes, smoothing is not required and the gain in speed is then significant...
 
also, the old way of having hint(SMOOTH_IMAGES) and smooth() separated was nice, because here again, one may need to have smoothed texture mapping without having the edges of the polygons smoothed (very slow on my old PIII...)
 
i know that having 3 different hints for smoothing (text, images, polygons) could be a bit confusing for beginners, but it makes the whole thing much more flexible.
 

Ariel Malka | www.chronotext.org
fry


WWW
Re: rotating text in 3D is narsty
« Reply #9 on: Sep 30th, 2003, 8:15pm »

yeah, i'm not sure what to do about this just yet.. we'll have to see how well we can improve speed and see how much of an issue it is. i forgot how slow that code was.  
 
for the time being, rev 65 will enable something like SMOOTH_IMAGES by default, and if you want to disable that, then you can use hint(DISABLE_TEXT_SMOOTH)
 
i strongly dislike having many different smoothing types, that's one of the more annoying things in java2d (or even opengl) so i'm trying to figure out how to best do defaults vs. things that need to be exposed in the api, vs. things that are advanced/esoteric features to expose via hint() and unhint().
 
Pages: 1 

« Previous topic | Next topic »