Rick Posted August 11, 2013 Share Posted August 11, 2013 The directional light seems to light up everything (even "in-doors"). Is there a way we can better simulate the sun where it doesn't penetrate buildings/hallow boxes? Maybe we can have certain materials ignore directional lighting only but "see" other kinds of lights? Not 100% ideal but might help in certain situations like housing that shouldn't have the sunlight in the house (if shades over windows down). We could probably do some godrays to simulate sunlight coming in if we wanted that. I was able to make a shader to ignore ambient lighting (pretty easy ), but not sure if shaders can tell the difference between directional lights and the other light forms. Quote Link to comment Share on other sites More sharing options...
shadmar Posted August 11, 2013 Share Posted August 11, 2013 You can customize a shader to ignore directional light and paint your inside walls with a material which uses this shader. Open up shader fragment : Find : //Distance attenuation attenuation = lightposition[i].w * max(0.0, 1.0 - distance(lightposition[i].xyz,ex_VertexCameraPosition) / lightrange[i]) + (1.0 - lightposition[i].w); After Add : if (attenuation == 1.0) continue; 1 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Josh Posted August 11, 2013 Share Posted August 11, 2013 The proper solution is for the engine to perform a raycast internally and discard the directional light if anything is hit. I will see about adding this. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted August 12, 2013 Author Share Posted August 12, 2013 Thanks shadmar, that worked! It's pretty neat to see the inside of my building pitch black when I have a directional light and ambient light turned up. Of course the downside is as stated that "windows" don't shine any light in at all. Would be really cool if you could do this Josh, and would give a more real feel. I don't recall if LE2 did this or not? For now I think I might be able to get away with spotlights angled to look like light coming in from a window or open door. Quote Link to comment Share on other sites More sharing options...
cassius Posted August 12, 2013 Share Posted August 12, 2013 Yeah. le2 had the same problem. I mentioned it both then and recently with Leadwerks 3. All I could do with le2 was to try and rotate the light away from buildings. It didn't work very well. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.