This member has provided no bio about themself...

Report RSS Same old song...

Posted by on

I've beeing working for a while on an OpenGLDrv for UnrealEngine 1 games, but until recently the main focus was just to supply a OpenGLDrv which does work for Nerf and NerfEd, but has now shifting towards building a reliable up to date OpenGLDrv using OpenGL 4.4 feature set.

While this sounds in the first place like just adding shaders and buffers and maybe fancy postprecessing the main development effort is right now to sort out old issues, and i keep stumbling across more and more of them. The most prominent are: MipMaps and and linear vs. non linear light.

To start in chronological order i stumbled upon following article which instantly reminded me of the either to dark or white blurred rendering in UE1 games:
Gamedevelopment.tutsplus.com

The next thing i did is actually trying to load the lightmaps and textures as sRGB textures with varying results depending on the game. For all games it results in lighting and fogging locking really bad and having huge steps, but it guess that is just related to the storage format of the texture and can be be solved. However in Unreal, partially in Nerf it did feel "more right" then uploading the textures as RGB. The Unreal 1 flyby map got some decent bluish tone, while the the water in the cannon was not overbright, which kinda feeled "more right". But for DeusEx it actually does not make that huge difference at all. But that might actually be related for the game developed later with the issue in mind or simply they did a poor job, as DeusEx graphics were really poor compared to what was possible with UE1 (Unreal, Rune, Wheel of Time). That was actually the start where i started to really question the Unreal 1 community paradigma "GlideDrv is how it was supposed to look". To skip a bit ahead of time i found yesterday this youtube video which shows Unreal 1 beeing played with SGLDrv on a PowerVR PCX-2:
Youtube.com
This bluish tone again! Sadly the video does not show the water. So why i'm so excited about this. The conversation between sRGB and RGB is expansive to do on the CPU, but they opted to do that for some 200 Mhz PC, so they must have had a pretty damn good reason for doing so. The first explaination is that it was intended to look that way, but was to expansive, so they dropped or never implemented it for the other render devices. The second explaination is that they made a change to the lighting system so it yielded RGB and not sRGB anymore, but they missed updating the SGLDrv.
However if anyone does have a PowerVR PCX2 around I'm glad about screenshots of that water and other stuff or if you sent me the card by mail, seems kinda hard to find.

The next thing i discovered while working on my OpenGLDrv for KHG (after finally figuring out why i always got a black screen for that game) was that they previously seem to have used BGR8 instead of BGRG7 lightmaps. So next thing i tried was to skip that BGRA7777 -> BGRA8888 resampling (e.g. you get half the color values as before), sth. i wanted to get rid of anyway. To my supprise the game didn't turn out to be utterly dark, but yet again i ran into some rendering bugs, however my subjective impression was that the whole scene gained a better visibility, the dark areas were better visible, with lower gamma, and you didn't need to turn the gamma that high to make them visible where the other parts would have turned out overbright.

Afterwards i tried to combine both approaches, but it turned out that they it seems like the cancel each other to some degree. One explanation might be that you can think of the * 0.5 multiplication of the values as a taylor approximation of a gamma correction.

However, if you feel like your head is exploding now, you feel exactly like me, and I will cover the mipmapping issues in a later article.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: