jsui sketch "text-like" plane


    Apr 25 2021 | 9:15 am
    in jsui sketch using 3d mode text does not take into account world rotation transformations, you can still move it around and "rotate" it in space, but it will always face the viewer straight and not get scaled. (reminds me of old 3d games, pretty funny). I would like to create a small plane that would behave just like this, always facing the viewer. And in fact the first use for that would be to create a little tag/box around the text, to make sure it is always legible. Are there any jsui gurus over here that can help me in this quest?

    • Apr 27 2021 | 5:41 am
      bump
    • Apr 27 2021 | 2:30 pm
      i believe you just need to do something like the following pseudocode:
      pushmatrix
      loadidentity
      plane
      popmatrix
    • Apr 27 2021 | 7:52 pm
      Thanks @Rob,
      I'm having a hard time making it work. Once I've used glloadidentity(); nothing after that gets rendered anymore. :/
      it also seems that I can't really seem to be using the push and pop matrix effectivelly. Any world transformations between them seems to be affecting the rest of the scene.
    • Apr 27 2021 | 8:40 pm
      So, I just confirmed these with a simpler example: glclearcolor(1,1,1,1); glclear(); moveto(); glpushmatrix(); // glloadidentity(); moveto(-1,-1); glcolor(1,0,0,1); plane(0.2); glpopmatrix(); move(1,1); glcolor(0,1,0,1); plane(0.2); the scene should be a red square on bottom left corner and a green square on top right corner. Instead the transformation move(-1,-1); that is done between the push and pop matrix, will affect the starting position to draw the green square, and so it draws in the center of the screen. Also, using glloadidentity(); doesn't seem to help here, and when using it with sketch.default3d(); mode it seems to break any and all rendering of the elements that are declared after it. Would really appreciate your help understanding this, @Rob.
    • Apr 27 2021 | 9:25 pm
      full patch and script and i'll take a look.
      also, i'm not at all familiar with JSUI so hopefully someone with more experience can chime in as well.
    • Apr 28 2021 | 12:05 am
      Please see maxproj attached here:
      Thank you, @Rob
    • Apr 29 2021 | 2:12 pm
      cool, my apologies for the misinformation. unfortunately I don't have enough knowledge of JSUI practices to offer any more suggestions.