jit.gl.mesh help/problem rendering


    Oct 18 2006 | 8:11 pm
    Hello
    I am a little confused about the behavior of jit.gl.mesh.
    The following patch illustrates the issue:
    Load the included model (this is a simple model with material to
    illustrate the issue)
    Jit.gl.model loads a file and reads its material. When set to
    automatic 0, everything is good.
    When set to matrix output 1 and sent to jit.render with the proper
    drawmode appended, all is good
    When trying to send to jit.gl.mesh, only a portion of the model renders.
    I must be doing something wrong, but I cant figure it out for the
    life of me.
    Anyone?
    
    v a d e //
    www.vade.info
    abstrakt.vade.info

    • Oct 18 2006 | 8:27 pm
      Do your models have different drawgroups? I think matrixoutput only
      sends out the current drawgroup.
      wes
      On 10/18/06, vade wrote:
      > Hello
      >
      > I am a little confused about the behavior of jit.gl.mesh.
      >
      > The following patch illustrates the issue:
      >
      > Load the included model (this is a simple model with material to illustrate
      > the issue)
      >
      > Jit.gl.model loads a file and reads its material. When set to automatic 0,
      > everything is good.
      >
      > When set to matrix output 1 and sent to jit.render with the proper drawmode
      > appended, all is good
      >
      > When trying to send to jit.gl.mesh, only a portion of the model renders.
      >
      > I must be doing something wrong, but I cant figure it out for the life of
      > me.
      >
      > Anyone?
      >
      >
      >
      >
      >
      >
      >
      > v a d e //
      >
      > www.vade.info
      > abstrakt.vade.info
      >
      >
      >
      >
      >
      >
      >
    • Oct 18 2006 | 8:51 pm
      Ah, fuck. Thats it.
      This sucks, because I want to be able to attach/include a material
      file and do morphing with objects that have different colored
      vertices, and Id much rather do the material creation/coloring in a
      modeling app.
      I can do the morphing just fine with a jit.xfade, and cache the data
      to the jit.gl.mesh so I dont have to bang constantly through the
      whole chain.
      However, it seems ONLY if I add the materials (this is within
      wings3D), does the model suddenly have a drawgroup. I make simple
      models with one sphere, for example, that has many flat polygonal
      subdivisions. If I color only one of the planes on the sphere, I
      suddenly get drawgroups
      Without a material, the model is one drawgroup only.
      uuugggghh..
      Does anyone know any way around this, without some hardcore hacks,
      like loading the same model more than once, or some such?
      Is there a way for jit.gl.model to just dump everything out as one
      matrix regardless of drawgroup 0, or whatnot? If I use jit.gl.sketch
      and use drawmatrix 0 0 0 0, I still dont get my materials.
      Do you see what I mean Wes with the patch?
      Thanks for the help btw.
      v a d e //
      www.vade.info
      abstrakt.vade.info
      On Oct 18, 2006, at 4:27 PM, Wesley Smith wrote:
      > Do your models have different drawgroups? I think matrixoutput only
      > sends out the current drawgroup.
      >
      > wes
      >
      > On 10/18/06, vade wrote:
      >> Hello
      >>
      >> I am a little confused about the behavior of jit.gl.mesh.
      >>
      >> The following patch illustrates the issue:
      >>
      >> Load the included model (this is a simple model with material to
      >> illustrate
      >> the issue)
      >>
      >> Jit.gl.model loads a file and reads its material. When set to
      >> automatic 0,
      >> everything is good.
      >>
      >> When set to matrix output 1 and sent to jit.render with the proper
      >> drawmode
      >> appended, all is good
      >>
      >> When trying to send to jit.gl.mesh, only a portion of the model
      >> renders.
      >>
      >> I must be doing something wrong, but I cant figure it out for the
      >> life of
      >> me.
      >>
      >> Anyone?
      >>
      >>
      >>
      >>
      >>
      >>
      >>
      >> v a d e //
      >>
      >> www.vade.info
      >> abstrakt.vade.info
      >>
      >>
      >>
      >>
      >>
      >>
      >>
    • Oct 18 2006 | 9:09 pm
      Hi Vade,
      It's not so bad. If the model has more than one drawgroup, what
      actually happens is that each drawgroup is sent out in order as a
      separate matrix, multiple matrices for each bang. So just set your
      gl.mesh object to "automatic 0" and bang it after each matrix, and
      you are half way there. See attached patch.
      This creates a more minor problem if you are trying to use the "auto
      material" feature of jit.gl.model, because if different matrices have
      different materials, these are set within jit.gl.model and not sent
      with the matrices. (because there's no way to send a material in a
      matrix.) So, hopefully you can get your modeling program to use
      vertex colors instead of materials. This should work OK in your patch.
      -Randy
      On Oct 18, 2006, at 1:51 PM, vade wrote:
      > Ah, fuck. Thats it.
      >
      > This sucks, because I want to be able to attach/include a material
      > file and do morphing with objects that have different colored
      > vertices, and Id much rather do the material creation/coloring in a
      > modeling app.
    • Oct 18 2006 | 10:08 pm
      Thanks Randy.
      Ill see what I can get vertex color wise. Much appreciated.
      v a d e //
      www.vade.info
      abstrakt.vade.info
      On Oct 18, 2006, at 5:09 PM, Randy Jones wrote:
      >
      > Hi Vade,
      >
      > It's not so bad. If the model has more than one drawgroup, what
      > actually happens is that each drawgroup is sent out in order as a
      > separate matrix, multiple matrices for each bang. So just set your
      > gl.mesh object to "automatic 0" and bang it after each matrix, and
      > you are half way there. See attached patch.
      >
      > This creates a more minor problem if you are trying to use the
      > "auto material" feature of jit.gl.model, because if different
      > matrices have different materials, these are set within
      > jit.gl.model and not sent with the matrices. (because there's no
      > way to send a material in a matrix.) So, hopefully you can get
      > your modeling program to use vertex colors instead of materials.
      > This should work OK in your patch.
      >
      > -Randy
      >
      >
      >
      > On Oct 18, 2006, at 1:51 PM, vade wrote:
      >
      >> Ah, fuck. Thats it.
      >>
      >> This sucks, because I want to be able to attach/include a material
      >> file and do morphing with objects that have different colored
      >> vertices, and Id much rather do the material creation/coloring in
      >> a modeling app.
      >
      >
      >