lichtungsgnarr / controlp5

Automatically exported from code.google.com/p/controlp5
0 stars 0 forks source link

Artifacts and blur with high smooth() levels under P2D/P3D #81

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Let me just start by saying once more thanks for all your great work with the 
ControlP5 library. Now here it comes... ;-)

When using the P2D or P3D renderers in Processing 2.0 there are artifacts in 
the ControlP5 gui elements. At higher smooth() settings the text labels become 
blurry. This is possibly due to anti-aliasing blur.

What steps will reproduce the problem?
1. Take any ControlP5 sketch.
2. Set the renderer to P2D or P3D (in Processing 2.0)
3. Set the smooth() level to something high.

===========[START CODE EXAMPLE]===========

import controlP5.*;
ControlP5 cp5;

void setup() {
  size(500, 300, P2D);
  // smoothing causes artifacts, higher smoothing blurs the text
  smooth(8);
  // noSmooth(); // without smoothing there are no artifacts 
  cp5 = new ControlP5(this);
  cp5.addButton("b1");
  cp5.addButton("b2");
  cp5.addButton("b3");
  cp5.addButton("b4").linebreak();
  cp5.addSlider("s1");
  cp5.addSlider("s2");
  cp5.addSlider("s3").linebreak();
  cp5.addButton("b6");
  cp5.addButton("b7");
  cp5.addNumberbox("n1");
  cp5.addNumberbox("n2");
}

void draw() {
  background(255);
}

===========[END CODE EXAMPLE]===========

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
ControlP5 2.0.4 with Processing 2.0.1 under Windows.

Please provide any additional information below.
I have made a post about this on the Processing forum where I go over all the 
possible solutions. I have a hacky workaround, but in my opinion the best 
solution to end this once and for all (because there were similar discussion in 
the past with 1.5.1) is to add an option to draw controlP5 to a designated 
PGraphics.

For more information see this thread:
https://forum.processing.org/topic/controlp5-and-processing-2-0-p2d-p3d-renderer
s

Original issue reported on code.google.com by amnonp5@gmail.com on 11 Jul 2013 at 9:32

GoogleCodeExporter commented 9 years ago
I have also filed a related issue on Processing github issue list.

See: https://github.com/processing/processing/issues/1964

Original comment by amnonp5@gmail.com on 11 Jul 2013 at 10:04

GoogleCodeExporter commented 9 years ago
Most of these problems are caused by the Processing renderer, so I have filed 
another issue on Processing's github issue list concerning text rendering in 
the P2D renderer.

See: https://github.com/processing/processing/issues/1972

Still hoping for a controlP5.draw(PGraphics) method. :-)

Original comment by amnonp5@gmail.com on 12 Jul 2013 at 5:06

GoogleCodeExporter commented 9 years ago
I can confirm the blurriness and I concur with your processing renderer 
observations. I have considered to replace the PApplet argument with PGraphics 
to directly draw into a PGraphics element and will reopen the case.

Original comment by soj...@gmail.com on 17 Jul 2013 at 8:25