Product Chat / Create a dark place on a bright world (map)

Author
Message
stor
9
Years of Service
User Offline
Joined: 27th Feb 2015
Location:
Posted: 29th Jan 2017 07:56
My map shows a streets (I have a very large map) in daylight At the end of one of streets there A large field with a cave.
in the cave has a lot of light and i want to be in a dark cave.
How to do it?
PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 29th Jan 2017 11:01 Edited at: 29th Jan 2017 11:02
As far as I know you can only change the ambience in lua for this. The problem is if you can see out of your cave it will appear dark outside as well, until you walk out and swap the ambience back to the outside brightness. You could possibly have a gradual lowering of the light as you move further into the cave, using the distance from your switch zone or object, which would at least lessen the outside looking too dark. The best bet for something like this is to design it so you can lower the darkness gradually as you move into the cave and away from the entrance, perhaps using several sections to lower it up or down as you pass by rather than one at the entrance.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
Freakon
GameGuru TGC Backer
15
Years of Service
User Offline
Joined: 24th Feb 2009
Location: UK
Posted: 29th Jan 2017 11:25
There is a darkzone.lua you can use with a trigger zone, then lightzone.lua to return to normal when you leave the cave
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 29th Jan 2017 11:47
Yes, but it suffers from the effect I mention Everywhere will become dark.


SPECS: Q6600 CPU. Nvidia 660GTX. 8 Gig Memory. Win 7.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 29th Jan 2017 11:50
For situations like this we could do with a compliment to the 'invisible wall' entity, instead though the wall would be plain white with and _I map to make it glow. Place the 'bright wall' (or whatever it gets called) outside the cave with it initially hidden, then when you enter the cave a certain depth unhide it,, from that point on as you continue into the cave reduce the light level.

If you turn around and look outside it will still appear bright.

For a really professional looking result you would capture the view outside the cave and use that for the _D texture on the wall and tweak the _I map to match as close as possible the light conditions outside, that way when the wall is hidden as you leave the cave the effect is less jarring.

Been there, done that, got all the T-Shirts!
PM
stor
9
Years of Service
User Offline
Joined: 27th Feb 2015
Location:
Posted: 29th Jan 2017 12:39
I saw the darkzone.lua and lightzone.lua and from what I understand this is a simple code so I will change it to what I need.
Thanks everyone!!!
PM
Preben
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 29th Jan 2017 14:24 Edited at: 29th Jan 2017 14:25
Im working on a system like that , that will allow this , only drawback is it will not work on terrain so your cave need to have a floor

You will be able to set any amount of light you want.

From outside, see how dark it is inside:


Indoor looking out:


Will work directly in the editor so WYSIWYG.


This will not make it into 1.14. but ....
best regards Preben Eriksen,
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 29th Jan 2017 15:42
That's superb Preben!

Cheers.

Login to post a reply

Server time is: 2024-11-24 17:39:26
Your offset time is: 2024-11-24 17:39:26