jit.gl.multiple quad orientation


    May 12 2018 | 3:17 pm
    Hi, How to get the multiple quad being oriented not to the viewer but following the given shape. Here the global given shape is generated w/ the classic nurbs, little bump effect Is this at least possible w/ jitter?

    • May 12 2018 | 7:54 pm
      Hi Kired, what do you mean oriented following the given shape? The matrix is an array of vertices, there's no information about rotation. Toward what you would like to rotate them?
    • May 13 2018 | 10:16 am
      Of course you can rotate the quads, have a look Here the quads are shaped around a sphere The question is would it be possible to orient the quads flat around the sphere
    • May 14 2018 | 7:22 am
      Is this what you mean?
    • May 14 2018 | 9:46 am
      Yes great, many thx :)) lack of maths ... where can I find some theory?
    • May 14 2018 | 12:51 pm
      You can arrive to that with a bit of trigonometry. Basically you get the x and y from the equation of a sphere, then calculate the z rotation using the atan2 function that gives you the angle between a point in 2D and the x axis. For the y roation I went a bit with trial and error. I'm sure if you google "quad orientation sphere" or "plane tangent sphere" something will come out. Cheers!
    • May 15 2018 | 5:12 pm
      Great! thank you :) It would be nice to have a feature in Max allowing to orient the quads to the volume for all situation, for example:
    • May 16 2018 | 9:33 pm
      you can use the normals from the nurbs matrixouput as a direction vector. if you'd prefer not to calculate the math yourself, you can let jit.anim.node to it for you. simply iterate the normal matrix values, setting the @direction attribute of a non-automatic jit.anim.node, update the anim.node, query it's rotate values, and plug those into a matrix for jit.gl.multiple:
    • May 16 2018 | 9:55 pm
      This is fat!
    • May 17 2018 | 7:31 am
      oooooww! this is nice, thx.