Trying to Locate Brightness Function

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Rajada

Member
Jan 21, 2008
213
0
16
rajada.tumblr.com
As the title says, I am trying to locate the viewport's Brightness() exec function definition. I'm not certain if it is native, and I'd like to see if anyone here knows where it is before I dig around all the classes for something that might not exist.
 

Rajada

Member
Jan 21, 2008
213
0
16
rajada.tumblr.com
I'm sorry if that was confusing, I meant the rendered viewport in game. Does that make sense? I'm looking for the function that allows you to set the brightness of the in game rendering.
 

Rajada

Member
Jan 21, 2008
213
0
16
rajada.tumblr.com
Nothing for you guys, the deal is I have a licensed unreal engine game that has a huge problem with it. As the only current "developer" of this long forgotten game I'm looking for the function so I can fix it. If it is native I'm not gonna touch it but I wanted to know if it was before I assumed anything.
 

Raynor.Z

Ad Nocendum Potentes Sumus
Feb 1, 2006
1,491
7
38
Honestly it's a bit confusing to understand what are you trying to achieve/solve. Besides in-game option there is (title-specific) INI configuration file where you usually can change brightness levels.
[WinDrv.WindowsClient]
Brightness=0.400000
 

Leo(T.C.K.)

I did something m0tarded and now I have read only access! :(
May 14, 2006
4,794
36
48
He simply wants to know where this function is located, ie which class has it. I might take a look at it myself.
He probably wants to change the script to work better.
 

Leo(T.C.K.)

I did something m0tarded and now I have read only access! :(
May 14, 2006
4,794
36
48
It seems to be entirely native, I couldn't find it in the classes, the console command is completely native though...that's for sure now.
Edit: it might be in engine.client but it's still native i'd say. There might be a workaround, i'll send you PM.
 
Last edited:

Rajada

Member
Jan 21, 2008
213
0
16
rajada.tumblr.com
Okay, that is what I thought, just wanted to be sure I didn't miss anything. I usually don't touch native stuff at all, but just out of curiosity, is it possible to override this kind of native function? Rewrite the internal code without touching the definition itself? IE possibly make something like this in say a playerpawn subclass:

Code:
Exec function Brightness()
{
	local int Brightness;
	
	Brightness = int(float(ConsoleCommand("get ini:Engine.Engine.ViewportManager Brightness")) * 10);
	
	if(Brightness <=9)
		Brightness++;
	else
		Brightness = 1;
	
	ConsoleCommand("set ini:Engine.Engine.ViewportManager Brightness "$(Brightness / 10));
}
 
Last edited:

Leo(T.C.K.)

I did something m0tarded and now I have read only access! :(
May 14, 2006
4,794
36
48
Actually in UnrealShare.UnrealVideoMenu this is here:
if ( Selection == 1 )
{
Brightness = FMax(0.2, Brightness - 0.1);
PlayerOwner.ConsoleCommand("set ini:Engine.Engine.ViewportManager Brightness "$Brightness);
PlayerOwner.ConsoleCommand("FLUSH");
return true;
}
zeurkous has this to say about it:
[17:34]<zeurkous> P.ConsoleCommand("set Engine.ViewportManager Brightness" $
i);
[17:34]<zeurkous> P.ConsoleCommand("flush");
[17:34]<zeurkous> where i is the new value
[17:34]<zeurkous> imo the proper way is to replicate to the client and then do
a foreach() on Engine.ViewportManager
[17:34]<zeurkous> but mesupposes this'll suffice
[17:35]<zeurkous> in case of local menus
[17:35]<zeurkous> the "ini:Engine." prefix is to make sure it ends up in some
config file
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
Not quite. The set command accepts "ini:packageName.ClassName.PropertyName" instead of a class name to look up the actual class name via the specified property from the main INI file. Similarly you can use "usr:packageName.ClassName.PropertyName" to look it up from User.ini.

The main reason the game must use ini:Engine.Engine.ViewportManager instead of an actual class name is that obviously the Windows and Linux versions use different viewport manager classes. The set command looks up the actual class name using the ViewportManager=... line in the [Engine.Engine] section of UT.ini.
 

Rajada

Member
Jan 21, 2008
213
0
16
rajada.tumblr.com
I have this nearly figured out, except that...

Bright = float(ConsoleCommand("get ini:Engine.Engine.ViewportManager Brightness"))

always returns 1.0 into the variable I assign it into for some reason, regardless of the value in the ini. So in other words, the get ini returns a client message to me stating 0.5, but when I access Bright, it always equals 1.0. Any idea what is going on there?
 
Last edited:

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
Well, the "get" console command returns the current class default value, not necessarily what is written in the ini file. Only the "ini:Engine.Engine.ViewportManager" part actually checks the ini file to look up the class name stored in the ViewportManager value of the [Engine.Engine] section.
 

Rajada

Member
Jan 21, 2008
213
0
16
rajada.tumblr.com
And yet...

Code:
Brightness = int(float(GetPlayerOwner().ConsoleCommand("get ini:Engine.Engine.ViewportManager Brightness")) * 10);

within a menu subclass works fine. I can even type the whole get ini line into my console and get the right value back. Why the inconsistency?
 
Last edited: