Distorted lines with Projected Quads

Hi everyone,

I'm trying to work with ProjectedQuads for projection mapping, however, it seems to be distorting lines and shapes drawn on the quad.

Any way to fix this? sq


  • We lack a bit of context, I fear, unless the question targets only the people knowing what is ProjectedQuads (a library? If so, the question is not in the right section, but we can move it).

  • Hi PhilLho.

    Sorry for the vague approach. ProjectedQuads is a not yet a library, but just a collections of classes which aid in projection mapping (hence not being in the library section). Feel free to suggest a more appropriate section.


  • so is the white line part of the texture for the quad or drawn afterwards? (and if so how?)

    and is the quad rectangular and planar? because that looks a lot like the top left point is above the plane of the other three points

    i'm also thinking, perhaps, integer division problem, because of the steps in the slope of the line. but without seeing the code...

  • edited October 2013

    It is drawn on afterwards, as shown below:

    void setup()
      size(displayWidth-50, displayHeight-50, P3D);
      projectedQuads = new ProjectedQuads();  
      projectedQuads.setNumQuads(1);  //set number of quads
      q = createGraphics(2400, 600,P3D); //
      projectedQuads.getQuad(0).setTexture(q);   //loading the texture to quad
      //remember 'S' to save 'L' to load
    void draw()
      background(0); //make the background black
      q.beginDraw(); //begin drawing on the quad
      q.endDraw(); //end drawing on the quad

    The above code produces the following:


  • Apologies for the ill-formatted code above, I'm not sure why it came out like that :-?

  • where's q defined? what's in configFile?

  • q is defined earlier up (not shown above) and is of type PGraphics.

    The config file is a file containing vertices of the quad, so that you can save the current layout of the quad(s) and use them again later.

  • gah! we can't run the code to reproduce the error without the values in the config file. and without being able to run the code we are just guessing... we are good at guessing, but not that good.

Sign In or Register to comment.