Skip to content

Conversation

@illwieckz
Copy link
Member

11 years ago, @lnussel added a workaround based on quake2 source code to be able to load some tga files that GdkPixbuf were not able to load. So, 11 years later, it seems this workaround is not needed. This patch removes the quake2 tga code and enlighten a little the code.

This tga.c were used to load map screenshots from Quake3, RTCW, ET and Doom3 (See #158).

I've checked it against Q3, RTCW and Wolf:ET maps, it works well, I've not tested Doom3 maps yet, but there is no reason it could fail.

@zturtleman
Copy link
Contributor

The brightness modification is probably because Q3 and RTCW use a gamma ramp with overbight bits to brighten the assets. The actual image file is darker than displayed in-game. Gamma ramps are broken in windowed mode on GNU/Linux using Xorg or whatever, so compare with fullscreen. ET does not use overbright. I don't know if Doom 3 does. (I have not tested this pull request.)

@illwieckz
Copy link
Member Author

With the brightness modification, all screenshots from all games where too bright, without this brightness modification, all screenshots from all suppported games (including quake3) seem to look fine. I need to test RTCW more because screenshots have a dark athmosphere, whatever the brightness setting, so I do'nt know yet if it's dark because the map is dark or because the brightness is wrong. I hope to not need per game brightness.

@illwieckz
Copy link
Member Author

OK, map shots of Quake3, RTCW, ET and Doom3 are ok with these patches.

They all look better without the brightness modification.

@illwieckz illwieckz force-pushed the mapshots branch 2 times, most recently from 66996a2 to 563d008 Compare June 25, 2015 23:12
@illwieckz
Copy link
Member Author

Well, why I can't merge that o.O

@illwieckz illwieckz force-pushed the mapshots branch 2 times, most recently from 563d008 to ba7cfbd Compare June 25, 2015 23:33
@illwieckz illwieckz self-assigned this Jun 25, 2015
@zturtleman
Copy link
Contributor

I think tmp = p[0] + brightness; etc should be tmp = ((int)p[0]) << 1; in renderMemToGtkPixmap to match Q3 gamma ramps. (I haven't tested it.)

If the levelshots look fine and managing per-game brightness correction seems excessive, I guess it's not really important.

@illwieckz
Copy link
Member Author

Ah, I can test it

@illwieckz
Copy link
Member Author

What to do with the brightness value ?

@zturtleman
Copy link
Contributor

Ignore it or rename it to overBrightBits and set it to 1. tmp = ((int)p[0]) << overBrightBits;

@illwieckz
Copy link
Member Author

OK. with your changes, RTCW map shots looks better, but some other shots (like padman ones) are too brighty.

@illwieckz
Copy link
Member Author

Doom3 mapshots are very nice too.

@zturtleman
Copy link
Contributor

World of Padman would need to use overBrightBits 0.

@illwieckz
Copy link
Member Author

yep (clickable image):

XQF brightness bump

@illwieckz
Copy link
Member Author

@zturtleman: I've included your code because it looks very nice, but currently it is disabled because we need to add some per-game code. Currently the mapshots are displayed without brightness modification, which is the safest choice.

@illwieckz
Copy link
Member Author

@zturtleman: do you think Quake4 mapshots needs brightness bump ?

@zturtleman
Copy link
Contributor

Okay. Yeah, would also need to find out what the values for all games should be. Spearmint would need per-mod setting, not hugely important just mentioning it. I think RTCW should actually use overBrightBits 0. I don't own Quake 4 and it's closed source, so I can't check.

@illwieckz
Copy link
Member Author

Quake4 maps with overBrightBits 1 looks very nice
WolfET needs overBrightBits 0

@zturtleman
Copy link
Contributor

The code looks good. OpenArena, Q3 Rally, Voyager Elite Force, Reaction, and Smokin' Guns should use overbrightbits 1 too. This isn't a complete list, I didn't check all the games.

illwieckz added a commit that referenced this pull request Jun 27, 2015
get rid of old quake2 tga.c (11 years old workaround), add new gamma levelshot modification, fix #158
@illwieckz illwieckz merged commit 10c4d4c into XQF:master Jun 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants