We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
ControlP5 text (Read 1979 times)
ControlP5 text
Mar 2nd, 2009, 8:35am
 
Hi !
I'm working with ControlP5 in a P3D environment. However I run into the issue of the text that is not displayed well, as it's pixelated and the top doesn't appear. I used a work around with the interfascia library : setting textmode to SCREEN does the trick and displays the text well. I suppose this doesn't work because the font is in vectors in control P5 or something like that. Does someone know a wait to set the font as a normal font, or any other way to be able to use controlP5 in a P3D scene ?
Thanks a lot (besides that ControlP5 rocks)
Re: ControlP5 text
Reply #1 - Mar 2nd, 2009, 10:33am
 
so far this remains problematic. can you use a controlWindow to use your controllers?

(fonts in controlP5 are pixel based and are written into a PImage when displyed. i did not find a way around the smoothing in P3D mode, if you find one, please let me know.)
best,
andreas
Re: ControlP5 text
Reply #2 - Mar 2nd, 2009, 9:28pm
 
Hum... why don't we simply put some text, setting the textMode to SCREEN like I mentioned ? The results are pretty good even if we want to display it in 2D inside a P3D sketch. I would like to show you the application I work on to give you an idea of the rendering, but it throws a classnotfound exception http://wanegain.1s.fr/applet/index.html (at least for me). Anyway it mixes 3D and 2D. So far it uses interfascia for the 2D elements and processing basic text for the 3D texts. Let me know if this interests you.
Re: ControlP5 text
Reply #3 - Mar 3rd, 2009, 6:34am
 
Ok it works now. You can take a look it case the source interrests you for the font...
Re: ControlP5 text
Reply #4 - Mar 3rd, 2009, 12:44pm
 
hi, thanks for the update. textMode(SCREEN) does increase the font rendering in processing when using P3D, controlP5 though is not using PFont to render text, instead a pixel font renderer is used to write single pixels into a PImage to draw text onto the screen. the unwanted smoothing of the text rendering might origin from the rendering of a PImage in P3d mode, i didnt take a closer look into the rendering of P3D yet so i am guessing based on reproducing the effect when loading this pixelfont texture as a PImage into a P3D sketch. will investigate this a bit further in the near future, but if you have any hints regarding the rendering of PImage in P3D, please let me know.

 
Re: ControlP5 text
Reply #5 - May 20th, 2010, 3:36pm
 
hi wanegain, i'm having the exact same problem. could you please post me the code for doing the workaround? thanks!
Page Index Toggle Pages: 1