Gamma Correction
-
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?