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.
IndexProgramming Questions & HelpSyntax Questions › rough edges (stroke) 3d shapes
Page Index Toggle Pages: 1
rough edges (stroke) 3d shapes (Read 664 times)
rough edges (stroke) 3d shapes
Jul 16th, 2007, 2:42pm
 
hi all,

When i let a box rotate or make it move, the edges (the stroke) appear very rough and sometimes even flicker.

int t;

void setup() {
 size(360, 360, P3D);
}

void draw() {
 background(200);
 t = (t+1) % 360;
 pushMatrix();
 translate(180, 180, 0);
 rotateY(radians(t));
 rotateX(radians(t));
 box(50);
 popMatrix();
}

smooth() in OPENGL mode helps a little but still doesn't work for me.

How can i solve this?

/BEnm


Re: rough edges (stroke) 3d shapes
Reply #1 - Jul 16th, 2007, 6:45pm
 
you might need to set a higher line width for the lines for the flicker or set the antialiasing on yourself. for my experience smooth() does not work. you would need to set it up manually.

watz compiled a lib that enabled the opengl option.
you might want to use that, or do it yourself in your code:

watz jar:
http://workshop.evolutionzone.com/tag/opengl
Re: rough edges (stroke) 3d shapes
Reply #2 - Jul 16th, 2007, 10:41pm
 
See http://dev.processing.org/bugs/show_bug.cgi?id=580 , this bug is the main source of the problem here (though some of it is also the aliasing) and so far there's no real solution.  strokeWeight() doesn't do anything right now in P3D, but in OpenGL if you go to strokeWeight(2) the results are a bit better.
Page Index Toggle Pages: 1