logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 [2]  Send TopicPrint
Hot Topic (More than 10 Replies) On Color handling in Unreal. (Read 8723 times)
Dr.Flay™
Senior Member
****
Offline


ChaosUT-333networks

Posts: 378
Location: Kernow, UK
Joined: Dec 9th, 2012
Gender: Male
Re: On Gamma handling in Unreal.
Reply #15 - Dec 20th, 2018 at 3:50am
Print Post  
General note for all.
It is worth making sure you installed the monitor with the inf and ICC files from the manufacturer.

If you don't have the install files, or want to examine or customise/override your current monitor config and colour system, these free tools will help.
These tools may also unlock hidden speeds and resolutions outside the PnP standards, that would be listed in a missing inf file.
https://www.entechtaiwan.com/util/ps.shtm
https://www.entechtaiwan.com/util/moninfo.shtm


Very cool thread  Cool
  
Back to top
IP Logged
 
effEX
New Member
*
Offline


Oldunreal member

Posts: 10
Joined: Jan 7th, 2020
Re: On Gamma handling in Unreal.
Reply #16 - Jan 9th, 2020 at 3:35pm
Print Post  
Just noticed this forum section, and thought I'd link to a thread I made in the general UT section in case anyone out there is like me and didn't see it:

https://www.oldunreal.com/cgi-bin/yabb2/YaBB.pl?num=1578440909

Basically, using the cwdohnal OGLR I can't seem to adjust the gamma or brightness at all.
  
Back to top
 
IP Logged
 
han
Global Moderator
Unreal Rendering Guru
Developer Team
*****
Offline


Oldunreal member

Posts: 594
Location: Germany
Joined: Dec 10th, 2014
Gender: Male
Re: On Gamma handling in Unreal.
Reply #17 - Jan 17th, 2020 at 11:13pm
Print Post  
I took a look again at the old attenuation function, and did a few step different (not setting Distance/WorldLightRadius=0.5, and in particular removing some 1/4096 term, which was needed for inversion in a lookup table) and ended up with a lot better approximation to the old curve, which has Attentuation=1.0 for Distance=0, but otherwise is nearly exactly the curve:

Code
Select All
FLOAT LOverR = DistanceToLightSource/WorldLightRadius;
FLOAT Attenuation = 2.0f*(LOverR*LOverR*LOverR)-3.0f*(LOverR*LOverR)+1.0f; 



This is again cubic Hermite interpolation, so we can just write it using smoothstep:

Code
Select All
FLOAT Attenuation = FSmoothstep( 0.0f, 1.0f, 1.0f-DistanceToLightSource/WorldLightRadius ); 



Plot: https://coding.hanfling.de/ProperHermiteAttenuation.pdf
The dotted line is the pure cubic hermite interpolation attenuation, the solid line is the legacy surface attenuation function. Looks like a pretty good fix to me. I still have no idea why I didn't do it this way the last time...

  

HX on Mod DB. Revision on Steam. Löffels on Patreon.
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo