Applying jit.gl.model's @material_mode 3 material for jit.gl.mesh after various processing from jit.gl.model @matrixoutput.

    Jitteradvanced

    mirrorboy
    Jun 01 2023 | 5:29 pm
    I'm amazed by the recent advancements in gl-core and am currently exploring the possibilities of Jitter.
    The PBR shaders generated internally by jit.gl.model seem to have different specifications than jit.gl.pbr. I was unable to achieve the beautiful PBR rendering shown in @material_mode 3 when re-compositing with jit.gl.mesh.
    I tried to get the material dict from jit.gl.model and reapply it with jit.gl.material or jit.gl.pbr. I also attempted to reapply the shader code outputted from jit.gl.model using get_shader to jit.gl.shader, but I was not successful.
    Is the process described in the title even feasible?
    I appreciate your assistance.
    Max Patcher
    In Max, select New From Clipboard.
    Show Text
    jit.gl.model @material_mode 3 @matrixouput 0 (Beautiful!)
    jit.gl.model @material_mode 3 @matrixouput 0 (Beautiful!)
    jit.gl.model @material_mode 0 @materixoutput 1 and re-synthesis in jit.gl.mesh with jit.gl.pbr
    jit.gl.model @material_mode 0 @materixoutput 1 and re-synthesis in jit.gl.mesh with jit.gl.pbr
    Model : https://github.com/KhronosGroup/glTF-Sample-Models

    • Rob Ramirez's icon
      Rob Ramirez
      Jun 02 2023 | 3:17 pm
      I believe the situation here is that gltf material format supports combined metal and roughness textures. so we must first unpack that texture before sending it to the pbr input. I believe the Roughness is stored in the Green plane, and Metalness in Blue.
      I have plans to add some functionality to jit.gl.pbr to load these materials directly from the GLTF files for some future update, so thanks for exploring this space sharing your experiences.
      Share
    • mirrorboy's icon
      mirrorboy's icon
      mirrorboy
      Jun 10 2023 | 9:31 pm
      Hi Rob
      Thanks for the reply, the jit.gl.pbr rendering itself is very beautiful and interesting, looking forward to that update which will be easier to use in combination with jit.gl.model!