Jump to content
  • 0

Brightening up the night


BetterDeadThanZed

Question

With A3 Epoch, someone posted a way to brighten up the nights a bit. You can call an sqf with this code:

"ColorCorrections" ppEffectEnable true; 
"ColorCorrections" ppEffectAdjust [0.88, 0.88, 0.04, [0.2, 0.29, 0.4, -0.22], [1, 1, 1, 1.3], [0.15, 0.09, 0.09, 0.0]];
"ColorCorrections" ppEffectCommit 0;

I tried using that in A2 Epoch and it didn't seem to make a difference. As a matter of fact, it seemed worse. Does anyone have a good ColorCorrections code that helps brighten up the night a little?

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

Wasn't that what full moon nights did ? It's been a while so maybe not :unsure:

In your init.sqf add :

dayz_fullMoonNights = true;

See if that helps.

 

I already have that. The moon doesn't stay in the sky the whole time. It moves across the sky just like the sun so there's still lots of darkness and only gets tolerable when the moon is at it's peak.

Link to comment
Share on other sites

  • 0

I think it would be something in this file maybe?

 

File: fn_lightFunctions.sqf

 

/*
    DayZ Epoch Lighting System - Light Functions
    Made for DayZ Epoch by axeman please ask permission to use/edit/distribute email [email protected].
*/
axe_NoStreetLights={//For testing - Need to see brightness of house lights
private["_lights","_rng","_target","_objName"];
_target = _this select 0;
_rng = _this select 1;

_lights = ["a_fuelstation_sign.p3d","lampa_ind_zebr.p3d","lampa_ind.p3d","lampa_sidl_3.p3d","lampa_sidl_2.p3d","lampa_sidl.p3d","powlines_concl.p3d","powlines_woodl.p3d"];

    {
        if("" != typeOf _x) then {
                
            if (alive _x) then {
                    
                _objName = _x call DZE_getModelName;

                if (_objName in _lights) then {

                    _x switchlight "off";

                };
            };
        };
    } count nearestObjects [([_target] call FNC_getPos), [], _rng];

};

axe_newLightPoint={
private ["_lp","_pos","_col","_brt","_amb","_pos","_dir","_vect"];
_col = _this select 0;
_brt = _this select 1;
_amb = _this select 2;
_pos = _this select 3;
_dir = _this select 4;
_vect = _this select 5;
_lp = "#lightpoint" createVehicleLocal _pos;//Only create locally now.
_lp setLightColor _col;
_lp setLightBrightness _brt;
_lp setLightAmbient _amb;
_lp setDir _dir;
_lp setVectorUp _vect;
//_lp enableSimulation false;//Using this stops lights from illuminating for local player (not tried moving it to before parameters set) - Makes no difference to network broadcast, other players DO NOT see the object anyway
//axeDiagLog = format["FN:LP NEW CREATE:BRIGHT:%3 | %1 for %2",_lp,player,_brt];
//publicVariable "axeDiagLog";
_lp
};

axe_lightPoint={
private ["_lp","_col","_brt","_amb"];
_col = _this select 0;
_brt = _this select 1;
_amb = _this select 2;
_lp = _this select 3;
_lp setLightColor _col;
_lp setLightBrightness _brt;
_lp setLightAmbient _amb;
//axeDiagLog = format["FN:LP EXISTS LIGHT:%1",_lp];
//publicVariable "axeDiagLog";
};

//return brightness of light attached to object
axe_lightBrightness={
private["_plyr","_brtns","_lightPcnt","_target"];
_plyr = _this select 0;
_target = _this select 1;

if(isNil "dayz_fullMoonNights")then{dayz_fullMoonNights = false;};
if(dayz_fullMoonNights)then{
_brtns = 0.024;
}else{
_brtns = 0.018;
};
_brtns = _brtns + ((_brtns/100) * ((_plyr distance _target)/15)); //Add percentage of brightness based on distance from player
//Min / Max Levels
//if (_brtns > 0.025)then{_brtns = 0.025;};
//if (_brtns < 0.015)then{_brtns = 0.015;};
_brtns
};

axe_towerLight={
private["_twr","_lCol","_lbrt","_lamb","_oset","_twrPos","_rad","_a","_b","_ang","_nrTLs","_doLit"];
_twr = _this select 3 select 0;
_lCol = _this select 0;
_lbrt = _this select 1;
_lamb = _this select 2;
_doLit = _this select 4 select 0;
_twrPos =  ([_twr] call FNC_getPos);
_rad=2.65;
_oset=14;
_nrTLs= _twrPos nearObjects ["#lightpoint",20];

    if(count _nrTLs > 3)then{
    //axeDiagLog = format["FN:TL FOUND LP:%1",count _nrTLs];
    //publicVariable "axeDiagLog";
        {
            if(_doLit)then{
            [_lCol,_lbrt,_lamb,_x] call axe_lightPoint;
            }else{
            deleteVehicle _x;
            };
        sleep .2;
        }count _nrTLs;
        
    }else{
    //axeDiagLog = format["FN:TL NEW LPS:%1",_twr];
    //publicVariable "axeDiagLog";
        if(_doLit)then{
            for "_tls" from 1 to 4 do {
            _ang=(360 * _tls / 4)-_oset;
            _a = (_twrPos select 0)+(_rad * cos(_ang));
            _b = (_twrPos select 1)+(_rad * sin(_ang));
            [_lCol,_lbrt,_lamb,[_a,_b,(_twrPos select 2) + 26],_ang,[0,0,-1]] call axe_newLightPoint;
            sleep .4;
            };
        };
    };
};

 

 

If I had to guess try editing this: (This part probably only changes the brightness when the moon is out and full moon lights is on however...)

 

if(isNil "dayz_fullMoonNights")then{dayz_fullMoonNights = false;};
if(dayz_fullMoonNights)then{
_brtns = 0.024;
}else{
_brtns = 0.018;
};
_brtns = _brtns + ((_brtns/100) * ((_plyr distance _target)/15)); //Add percentage of brightness based on distance from player
//Min / Max Levels
//if (_brtns > 0.025)then{_brtns = 0.025;};
//if (_brtns < 0.015)then{_brtns = 0.015;};
_brtns
};

Link to comment
Share on other sites

  • 0

Try changing this:

if(isNil "dayz_fullMoonNights")then{dayz_fullMoonNights = false;};
if(dayz_fullMoonNights)then{
_brtns = 0.024;
}else{
_brtns = 0.018;
};

 

To This:

 

if(isNil "dayz_fullMoonNights")then{dayz_fullMoonNights = false;};
if(dayz_fullMoonNights)then{
_brtns = 0.024;
}else{
_brtns = 0.024;
};

 

See if that makes it so it is just as bright when the moon is out when the moon is not out.

Link to comment
Share on other sites

  • 0

by the way you are replacing existing color correction, there's an option to create an extra pp with new priority, thus keeping your old settings, too.

 

Making nights brighter with CC won't work, because it is exactly what it says on a tin - post process. Unlike gpu based brightness and contrast, the game already runs these on max values [1,1,0] ( first 3 values for cc), so the only thing you could do is adjust offset or blend. However this means you will be just painting darker areas white... while not gaining any better visibility.

Your example in OP post actually reduces brightness, contrast and increases offset a tad (third value).

 

Although with some blending and colorizing, you can achieve small improvements, here's an example:

[1,1,0.00723144,1,1,1,0.0216946,1,1,1,1,1,1,1,0.956612]

I'll also throw this one in, it's a cool effect, brighter than first example, but its b/w cc that does not affect red lights, looks damn sexy:

[1,1,0.00723144,1,1,1,0.0216946,1,1,1,0,1,1,1,0.956612]
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...