OpenGL Terminology in Jitter

From WikiName
Jump to: navigation, search

below text taken from the following forum thread
https://cycling74.com/forums/topic/how-to-use-jit-expr-to-arrange-many-little-spheres-into-a-big-spherical-array?/

Basically there is normal jitter CPU and there is GL Jitter GPU. <– you knew that though. Sorta ‘s like how Max and MSP are different. when using a matrix to built geometry, each plane talks to a specific angle . plane 0 talks to x angle , plane 1 = y angle , plane 2 = z angle. So there are vertices, edges . textures , normal <–lights etc…

Lingo in a nutshell
an array is another way to say matrix and specific point (coord) in this 3d world matrix would be a vector.
DATA :

  • normal regular older Jitter. Data is in char values (0-255). Color and plane order = argb <–plane 0 1 2 3
  • 3d GPU (gl) Jitter Data is in float32 values (0.-1.) and the color order == rgba <–plane 0 1 2 3.

Jitter 3D (GPU), there 2 ways to play with DATA.

  • 3D geometry and plane <– Basically where the camera can move around
  • 2D pixels<– GLSL and shaders. The magnificient jit.gl.pix is a way of cheating where you don’t have to learn GLSL. It’s a nodal GLSL if you will.

3D and 2D gl are 2 completely different ways to play the game.
2d plane 0 1 2 3 talk to colors rgba AND 3D plane 0 1 2 <– talk to vertex positionnig.

Gen
jit.gen <– is a fast version of jit.op <– you use it to do math.
jit.gl.pix : is for 2d pixel playing on the GPU.
Important : when using gen <– the amount of planes going in must be the same as the amount of planes going out.

Using jit.gl.mesh
See it like you have a smashed up piece of paper/plane that you have to unfold, i.e. you unfold for the shape / unfold for the texture / the light and shadows/ the colors. Cheating with jit.gl.gridshape @matrixoutput 1 to jit.gl.mesh. <– by doing this move , you don’t have to do the math in gen.
here is an example of what I mean. <maxpat>


begin_max5_patcher----------

2157.3oc6Zk0iaaCD9Yu+JHzKsEXigH0cAJv19V9MDTXPKQayr5vPhZORP6u 8NjTRVxVxVV9nMEaBhrDOm4aN4v78GlYrL6MVgA5WQeAMa12eX1LUSxFlU88 LiD5agwzB0vLByRRXoBiG08IXuITsWvhYgBz1r32WjjEwPD3uhLTAigDaXnW X4vXg946lbLOkElUlpVAqpF4Qp0Ka4W+DwodjKKW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+ ER6QawX6hwlJ5xNf3Zq7i4DfAR615NXr1eqJSCE7QkIy4D+aJX5HSopRmMvw TmL0cHAwo3XsDnfx9YlOBJeaBJedmBqRroWppKGPQ2cq6g9tB1udGU2XvA04 fzo.FCTjCqNi4fBbbXwMN3pKFK4H+OowIIG4kkeunm+agNdiAc7uazi6HHG6 6F0LFUGxciZHiQTMQpQa0u2scIIj8tkq8tgqCucqguYq8uUKkaq8pMoFPNVM I6d36u+vzNX3zOv83Rwnxkb2yHUQriJghKI98jJtSME2ICj9n3QVLmIk.QMQ zeTrtQvZaAc7ZG9gJyGpLJmc8pxbXM99wReoSc7lLwNkZ2USAcqY2EPBGbjf 5+2YL3QAl3w.l1Q.lV5+8m5+vo8OPJ+04neKbRLE0xyz77vZrcVT8YYQzodZ WL3LxppLkS+WSvOeBfY35kM4pRUu0sqQ1.a7wqM1ESAcpG1OBRqSpEOx5cc0 LEOk8vd02Z5FdmGNchzBNdMrtpIybNNpZWypu+QfoyMvz3xbGf7+5g+gC6bO A


end_max5_patcher-----------

</maxpat>

Taken from appendix B in the Jitter Documentation
Matrices with anywhere from two to 13 planes can be used. Planes 13 and up are reserved for later use and will currently be ignored. Each plane represents a different value in one of five groups: vertices, texture coordinates, normals, vertex color and edges. If enough planes are present to specify a given group, that group is used in rendering the matrix. To be used, each group must be totally present, with the exception of vertices. If only x and y values for vertices are present, the z coordinate of all vertices is set to 0, and an 2D image on the xy plane results.

  • plane 0: x coordinate of vertex
  • plane 1: y coordinate of vertex
  • plane 2: z coordinate of vertex
  • plane 3: s coordinate of texture at vertex, if textured
  • plane 4: t coordinate of texture at vertex, if textured
  • plane 5: x component of lighting normal at vertex
  • plane 6: y component of lighting normal at vertex
  • plane 7: z component of lighting normal at vertex
  • plane 8: red component of vertex color
  • plane 9: green component of vertex color
  • plane 10: blue component of vertex color
  • plane 11: alpha component of vertex co* r
  • plane 12: edge flag for connection to next vertex: if < 0, no line is drawn.