Gamma Correction
-
I’ve got a feeling you’re right about that advanced graphics option in perf.options.ini aswell. I grew curious about it after seeing it enabled by the quickfix patch, but not really noticing anything significant had changed.
I tracked down the tab for it in the options list and got it to show up in the menu, but I can’t get it to turn into a switch or anything. You can see it in the picture here:
You can put it in the list by entering a line for
“1408” (advanced graphics) in data/interface/optlist.ini[interface]
option = 1894
option = 1334, 2443, -1, true, false, -1, -1
option = 1332, 2444, 30, true, false
option = 1408, true, false <–--------------------------------adv.graph
option = -1
option = 1896
option = 1501, 2447, 50, true, false
option = -1
option = 1897
option = 1400, 2449, 100, false, false
option = 1401, 2450, 100, false, false
option = 1495, 1769, 1, false, false
option = 1555, 1771, 0, false, false
option = 1498, -1, 1, false, false[Audio]
option = -1
option = 1409, 2451, 100, true, false
option = 1336, 2452, 100, true, false
option = 1337, 2453, 100, true, false
option = 1918, 1791, 100, false, true, 33, 100option = 1895, 2446, 100, true, false, -1, -1
option = -1
option = 1493, 1774, 100, true, false, 0, 100
option = 1404, 1775, 100, true, false, 0, 100
option = 1624, -1, 100, true, false, 0, 100
option = 1622, 1777, 100, true, false, 0, 100
option = 1483, 1778, 100, true, false, 0, 100
option = 1403, 1780, 100, true, false, 0, 100
option = 1402, 1779, 100, false, false, 75, 100
option = 1630, 1772, 100, false, false, 50, 100
option = 1585, 1773, 100, false, false, 50, 100
option = 1481, 1781, 100, false, false, 50, 100
option = 1623, 1782, 100, false, false, 50, 100
option = 1663, 1770, 100, false, false, 30, 100
option = -1
option = 1407, -1, 2, true, false
option = 1671, -1, 32, true, false, 0, 100
option = 1914, 2456, 100, true, false
option = 1915, 2457, 100, true, true, 0, 50But no matter how I configure it I can’t turn it into a switch or slider or anything. Welcome to try if anyone else thinks they might be able to make it work. I’m wondering if it was actually intended as a sub menu that didn’t make it in, there are other tabs that do work that were left out for nebulas etc.
-
freelancer.exe 0244F7 B889->E875 = gamma ranges from 0.5 to 1.5, not 1.0 to 2.0 ~adoxa ```(Don't forget to restore the previous patch.) Apparently advanced graphics was supposed to be a menu - 1765 is "Opens the Advanced Graphics menu." Finding where it handles Difficulty shows that advanced graphics really does have no effect.
-
That setting is absolutely perfect. Thanks very much Adoxa, and thanks for clearing up the advanced graphics mystery once and for all too! Have a nice day.
-
How the hell did you find this Adoxa, do you have some sort of tool for decrypting the dll files? You’ve made me extremely curious now as to what else is hiding away in the options, haven’t seen anything related to antialiasing or anisotropic filtering on your travels have you :pint:
-
I came across the menu string looking at the tips for the other options. Wondering how the difficulty option was handled, I searched my disassembly (which is all I use, along with Ollydbg) for its id and saw that’s how it gets handled. The id for advanced options is not referenced, so there’s no code to handle it.
There are references to antialias and anisotropic in rp8.dll (I use gsar to search the binaries), but I think they’re just general DX stuff, not really FL specific.
-
If that handles the dx stuff then I would imagine it just states whether aa/af is allowed or not per object at driver level, a true/false scenario which I guess is present in all dx rendering code. Looks like we’re stuck with forcing it in the drivers then, which is fine.
Thanks for looking Adoxa, we can’t win em all can we!
-
So how far can you actually go with the tools and resources you’ve developed for freelancer. I’ve no real idea what you do exactly or how you do it so I’m just throwing this out there. Can you actually read and edit what’s contained in the dll files or is it just limited to the types of offsets in the limit breaking?
I had a look at that rp8.dll you mentioned using the tiny hexer tool you’ve got linked on your homepage, although I see some plain text here and there it’s mostly just garbage, I guess that’s an encryption of the code. Can you read and edit that stuff?
I can make out bits and bobs, mentions of d3d8.dll, dxt1, dxt2 textures etc, then other stuff in the shading.dll like opacity and emissive texture types, also mentions of specular power (sp) and specular colour (sc), those two i was not aware of until now.
I’m guessing if I can read stuff it’s useless, if it’s encrypted is the good stuff?
-
There’s no “encryption”. You didn’t expect computers used plaintext commands did you?
You’re looking at assembly code in its raw form, that’s all. Commands like “mov” or “test” aren’t written in plaintext, that’d be horrendous. We’ve just attributed names to what are essentially series of bits that the processor recognizes and executes. Everything’s as plain as it gets, just not in a format humans easily understand.
-
mostly yes. adoxa is a computer veteran, coming from the days there were no simplifications and this way he learned to understand the assembly directly. did you mention specularity? gentlemen, can’t wait to use that stuff. hopefully the rendering won’t get too slow by enabling this channels in the freelancer engine (possible).
-
FriendlyFire wrote:
There’s no “encryption”. You didn’t expect computers used plaintext commands did you?You’re looking at assembly code in its raw form, that’s all. Commands like “mov” or “test” aren’t written in plaintext, that’d be horrendous. We’ve just attributed names to what are essentially series of bits that the processor recognizes and executes. Everything’s as plain as it gets, just not in a format humans easily understand.
Seriously, I haven’t got a clue about computer languages, other than the fact that I’m clueless about it I just figured out though that the bits I can read actually do something. I edited the d3d8.dll entries in rp8.dll to d3d9.dll and when I tried to launch FL it gave me the message “The procedure entry point Direct3DCreate8 could not be located in the dynamic link library d3d9.dll” I guess that Direct3DCreate8 is a dx8 header or whatever used to draw something, so if those headers could be changed to dx9 code then the game would run in dx9. At least I guess that would be the case. As to where the hell those headers are though, pffft! Can anyone get to that stuff?
Yeah Gist, specular power (sp) and specular colour (sc), are in the shading.dll, so perhaps you can use them in the same way as you would Dc, Ec, Et or any of the others in texture files for ships or whatever. They must already be used though because specular highlights are evident on all ships and stations.
-
Stuff that you can read are usually string values. They can be used for INIs, files, etc. The big part of the code we can’t (really) alter however is the assembly part. Assembly is extremely difficult to code; most progamming nowadays is made in other languages (called high-level languages like C++) which are compiled into assembly.
-
So in short, we’re stuck with what we’ve got lol. Thanks for clearing that up.
-
Direct3DCreate8 was also in rp8.dll so i changed that to 9 and got the message freelancer failed to initialize directx 8 please try rebooting. Could this go somewhere, is there anything else that can be changed to get through all this or is it a dead end?
-
Eh? No, porting to DX9 is FAR, FAR more complex than just changing a number
-
Damnit! Well I could only hope couldn’t I. I was reading something that said that often games are written with more than one table, one for each directx version it supports, something to do with compatibility with older graphics hardware I think. Seeing as you’re required to install dx9 to run the game I was hoping they might have had it in there somewhere. It’s easy enough to point it at directx9 it would seem, it just doesn’t have support for it then.
-
I can read some bytes directly (for example: 68 00 00 80 3F is push 1.0f), but I use a customised PeRdr (attached somewhere) to generate a disassembly listing (not like my Z80 days, which I could just about disassemble in my head). The resource files (like resources.dll containing the options and nameresources.dll containing names for everything) are here (FRC format, so it’s quite easy to edit those).
-
Damn, if you haven’t tried this gamma setting yet, you should take a look just out of interest. Fly into the badlands and you wish you could light a candle and stick it on the dashboard it’s so dark, the lightning is really effective all of a sudden, when you fly back out the sun just blinds the hell out of you for a few moments. Much better than bloom.
-
though this does not exactly fit the topic but i recently thought of something to use in combination with this hack, which would look even better, in theory:
we all know, there are different channels for any material with every sort of rendering engine like FL has, too. what we are using mostly is a luminosity, transparency and diffuse channel while for the diffuse we mostly use a texture and for luminosity, too.
now, is it possible somehow to set a relative value to the diffuse channel? say, if you have a diffuse multiplier of 1.0, you see the texture like it diffuses the lights, if you have less, it is darker and if you have more than 1.0, the face diffuses even more light than it recieves. i saw what it looks like in lightwave, as i made moons with a diffuse of 130%. they really became shiny!
is there a way to make some like that in freelancer? even better it would be if there is an offset to setup a program-based diffuse multiplier so there wouldn’t be any need in editing every single material…
guess it’s the Dc channel, isn’t it?