Apologies if this is an obvious question, but I can't work it out:
I've made a basic 3D scene, using PImage to render textures on the sides of simple cubes. That's all fine, but I'm using lots of shapes, many of which are very near each other. Sometimes when they get too near, they start to flicker. For an example, I've uploaded a test render to www.youtube.com/watch?v=N4j2i5LJIaU. You can see some of the flickering at, eg. 6:30.
So it's basically when two flat PImages are almost occupying the same space, they flicker. I've tried to make them always be a few pixels apart, but I still get a bit of flickering.
Any ideas would be welcomed. Thanks.
Here's the class I'm using for each cube:
class textBox{
int x, y, z, w, h;
String myTexture;
PImage myImage;
PImage myRoof;
textBox(int _x, int _y, int _z, int _w, int _h, PImage _myTexture){
x = _x;
y = _y;
z = _z;
w = _w;
h = _h;
myImage = _myTexture;
// The roof of every boz has the same texture
myRoof = loadImage( "skyscrapers/myRoof.jpg" );
}
void update(
int x, int y, int z, int w, int h, int d){
// Render boxos
// Top
pushMatrix();
translate( x, y, d );
image( myRoof, - (w /2 ), - (h /2 ), w, h);
popMatrix();
// Bottom: no need to render this, as it is never visible
// pushMatrix();
// translate( x, y, z );
// image(myImage, - (w /2 ), - (h /2 ), w, h);
// popMatrix();
// Side 1
pushMatrix();
translate( x - (w / 2) , y , 0);
rotateY(-PI / 2);
image(myImage, x, y - (h /2 ), d, h);
popMatrix();
// Side 2
pushMatrix();
translate( x + (w / 2) , y , 0);
rotateY(-PI / 2);
image(myImage, x, y - (h /2 ), d, h);
popMatrix();
// Side 3
pushMatrix();
translate( x , y - (h /2 ), 0);
rotateY(-PI / 2);
rotateX(-PI / 2);
image(myImage, x, y - (w /2 ), d, w);
popMatrix();
// Side 4
pushMatrix();
translate( x , y + (h /2 ), 0);
rotateY(-PI / 2);
rotateX(-PI / 2);
image(myImage, x, y - (w /2 ), d, w);
I'm using Eclipse to develop in Processing, but can't make Movie work. I've search forums far and wide for a solution.
The problem seems to be around QTJava; no matter what I do, the following error happens:
"java.lang.UnsatisfiedLinkError: no QTJava in java.library.path"
Solutions I've already investigated include:
- changing system variables (QTJAVA and CLASSPATH)
- trying to find a QTJava.dll that works (The only DLL with this name I can find seems to only work on a 32 bit system)
- setting QTJava's native source to the system Quicktime folder
One question you might be able to answer towards me finding a solution is: do I need to use QTJava.dll (which I can't find on a 64 bit system), or just QTJava.zip (which I do have, but doesn't seem to be findable)?
Any suggestions at all would be very much appreciated, as I've reached a bit of a cul-de-sac.
Thank you.