Jit.gl.mesh and gridshape question

    Dec 02 2012 | 9:41 pm
    Hi Guys I Currently have a jit.gl.gridshape object going into a jit.gl.mesh object. When you have it on points drawing mode you can see the individual points that it uses to make a sphere. I was wondering whether it is possible to get that list of data from the gridshape object so you can control or move each individual point to make a different shape?
    Thanks a lot

    • Dec 03 2012 | 8:28 am
      use the @matrixoutput attribute to get its vertex and other data as a matrix
    • Dec 03 2012 | 4:31 pm
      I have the @matrixoutput as 1 and i send it to the matrix but how could i retrieve each individual points information so i can move them individually? or am i not understanding your reply? sorry im quite new to jitter so i dont understand all a too much yet.
    • Dec 03 2012 | 4:36 pm
      Each cell of the matrix holds the data for one vertex so you can modify it with matrix or getcell/setcell operations. You have to get the planes right. If I remember correctly the first 3 planes are XYZ position.
    • Dec 04 2012 | 5:13 pm
      ok ive checked the planes and all that are correct by using the jit.fpsgui on the gridshape and then copying that data onto the matrix and i have the matrix going into the mesh and it all seems to be working perfectly. But i cant seem to edit the shape still or move the points? ive used the setcell and get cell similar to what they do in the help file for the matrix but still nothing? am i doing something wrong or is there something else i can do? im attempting to do something similar with the jitter recipes 31 https://cycling74.com/tutorials/jitter-recipes-book-3/ but instead of that have a sphere as the the starting shape. thanks a lot for you help by the way :)
    • Dec 04 2012 | 6:04 pm
      > am i doing something wrong or is there something else i can do?
      Surely but hard to say without seeing your patch... See https://cycling74.com/forums/welcome-to-the-cycling-74-forums-take-a-moment-to-read-these-instructions about posting patches on the forum.
    • Dec 04 2012 | 7:05 pm
      oh yer sorry heres a condensed version of what i was doing
    • Dec 04 2012 | 7:19 pm
      you need to disable automatic mode on the gl.gridshape (@automatic 0). you only want to send the matrix of vertices one time, to set the initial positions of the matrix. after that you can adjust the positions manually.
      your pack object should be taking floats as vals, not integers.
      after setting the cell, you also need to bang the matrix to output the modified matrix. trigger can accomplish this.
    • Dec 04 2012 | 7:23 pm
      What you did is correct but you ain't getting any visible result because the matrixoutput of gridshape instantly overwrites your manual settings. Here's a modified patch. First fire it up as you did, then disable the gate between gridshape and mesh, and set manual vertex positions. The other thing you forgot is to bang the edited matrix so it gets sent to mesh. I edited a couple more little things which I'll let you discover by yourself.
    • Dec 04 2012 | 7:27 pm
      While we're at it, here's a variation that should give you some ideas about how to go about this kind of thing:
    • Dec 04 2012 | 8:22 pm
      thank you so much they both help a lot it'll really make my patch a lot better :)
    • Dec 04 2012 | 10:22 pm
      wow! did parallel universes collide here? i swear there was no post by robert when i posted my replies :]