Jump to content

directional light


cassius
 Share

Recommended Posts

Guest Red Ocktober

i think i know where you're going with this Cassius... at least i think i do...

i wondered the same thing...

 

if... i made a boxed in structure, and placed the view inside the box... would the outside light leak in...

 

or if made a hollowed out sphere... with just a single hole in it... would only the shaft of light that entered through the hole

light up the interior of the sphere only where it touched... leaving the rest of the sphere totally dark...

 

it seems as if it doesn't...

 

ok... if we use the Leadwerks guardhouse.gmf as a common reference structure (instead of a box)... put one into a scene...

in the editor... add an atmosphere... enable dynamic shadows (for the guardhouse)...

 

go inside the guardhouse...

 

 

LWInteriorLighting2.jpg?psid=1

 

 

you can see where the outside dir light "shined" in through the windows... but it seems that there's also an ambient

light affecting the inside of the structure... the interior walls not in the "sunlight" seem exceptionally bright...

i'm sure if i boarded up the windows, i wouldn't be able to make it totally dark inside...

 

 

ok... so lets turn down the brightness in the atmosphere... just to see what the effect would be...

 

 

LWInteriorLighting1.jpg?psid=1

 

 

not too bad... this is almost like i expected the interior to be lit...

 

but now the outside is also dark... not exactly what it'd be like in the real lit world... ahhh, maybe good

for moonlight shining in on those full moonlit nights :unsure:

 

is this what you are asking?

 

 

--Mike

Link to comment
Share on other sites

U have a large castle in my level. inside some of the rooms one wall is very bright yet I have no interior lights pointing to that wall and there are no

windows.While messing around with the directional light tryimg different light efffects I realized that it was the directional light penetrating the walls.

By rotating the light I have now reduced it to an acceptable level......but it shouldnt BE.

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

Guest Red Ocktober

i've also found that i can turn the intensity property of the guardhouse down when i'm inside

the structure while keeping the outside lighting (atmosphere) up... this seems to give a more

realistic interior lighting effect...

 

LWInteriorLighting3.jpg?psid=1

 

but whenever the view moves outside, the intensity property will have to be set back up so the

outside of the house will look properly lit with the outside lights...

 

LWInteriorLighting43.jpg?psid=1

 

a lil trickery here and there seems to work... maybe even to the extent of having a separate interior mesh with the intensity set lower

than the exterior mesh...

 

also... the above technique seems to also work with Klepto's daynight addon...

 

 

 

--Mike

Link to comment
Share on other sites

I only get light leaking through if the mesh is single sided. Or do you mean its just coming through the edges of the rooms?

 

If your mesh is a "full" model like the guardhouse, with interior and exterior walls, then then the light should only shine through the windows and doorways.

Intel core 2 quad 6600 | Nvidia Geforce GTX460 1GB | 2GB DDR2 Ram | Windows 7.

 

Google Sketchup | Photoshop | Blender | UU3D | Leadwerks Engine 2.4

Link to comment
Share on other sites

U have a large castle in my level. inside some of the rooms one wall is very bright yet I have no interior lights pointing to that wall and there are no

windows.While messing around with the directional light tryimg different light efffects I realized that it was the directional light penetrating the walls.

By rotating the light I have now reduced it to an acceptable level......but it shouldnt BE.

Maybe you have only a back-facing polygon, so there is nothing to cast a shadow and block the light?

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

The room is backed by a courtyard wall with a tower and castle turrets.A shadow of the turrets can be seen on the lit interior wall.

That would tend to imply the wall is not casting a shadow (it's as if the wall is not there) as Josh is suggesting.

 

Might be helpful to post a few screenshots just to make sure we are all clear on what the issue is.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Just for reference if anyone comes to this post wondering what I meant... I made an image showing what I discussed a few posts above about using a mesh with interior + exterior walls. It shows how using just a single sided mesh doesnt cast the shadows properly with windows, but the mesh with 3d walls and windows does. This is using a directional light.post-10-0-74042700-1321108201_thumb.png

Intel core 2 quad 6600 | Nvidia Geforce GTX460 1GB | 2GB DDR2 Ram | Windows 7.

 

Google Sketchup | Photoshop | Blender | UU3D | Leadwerks Engine 2.4

Link to comment
Share on other sites

This was my problem when trying to simulate Minecraft lighting. The closer you come to blocking yourself in the darker it should get, but the ambient light messes that up. You can't really mess with the ambient lighting because you could potentially still see outside from inside your hole so it would still need to be bright outside, but dark inside.

 

Is there a reason realistic lighting like that isn't out of the box and default in LE?

Link to comment
Share on other sites

Is there a reason realistic lighting like that isn't out of the box and default in LE?

 

..I believe so..but luckily, some simple workarounds can do just fine...as for example you just show Richard, apart from eventual 'bug' in LE for given example, rule is that never ever expose backface against light source..i mean, by default, such structure, geometry wise, is already wrong..also, i noticed that in cases like yours (backfaces exposed out), vital role plays polygon distribution and surface smoothing..I do not know have you did that, but if you didnt..give it a go..

 

Link to comment
Share on other sites

Good illustration Richard. Just about anyone who has used 3DWS will have seen issues with light leakage or incorrect shadow casting due to problems with the way us beginners tend to construct of the geometry. Once these are understood it ceases to be an issue. Ambient light optimization is a separate thing but also necessary for accurate portrayal of reality.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...