problems with lights, materials & models
I'm trying to reconcile the various interactions between lights, materials and models, and as far as I can determine, some of the lighting parameters for jit.gl.model are broken. Example attached, along with a simple 1x1 plane to load into jit.gl.model.
Open the patch and load the 'plane.dae' file into jit.gl.model. This gives a side by side comparison of two ‘identical’ planes, one a jit.gl.gridshape and the other a jit.gl.model. There's a spotlight aimed at the two planes. The four material components can be affected by the sliders feeding jit.gl.material (if jit.gl.material's @override is on) or by the sliders feeding the two objects (if @override is off).
While mat_specular and mat_emission have the same effect on both planes, mat_diffuse and mat_ambient have no effect on the jit.gl.model plane. In fact, the mat_diffuse and mat_ambient attributes of jit.gl.model seem to be permanently set to 1.
Another anomaly is that, if @override is off, changing any of the sliders to jit.gl.material instantly turns @override on (the object sliders stop having any effect) even though the attrui object doesn’t update until the patch is unlocked. This can make things really confusing.
To summarize: Turn override (on jit.gl.material) off. Set the sliders for diffuse and ambient to 1 for each of the two objects. Now when you play with specular or emission, both planes appear identical. But changing diffuse or ambient only affects the lefthand (gridshape) plane.