Globally set material for gridshapes without changing color

    Jan 25 2013 | 5:39 pm
    Hello Again Community,
    I've got a patch which is parsing incoming OSC messages and generating sphere gridshapes dynamically. I've got the colors of the individual spheres (see the 'balls' subpatcher) as arguments in their objects, but there's a which is globally setting the texture of the spheres. Since this animation is reminiscent of planets in orbit, I wanted to try setting the texture of the global material object to the packaged dirt.wall. Doing so cancels out my sphere's selected colors. Anyone see what I need to do to retain the selected color, but apply a different texture from the global object? Or do I need to add names/flags to make this work?

    • Jan 25 2013 | 9:50 pm
      when you load the dirt.wall material file (either using the @matfile attribute, or from the material browser) it forces the object to override any color values on your attached gl objects. will override attributes of attached objects, whenever you provide a value for that attribute, and loading a material file usually provides those attributes.
      the solution is to not provide those attributes to the gl.material object, and instead manually build your material using the texture inputs and material options.
      the below patch should get you started, let me know if you have questions. the built-in material files all live in Max6/Cycling '74/jitter-materials/dirt.wall.jitmtl and are just text file that can be opened in any text editor.
    • Jan 28 2013 | 4:08 pm
      Thank you, Rob. The solution is beautifully simplistic! And thanks for all your work on the excellent tutorials you do on the site. They are certainly a source of inspiration!
      Random question: Are there any Max/MSP/Jitter training programs, university programs or even instruction offered by Cycling 74 that you could recommend? I'm learning a ton just through the forums, but could use some traditional teaching regarding jitter expressions and the more complex objects available.
    • Jan 28 2013 | 5:47 pm
      hi Peter Elsea wrote some amazing jitter tutorials:
    • Jan 29 2013 | 7:39 pm