alpha and gl

    Oct 29 2012 | 2:17 pm
    Hello, I want to make a simple animation in jitter, and I have two questions about alpha in GL.
    1. In my patch I have a plane and ball under it. When I set alpha value of the plane to 0 it looks like the plane gets the background color and I can not see the ball throw the plane. Can anyone tell me how to fix that and why does this happen.
    2. How can I make a shape alpha on the plane like in a picture for example.
    please help me

    • Oct 29 2012 | 3:55 pm
      Think the problem was with the way you had the trigger for the renderer set up. If you are triggering one gl shape explicitly while the other draws automatically you could run into layering issues.
      This should help. To get a texture on a mesh you need to send it a texture array (example I pulled off the forum).
    • Oct 30 2012 | 7:54 am
      thanks a lot!!!! :)
    • Oct 30 2012 | 10:45 am
      :( ok, I looked at the gl.mesh refpages.. second inlet is for vertex, but I couldn't understand how this part works.
      Can you explain please.
    • Oct 30 2012 | 3:28 pm
      Okay this part is where i kind of fall on my face. I don't know how the vertex coordinate system works precisely but you can see what's happening in the following patch.
      Each cell has 2 planes and it's dim is 20 20 so I'm assuming that the vertex coordinates are as follows:
      Plane 0, cell 0 19 val 0
      Plane 1 cell 0 19 val 0
      Plane 0 cell 0 0 val 0
      Plane 1 cell 0 0 val 1
      Plane 0, cell 19 0 val 1
      Plane 1 cell 19 0 val 0
      Plane 0 cell 19 19 val 1
      Plane 1 cell 19 19 val 1
      Meaning from the bottom left clockwise you'll see (0,0;0,1;1,0;1,1) which are normalized corrdinates (but different than the standard jitter matrix which is usually represented as top-left, top-right, bottom-left, bottom-right.
      So jit.matrix sets up a matrix with 2 planes, each cell represents an X, Y coordinate of dimensions 20 x 20. Jit.expr normalizes values across X on plane 0 (which represents the X in each cell) using (norm[0]) and then normalizes and subtracts the value from 1. down the Y plane on plane 1 (which represents the Y in each cell) using (1. -norm[1]).
      But this is my educated guess based on what I'm seeing... I could be mistaken.
    • Oct 31 2012 | 4:11 pm
      Thanks, you save me!