Working House Lighting

There is also a setting for the chance that a building will light up. Also sets the chance if it will flicker off so not all buildings will light. Also this will only light up buildings with windows that illuminate unless custom buildings are added to one of the arrays.
 
There is also a setting for the chance that a building will light up. Also sets the chance if it will flicker off so not all buildings will light. Also this will only light up buildings with windows that illuminate unless custom buildings are added to one of the arrays.

Yup I'm aware of that, very cool. But the building in question was lighting up, I just had to zoom in and the lights would come on, but just standing there normal they were off at 200 meters.
 
Great work axeman!!! It is almost perfect but for one minor issue I am having. I have this installed and working and was wondering if anyone else gets black flashing on the windows from far away. I noticed that when you look at a lit window they all have these black tiger stripes that go diagonally across the windows and cause the light to flicker at a distance. They will flicker as you turn the camera. Its almost like a dark texture is bleeding through the lit window and blacking out polygons of the lit window. This only happens at distance. Is there a way to remove this or address it by changing the space lit moving it slightly away from the window or if the underlying object is lit changing the alpha of the object and increasing the brightness/color value to compensate?
 
Dusty Nuttles & daethan, I think both of these issues are partially gfx related. In the first case the light is on, as shown by zooming in, unless this is the ambient light, this might also explain the flickering of the windows, I also see this effect but it has reduced a lot since upgrading my gfx card and monitor (allowing a better resolution).

I can test different brightness levels, also have recently tested setVectorUp to point the lights downwards, allowing for more brightness, of the ambient light source, without the glare. The only problem with the ambient light source is it is a single lightpoint just below the building and too much brightness makes the walls / roof glow.

The proper way to do this would be to map out each building type and add a light source just outside each window, this would increase the overall amount of lightpoints but would make for a nice effect as the light would be more realistic..

Doing the street lights for Taviana I ran into an issue with too many light sources, I think the engine has a limit. This ended up creating a radius around the survivor where lights were lit. As I flew around the map I could see a circle of street lights following me. I don't know if this is specific to Taviana.

I am going to start by testing the lights with no ambient light and see if the flickering still occurs and work from there. I have seen the same type flickering near fire. Am not sure about setting alpha values for the windows as they are either on or off, is set in the config for the houses, am not even sure this can be set for the lightpoints, brightness and colour can be changed.
 
Question,
I have several of these on my map where i use them for look but at night i would LOVE them to have the 4 working flood lamps. I am fairly certain the obj is called Land_Ind_IlluminantTower Any help to get these working would be amazingly appreciated.
Image%202013-05-19%20at%209.27.31%20AM.png
 
I'm not sure if this makes a difference but at least I think we can be assured this is inherent to the engine at least with house lights of the current type. I have noticed the same phenomena on the metal vent on the air traffic control tower in nwaf. I was scoped in from cord(050,057). the area around the vent looks almost like a door with a window at the top the window being the vent. Because the reflection amount is slight its far less noticeable but clearly the same thing. It can be seen when you are scoped in on the vent from the end of the runway on the grass hill cord(050,057) in moon light shining on that side. In the day it cannot be seen though it is still reflective. If this is inherent to the current way of illuminating the objects what other ways to get the same effect are there? Would illuminating space in front of the objects work? Does anyone know any other way of doing this? Once again thank you to axeman for all the fine work we are enjoying on our server currently.
 
Possible to do Lighthouses?
In the .cpp config there is a reflector with a brightness value, not had a play with it yet but am sure it is possible from this..
Code:
    class Land_majak2: Land_majak
    {
        model = "\ca\buildings\majak2";
        class Reflectors
        {
            class MainLight
            {
                color[] = {0,0,0,0};
                ambient[] = {0,0,0,0};
                position = "";
                direction = "";
                hitpoint = "";
                selection = "";
                size = 0;
                brightness = 0;
                period[] = {0,1};
            };
        };
 
Wow axeman, above pics look great. Thanks for replying to my question on Lighthouses as well. I'll check it out for sure.

How do you add lights to the above tower? Do you simply add the object name in _objIndustrial or is it _objMisc?

I tried adding light to Land_A_Castle_Bergfrit by adding it to the _objIndustrial in the change_streetlights.sqf...but alas, no lights. Does it only search for a lighting source and if no lighting source...no light?

If I haven't said it before, great script. Makes night time playable and fun.
 
The castle can be added to the existing code. Add Land_A_Castle_Bergfrit into one of the arrays in the editable bit..
 
The castle can be added to the existing code. Add Land_A_Castle_Bergfrit into one of the arrays in the editable bit..

Are you referring to the top of the 'change_streetlights.sqf' file? If so, where it says //VARIABLES?
Below Variables I have:
_range
_switchpercent
_objectHouse
_houseColor
_objectIndustrial
_indColour
_objMisc
_miscColour

I added Land_A_Castle_Bergfrit to the _objectIndustrial line but didn't get light. Should I have added it to _objMisc?
 
To be honest I am thinking of removing those extra arrays on the next release. I sometimes get an error when an array is empty, this is a known bug with the error reporting within Arma, but I am worried it may pause the script, still testing that.

I can confirm that the light shows up using
Code:
_objMisc = nearestObjects [_nrPlayer, ["Land_A_Castle_Bergfrit","Land_A_FuelStation_Build","Land_Hlidac_budka","Land_A_FuelStation_Shed","Land_Mil_Barracks","Land_Mil_Barracks_L","Land_Mil_Barracks_i","Land_Mil_ControlTower","Land_a_stationhouse","Land_sara_hasic_zbroj","Land_sara_domek_zluty","Land_pumpa"], _range];
First option is Land_A_Castle_Bergfrit

castle_light.jpg


Granted the light is pretty dim but it is just placing one lightpoint at the bottom of the castle.. Look for some water pumps and see if they are lit also..
 
Axe, you are a gentlman and a scholar! if theres any help i can offer please let me know.
Have the towers lit at a range of over a kilometre. Have been working on the detection of already lit towers. I suspect this may be causing issues with the house lighting. In some circumstances lights may be getting added even when one is already there, this would cause the visible range to be reduced, still testing.

The personal generator is just an inventory item and only shows as a dummyweapon when dropped so have added a repair option instead, it requires one scrap metal and adds a variable to the tower but this won't carry over a server restart.

I have a base building script which i think I am going to use but it only, currently, works with a reality database.. with this a generator can be built near the tower and will carry over on server restarts with the buildings option enabled..

the building method you could build a generator at NW airfield and have it supply power to all towers within a radius.
 
Axeman, thanks so much for he reply. Yes, according to those pics you are correct. Reason I hadn't seen the light was I had burning fire barrels on my test site.
 
Back
Top