texturing and lighting stuff
If you hadn't guessed I'm just typing up notes as I watch Federico's Amazing Max Tips tutorials...
You can assign a texture or movie to a gl.gridshape by plugging it straight in. Make sure it has the @output_texture set to 1, of course.
The texture will take on whatever shading and lighting that the gridshape has on it. So to achieve a flat/ambient texture with no lighting info, set your gridshape to @lighting_enable 0. Also Set the colour to white.
Something handy to do is after you've loaded your jit.movie, pipe it straight into a jit.gl.texture and give it an @name attribute. This way you can specify your texture in the jit.gl.gridshape with the @texture attribute and it will always be correct. For example if you delete a jit.movie node and create a new one, with the same movie file, if you plug it's texture output into the 2nd input of a message node, you'll see the id of the texture is different. A specified name will maintain its identity!
jit.gl.material takes over the shading & lighting attributes. Even if you have a texture attached as shown in the earlier screenshots, it will override all of it!
We can still connect the previous jit.movie into the diffuse of the gl.material if we want - but it's quite cool to use it to load in texture sets that have been made for PBR (photorealistic based rendering).
So go to your favourite textures site, like polyhaven, ambient cg and grab some files - you'll probably want diffuse, specular/roughness, normal, height and AO.
You can load each by dragging the files directly onto a jit.gl.texture. OR you can hardcode them with the @file attribute. The former is much faster! You will have to "bang" them to make them active and show up, once you've plugged them in.
You can have a more user-friendly time of messing around with some of the material attributes if you double-click the jit.gl.material object (when the patch is locked, or you ctrl-double-click). Here you can try out the different shading models for diffuse, specular and also edit some of the colour attribs.. a nice way to preview things quickly before hardcoding them into the objects (if you want).
That's all for this video's notes.
Comments
Post a Comment