Jump to content

building from cubes not dark??


Rick
 Share

Recommended Posts

So here is the first shot from my resources "game" which is similar to minecraft but not really :D

 

Anywhere I built a house in the first picture then I went into it and closed it off and the lighting inside didn't change at all. The blocks are simply CreateCube() with physics bodies that have no mass parented to them. Is there something else I have to do? Is it because of the ambient light? I'm using klepto's day/night script which works perfectly for what I'm after but I need areas like this to be darker when closed off.

 

It's like I need the ambient light outside but not when inside some structure. I assume using a spot light for the sun is probably not the best idea?

 

firsthouse.png

 

insidehouse.png

Link to comment
Share on other sites

Yeah, it's ambientlight. The default ambientlight is 0.3, which is good like for open dark areas on a bright day in California. For anything cave like, you need to set it 10 times lower, to 0.03.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

So mixing open areas and "dynamic" cave like areas and getting the right light isn't possible in LE? What kind of workarounds would we be talking about to get this to work? I mean looking into a dark cave that has no light I wouldn't expect to see the same ambient light as outside of the cave. Seems like an issue there.

Link to comment
Share on other sites

Of course it's possible, but not at the same time, or actually that is also with some little tricks with 2 light sources.

 

I had in the previous gamelib demo with the mayan pyramid 2 invisible 3d area colliders which changed the ambientlight to 0 and 0.3. But that works only if the dark area is hidden behind a corridor corner inside a building, because else you would see the bright ambient inside the building from outside too.

 

The 2 light source method works better, but is also a bit more expensive in FPS. You set ambientlight to 0, and you have your normal directional light, and then you have a movable directional light without shadows following the camera, and pointing towards the main directional light.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

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...