Forums > Jitter

need some help with generating geometry matrix

June 13, 2012 | 11:44 pm

hi!
i am trying to create simple cube by sending geometry matrix to jit.gl.mesh. i have read a lot about geometry matrices, verticles and stuff like that but still cant find the clue. i rid that when drawing objects using draw_mode tri_grid the verticles are connected either to neighbor from the same plane and the other plane.
i thought that i will create rectangle of verticles with constant z value 1 in the first dim, and then just copy values, changing z to -1 into the second dimmension. the result is something like unfinished, open cube.
so my questions are:

-why would we even need 2 dimmension matrices for geometry?
-why the smallest dimmensions to draw the cube correctly is "dim 8 8"? isnt 64 points for creating simple shape quite lot?
-in my patch under "matrix data from jit.gl.gridshape" comment there are jit.cellblock. why a lot of values are repeated?
- what for there are two verticles in the middle of two sides?

thanks for advice!
adam

– Pasted Max Patch, click to expand. –

`


June 14, 2012 | 9:30 pm

up up >)


June 15, 2012 | 11:14 am

Hi,
I can't really help you
but maybe this image can do.

[attachment=196670,4042]

Attachments:
  1. GeometricPrimitiveTypes.gif

June 17, 2012 | 11:25 pm

thanks, thats really helpfull. however i have got no idea how to understand the format of the matrix esspecially when it comes to draw_mode: quad_grid and tri_grid and multidimmensional arrays…

jitter "appendix b: the opengl matrix format" says that

"quad_grid: If the geometry matrix has two dimensions, quadrilaterals are drawn which link each vertex to its neighbors in the matrix to form a surface. "

but it has nothing to do with matrixoutput of gridshape – that couldnt be for example 16 X 2 dim…
is there any tutorial, or helpfile that i am missing, dealing with geometry matrices?


Viewing 4 posts - 1 through 4 (of 4 total)