3D Font rendering issues on Android
in
Android Processing
•
1 year ago
Hello all,
I'm working on a free open-source game which has "Star Wars" style scrolling text, in 3D, on the Android. But it seems that when I render text in 3D mode, there are a lot of artifacts around each character, making the text look messy.
I've been able to reproduce the problem with the following code:
------
/* Code example */
PFont font;
void setup () {
size(800,400,P3D);
font = createFont("FFScala", 72, false);
}
void draw () {
background(0);
textFont(font, 72);
textAlign(CENTER);
fill(255);
text("This is some text",800/2, 400/2);
}
-------
The above code renders fine in Standard mode, but on the Android device it has small graphical glitches (I am on the Nexus S if that matters). It also renders perfectly on both devices in 2D mode, but of course I need 3D.
Does anyone know what might be causing this? Is text() not meant to be used in 3D? If so, perhaps there is some other way to render the text? I have been messing with loadFont and createFont as well as different font sizes and locations, but the problem seems to persist regardless. Any help is appreciated.
Thanks,
Jasonmtt.
I'm working on a free open-source game which has "Star Wars" style scrolling text, in 3D, on the Android. But it seems that when I render text in 3D mode, there are a lot of artifacts around each character, making the text look messy.
I've been able to reproduce the problem with the following code:
------
/* Code example */
PFont font;
void setup () {
size(800,400,P3D);
font = createFont("FFScala", 72, false);
}
void draw () {
background(0);
textFont(font, 72);
textAlign(CENTER);
fill(255);
text("This is some text",800/2, 400/2);
}
-------
The above code renders fine in Standard mode, but on the Android device it has small graphical glitches (I am on the Nexus S if that matters). It also renders perfectly on both devices in 2D mode, but of course I need 3D.
Does anyone know what might be causing this? Is text() not meant to be used in 3D? If so, perhaps there is some other way to render the text? I have been messing with loadFont and createFont as well as different font sizes and locations, but the problem seems to persist regardless. Any help is appreciated.
Thanks,
Jasonmtt.
1