jit.world no longer rendering sphere

    Jitterbeginnerbugs/issues

    Kieran Kehoe
    May 29 2023 | 11:09 pm
    Can anyone tell me why my jit.render is no longer rendering a sphere as it was before. This is an edit on a delicious max tutorial that was working perfectly. Im unsure what ive done but its no longer rendering. Apologies for the messy code. Thanks for any help!
    shader-tutorial-03.maxpat
    maxpat 222.51 KB

    • Matteo Marson's icon
      Matteo Marson
      May 30 2023 | 7:55 am
      Hi Kieran, The problem with your patch is that there's no object drawing the sphere. You're using a jit.gl.gridshape (that should draw it), but with the attribute @matrixoutput 2; this makes jit.gl.gridshape stop drawing the sphere and output the geometry as a matrix. This technique is used to apply further manipulation to the geometry. The matrix then is plugged into a zl object, which implements many different functions, but 3D rendering is not one of them. Look at this edit of the patch:
      Max Patcher
      In Max, select New From Clipboard.
      Show Text
      I plugged the matrix into a jit.gl.mesh object that draws the sphere again. I also attached a jit.gl.pbr object to shade the mesh.
      Share
    • Kieran Kehoe's icon
      Kieran Kehoe's icon
      Kieran Kehoe
      May 31 2023 | 1:11 pm
      Thanks a lot!! I knew it would be something simple. Unfortunately as I am running max 7 at the moment the jit.gl.pbr object didnt work but this has resolved my issue and got me back to a point where I can work forward from! Thanks!
    • Matteo Marson's icon
      Matteo Marson's icon
      Matteo Marson
      May 31 2023 | 2:23 pm
      Great to hear it worked! If jit.gl.pbr isn't available, switch to jit.gl.material; it will do the job
    • Kieran Kehoe's icon
      Kieran Kehoe's icon
      Kieran Kehoe
      May 31 2023 | 4:58 pm
      Wow, crazy fx. One last question. Where is this rendering to? i want to make it fullscreen for projecting and also get rid of the bar at the top with the minimize and x.
    • Matteo Marson's icon
      Matteo Marson's icon
      Matteo Marson
      Jun 01 2023 | 4:35 pm
      To answer your first question, the scene is rendered to a texture via the object jit.gl.node. Try to connect it to a jit.pwindow object, and you'll see the rendered image. Then, the texture (after further manipulation) is plugged into a jit.gl.videoplane, that displays it on screen (inside the jit.world window). I'd suggest checking out the help files of these objects to understand better how they work To make the window fullscreen, you have three possibilities: 1) click on the window and then press "ESC" to enter and exit fullscreen mode 2) send to jit.world the message "fullscreen 1", to enter full screen and "fullscreen 0" to exit. 3) set manually the attributes of jit.world, in particular - "border 0" to remove the top bar - "floating 1", to keep the window always on top - "rect x0 y0 x1 y1" to decide the extent and positioning of the window; x0 y0 is the position (in pixels) of the top-left corner of the window, and x1 y1 s the position of the bottom-right one
    • luvulongtime's icon
      luvulongtime's icon
      luvulongtime
      Jun 01 2023 | 4:40 pm
      "1) click on the window and then press "ESC" to enter and exit fullscreen mode"
      No way, when was this implemented? No more key into sel32 into toggle into fullsreen$1!
    • Kieran Kehoe's icon
      Kieran Kehoe's icon
      Kieran Kehoe
      Jun 02 2023 | 1:46 pm
      Mucho gracias, I'm understanding more and more each day. Thanks again.