Bug 1550 : when eye and center of camera get too close, then filled shapes are not drawn.
Last modified: 2010-04-21 15:15




Status:
RESOLVED
Resolution:
DUPLICATE of bug 1393
Priority:
P2
Severity:
normal

 

Reporter:
Jean Pierre
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2010-04-17 14:08
When eye and center of camera get too close, then filled shapes are not drawn.

In processing v.1.1 all P3D proscene examples
(http://code.google.com/p/proscene/) draws nothing but a black screen,
while in OPENGL mode everything is drawn ok. In processing v.1.0.9 both
renderers worked just fine. Everything was tested under Ubuntu-9.10
(amd64), with sun-java (build 1.6.0_15-b03).

The following sketch (provided by Andres Colubri) reproduces the issue:

// P3D bug: when eye and center of camera get too close, then
// filled shapes are not drawn.

float eyeZ = 2.6131258;
float centerY = 1.6131258;

void setup() {
size(400, 400, P3D);

stroke(255);

// When noFill is used, then the quad is still drawn.
//noFill();
}

void draw() {
background(0);

// When d is less than 3, the filled quad dissapears,
// including the edges.
float d = map(mouseX, 0, width, 1, 5);
println(d);
camera(0, 0, d * eyeZ,
0, 0, centerY,
0, 1, 0);
rect(-1, -1, 2, 2);
}
Additional Comment #1 From fry 2010-04-21 15:15
clipping in P3D is not yet implemented:
http://dev.processing.org/bugs/show_bug.cgi?id=1393

right now there's a hack that makes it work sometimes, but it's not great.
for 1.0.9, the hack was removed because it looked like it was causing more
problems than not, but it made an even bigger mess, so it was re-enabled
for 1.1.

*** This bug has been marked as a duplicate of 1393 ***