Jump to content
madrussian

Remove falling radial blur?

Recommended Posts

There's a PostProcess effect I need to remove for my Respawn system to work properly.  It's the radial blur you get while falling (from height over 100 meters to ground).  

 

It's definitely a "RadialBlur", as going to Video Options and turning RADIAL BLUR off and on hides it and shows it.  Anyhow I absolutely need to hide it, and via script.  (Without hiding this "RadialBlur", upon respawn the player is stuck looking at it!)

 

I can successfully disable this falling "RadialBlur", using a shotgun approach:

for "_i" from 0 to 1000 do {
	if (ppEffectEnabled _i) then {
		_i ppEffectEnable false;
		_i ppEffectCommit 0;
	};
};

This is far from ideal of course, as it disables all PP effects.  Obviously, a more targeted approach is necessary.

 

I can successfully hide this falling "RadialBlur" via ppEffectAdjust:

for "_i" from 0 to 1000 do {
    _i ppEffectAdjust [0,0,0,0];
    _i ppEffectCommit 0;
};

This targets all "RadialBlur" and leaves all other PPs alone.  But this gives script errors, which makes sense as ppEffectAdjust accepts different number of settings based on what type of PP effect you are adjusting, and there are always multiple PP effects running (in default game), some of which are not "RadialBlur".  Unfortunately I don't see any script command that tells what type a given PP handle is.


Apparently, what I need here is the actual handle for the falling "RadialBlur" PostProcess effect.

 

Anyone know how to obtain it?  Or other ideas on targeted ways to disable this troublesome PP "RadialBlur" effect?

 

Share this post


Link to post
Share on other sites

Look in BIS_fnc_feedbackInit, ( functionsViewer > A3 > Feedback ). This is where the majority of BI's PP effects are initialised.

Share this post


Link to post
Share on other sites

the value can change if pp effects are destroyed,

 

when i checked last it was up around 230 or 130, so "130 ppEffectEnable false;"

 

but it increments like addAction index, so it doesnt necessarily stay the same

 

it also is not in bis_fnc_feedback pp effects, i couldnt find where it was stored, perhaps in missionnamespace or UI namespace.

 

some steps for debugging:

 

0. be in environment that you can respawn in

1. enter freefall (setpos to Z 300m)

2. kill yourself during freefall

3. the pp effect blur will remain after respawn (an arma bug that ive reported several times to feedback tracker)

4. iterate through 100-300 with ppeffectenable until it goes away (you find the index)

5. with the index, scan mission namespace for a variable value which matches the index you found

 

_myIndex = <number of whatever ppeffect worked>
{
	if ((missionnamespace getvariable _x) == _myIndex) then {
		systemChat str _x;
		diag_log str _x;
	};
} forEach (allVariables missionNamespace);

 

Share this post


Link to post
Share on other sites

@Larrow and fn_Quiksilver: Thanks for responding, all good points!  I can confirm the falling radial blur is not inside BIS_fnc_feedbackInit.

 

I tried a robust scan of missionNamespace, uiNamespace, and player variables, like this:

First in SP editor:  Place two men, make one the player, and name the other one Loon.  Then run this code:

Spoiler

// Add the radial blur by falling for a second

_initPlayer = player;
player setPos [(position _initPlayer) select 0, (position _initPlayer) select 1, 101];
sleep 1;
selectPlayer Loon; // <- Falling blur persists to new player unit, even though the new guys is not falling!
deleteVehicle _initPlayer;
sleep 0.1;

// Establish known blur handles (from BIS_fnc_feedbackInit)

_knownBlurHandles = [
    bis_deathblur,
    bis_deathradialblur,
    bis_fnc_feedback_fatigueradialblur,
    bis_fnc_feedback_damageblur,
    bis_suffradialblur,
    bis_fnc_feedback_damageradialblur,
    bis_uncradialblur,
    bis_uncblur,
    bis_fnc_feedback_fatigueblur,
    bis_suffblur
];

// Check currently enabled PP effects and scan missionNamespace, uiNamespace, and player variable spaces for numbers matching Current PP effects (including numbers in arrays).

_spaces = [missionNamespace, uiNamespace, player];

disableSerialization; // <- This needed to prevent serialization error (as some variables will store Displays or similar)

while {true} do {
    _enabledPPs = [];
    _hits = [];
    for "_i" from 1 to 10000 do {
        if (ppEffectEnabled _i) then { _enabledPPs pushBack _i };
    };

    {
        _space = _x;
        {
            _var = _x;
            _value = _space getVariable [_var, "NIL"];
            
            switch (typeName _value) do {
                case "SCALAR": {
                    _number = _value;
                    if (_number in _enabledPPs) then { _hits pushBack [_space, _number] };
                };
                case "ARRAY": {
                    _array = _value;
                    {
                        _enabledPP = _x;
                        if (_enabledPP in _array) then { _hits pushBack [_space, _array] };
                    } foreach _enabledPPs;
                };
            };
        } foreach (allVariables _space);
    } foreach _spaces;

    hint format ["_knownBlurHandles: %1\n_enabledPPs: %2\n_hits: %3", _knownBlurHandles, _enabledPPs, _hits];
    
    sleep 0.1;
};

 

 

My scan correctly detects current PP effects.  Once falling, scan shows falling radial blur PP.  Once you become the new guy, if you start running a second current PP effect is detected, and that 2nd one goes away when you stop running.

 

Unfortunately, variable detector gets no hits for the falling radial blur.  Thus, it appears falling radial blur is not stored in missionNamespace, uiNamespace, or on player (as numbers or numbers inside arrays).

 

Anyone know where else to look?

 

Perhaps falling radial blur is (only) being stored internally by the engine?  If so, maybe BIS can give us this handle via a variable?  All those other blurs have a variable, why not this one too?  Alternately, if BIS could give us a new command to detect what type of PP effect a give handle is, that would work well enough to detect and shut it off (which beats what is possible currently with shotgun disable approach and always getting a script error).  Something like ppEffectType?

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×