PDA

View Full Version : LW 2015.3 "Affect OpenGL" not doing so



Chrusion
07-28-2017, 12:07 PM
I have a scene with a single sphere light, no fall off, int. 100, Affect OpenGL enabled, Affect Diffuse Off, and Affect Spec On. I'm using the Textured Environment backdrop plugin with an HDR equirect image to light the scene using full MC GI and "Importance Sampled BG," which works great in creating "ray traced" shadows. The single light is only for specularity, since IBL doesn't create surface specs.

With these settings, the scene is unlit in Texture Solid Shaded Perspective or Camera viewport. When "Affect Diffuse" is enabled, the scene becomes lit. When that remains on and "Affect OGL" is disabled, the scene returns to unlit.

Should not "Affect OGL" enabled light the scene in the viewports when "Affect Diffuse" is turned off? If so, then what would be the most likely issue as to why it is NOT?

MSherak
07-28-2017, 12:45 PM
I have a scene with a single sphere light, no fall off, int. 100, Affect OpenGL enabled, Affect Diffuse Off, and Affect Spec On. I'm using the Textured Environment backdrop plugin with an HDR equirect image to light the scene using full MC GI and "Importance Sampled BG," which works great in creating "ray traced" shadows. The single light is only for specularity, since IBL doesn't create surface specs.

With these settings, the scene is unlit in Texture Solid Shaded Perspective or Camera viewport. When "Affect Diffuse" is enabled, the scene becomes lit. When that remains on and "Affect OGL" is disabled, the scene returns to unlit.

Should not "Affect OGL" enabled light the scene in the viewports when "Affect Diffuse" is turned off? If so, then what would be the most likely issue as to why it is NOT?


All of these buttons are specific toggles for the light. Affect OpenGL is just for viewport drawing and has no affect on the rendering part. Affect Diffuse and Specular work with both the viewport and rendering.

If your light does not affect the diffuse or specular then OpenGL and the renderer will not see it. So basically when you have Diffuse and Specular toggles on and OpenGL turned off means, Light don't affect the viewports with your settings but do use your settings during rendering.

One of the reasons for this is due to the light limit that OpenGL has. If you had 100 lights in the scene you could only see first 8 affect the viewport. This allows one to control which ones are viewable or not. Do this in your scene. Clone the lights 8 more times and one will see that the 9th light does not affect the viewport with any settings. Not until one of the previous 8 are toggled off will the 9th show up in the viewport.

Chrusion
07-28-2017, 02:42 PM
Thanks for the reply, but you did not read my post correctly. I said I have ONE (single) light in the scene and am NOT having issues with RENDERING. I'm talking ONLY about the viewports. Can you confirm my issue in any scene you have? I'm going to Siggraph, so I don't have time to troubleshoot if there's something in my scene causing the only light in it to NOT illuminate the OGL viewport when Affect OGL is on and Affect Diffuse is off.

MSherak
07-28-2017, 03:23 PM
Thanks for the reply, but you did not read my post correctly. I said I have ONE (single) light in the scene and am NOT having issues with RENDERING. I'm talking ONLY about the viewports. Can you confirm my issue in any scene you have? I'm going to Siggraph, so I don't have time to troubleshoot if there's something in my scene causing the only light in it to NOT illuminate the OGL viewport when Affect OGL is on and Affect Diffuse is off.

If Affect OpenGL is on and Affect Diffuse is off for the light you will not see the geometry being lit by that light in OpenGL or rendering. This is not a bug and is working like it was designed. Check the attached images. I left the specular on for all.

(image names)
One - Affect OpenGL ON, Affect Diffuse ON, Affect Specular ON
Two - Affect OpenGL ON, Affect Diffuse OFF, Affect Specular ON
Three - Affect OpenGL OFF, Affect Diffuse ON, Affect Specular ON

As you can see the light is affecting OpenGL in image TWO because there is a specular highlight on the ball. But the light is not affecting the color in either viewports.

gerry_g
07-28-2017, 03:39 PM
sIBL turns off affect OGL by default for all lights bar any light it may load ,an sIBL Sun for instance, you always have to turn back on any light you want visible to the renderer, this is standard

Chrusion
07-28-2017, 09:53 PM
sIBL?

OK, I still don't like this "as it should be" behavior. Why? Because in order to SEE the scene I must enable Affect Diffuse. But when I do that and render, then that light over exposes the scene, because it is already being illuminated by the HDR image via MC GI + Importance Sampling. I have to disable Affect Diffuse, which is just a minor pain in the rear, because I normally do not illuminate with just an image. Thus my expectation that Affect OGL on would do exactly that... illuminate the scene diffusely in OGL when Affect Diffuse was off for Rendering. I didn't realized this has been the way it works all these versions and years. So, Affect OGL only turns on/off OGL specularity, not OGL diffuse? Why not both? Seems useful (per above condition) and logical.

RebelHill
07-29-2017, 09:19 AM
Ofc its as it should be... If a surface has 0% diffuse value, then it has it in render and ogl... ogl isnt some special environment where diffuse, spec etc, dont exist... ogl IS a renderer, a very basic, realitime renderer. thus if a light is told not to affect diffuse, it doesnt, anywhere.

If you want the light on for ogl, but off for actual rendering, then simply have your spec light (diffuse off), add a clone of it (spec off diffuse on) and untick/disable this light in scene editor.

Chrusion
07-29-2017, 01:42 PM
simply... untick/disable this light in scene editor.Well, duh! Why didn't _I_ think of that? THANKS for that brilliant bit of the obvious. :-) One less loose screw in my noggin.