jit.gen output to jit.gl.node?

    May 24 2016 | 6:16 pm
    I'm trying to glue some snippets of code together.
    I have a sphere being deformed according to audio input. This is a jit.gl.gridshape that has further processing done through jit.gen, and is originally going directly to a jit.gl.render with "quad_grid" appended to the output of jit.gen.
    However in the code I'm trying to glue this into, I need to find a way to draw this in the context of a jit.gl.node. Ordinarily I could use the gl.node name for the gl.gridshape object, but since it undergoes further processing with @matrixoutput 1 flag enabled, I'm not sure how to do it.
    Thanks for any help!

    • May 24 2016 | 6:21 pm
      jit.gl.node @name sub jit.gl.mesh sub @draw_mode quad_grid
      send the output of jit.gen into the jit.gl.mesh
    • May 24 2016 | 6:41 pm
      Thanks Rob!
    • May 24 2016 | 7:28 pm
      One follow-up question.
      Before-hand, I was able to apply a jit.gl.material to the gridshape and render it correctly. With these changes, I don't seem to be able to apply the material anymore.
      I tried adding @material to the gl.mesh object and changed the name of the gl.material to , which did something, but not what I had before.
      How can I get my material to apply to the deformed gridshape again? Thanks.
    • May 24 2016 | 8:05 pm
      Update: I'm getting some luck adding @matname .jitmtl to the jit.gl.mesh object, but that will just turn it the color of the matfile, all of the "niceness" (shadows, lights, sense of 3Dness) is still missing from the stand-alone render...
    • May 24 2016 | 9:35 pm
      post your patch
    • May 24 2016 | 10:39 pm
      Ok, I think I have everything in this zip. https://www.dropbox.com/s/wpbkmtwjqtbcejz/SoundsphereInOculusMaterial.zip?dl=0 It's kind of messy right now, a mix of Graham Wakefield's Oculus help patcher and Sem Shimla's audiovisualizer.
      If you go into p world -> p sphere1 you'll see the WIP area.
      If you look at Sem's original patcher the sphere textures nicely...
      Thanks! PS I don't think you need a real Oculus DK2 to run so it should work for you.
    • May 25 2016 | 2:06 am
      Here's as far as I got today, trying to get not one but two realtime deformed spheres into the Oculus scene, with independent jit.handle control over each one (eventually would like to move the objects around with Kinect, but that's too far off).
      I get pretty lost with the hierarchy, as in, which things to name uniquely so that I could, say, apply independent materials or independent jit.handle control to each sphere.
      I bet if I was just able to figure this one part out I could get the rest without further assistance :)
    • May 25 2016 | 5:30 pm
      you need to provide normals to your jit.gl.mesh. easiest way is probably to enable @autonormals 1 on your jit.gl.mesh.
    • May 25 2016 | 6:55 pm
      Thanks again!