Page 1 of 1

Help a programmer make an art (gamma stripping)

Posted: Thu May 09, 2013 2:53 pm
by GooberMan
Hokay. So. I went around my local neighbourhood in Espoo the other day taking rocky photos so that I could make Prime Directive not look so horribly bland. All well and good. I got in GIMP, cropped some interesting sections, used the map filter to make them seamless, put them in my WAD, and loaded them up.

And then hit the gamma wall.

Anyone that does extensive photo manipulation might have an idea of what's going on, but the basic gist is that the photos taken in real life have a colour curve in them that's designed to look "right" on your computer screen. Put those same photos in ZDoom, however, and you'll notice that the pre-calculated gamma curve does not work well with any gamma settings you have altered in ZDoom. In short, it's putting a gamma curve on your gamma curve so you can colour adjust while you colour adjust (thanks Xzibit).

Removing the curve is past my abilities in GIMP/Photoshop (my attempts result in a red hue, and that's about where my patience runs out). If anyone that knows their way around those programs would be kind enough to stip the curve for me (I assume a standard sRGB curve) and reupload them, I would be most grateful. Alternately, if someone knows of a decent tutorial site for GIMP that goes over colour cuve modification, that would be just as great.

The images can be found here, and are released under a Creative Commons licence (which means you'll get a mandatory credit in Prime Directive if you upload the modifications I've requested).

Re: Help a programmer make an art (gamma stripping)

Posted: Thu May 09, 2013 6:11 pm
by Blox
ImageImage
What exactly do you want done to them? o_O

Edit: This filter chain seems to work alright.

Re: Help a programmer make an art (gamma stripping)

Posted: Fri May 10, 2013 2:15 am
by GooberMan
Blox wrote:What exactly do you want done to them? o_O
I assume my camera didn't embed a colour profile in the original image but instead directly encoded the colour profile in to the values. It's normally pretty transparent to the end user, and is not normally something you have to worry about. I basically need an inverse of the standard sRGB colour cuve applied to the image. That should make it look correct in G/ZDoom.

Re: Help a programmer make an art (gamma stripping)

Posted: Fri May 10, 2013 4:16 pm
by Blox
Truth to be told, I have exactly no idea what you're talking about there. ;x

Re: Help a programmer make an art (gamma stripping)

Posted: Fri May 10, 2013 4:36 pm
by Gez

Re: Help a programmer make an art (gamma stripping)

Posted: Mon May 13, 2013 7:46 pm
by Sarah
There is a color profile, otherwise Photoshop would have defaulted to index coloring. I believe you settings for your camera may be what is causing the strange hue problem.
Blox wrote:ImageImage
What exactly do you want done to them? o_O

Edit: This filter chain seems to work alright.
I'm assuming those are right. What I get in PS and the source is a strangely reddish hue...wouldn't a simple adjustment of the hue and a re-save as a new file do it? I'll try and update here in a second.

UPDATE: A couple quick adjustments later and I have this(Not as dark as Blox's):
The rest are here: My Drive
Also, those were all done by the seat of my pants with what felt good. Further adjustment can be done.

Re: Help a programmer make an art (gamma stripping)

Posted: Tue May 14, 2013 1:53 am
by GooberMan
I'll see how it looks when I get home. Thanks in advance.

Re: Help a programmer make an art (gamma stripping)

Posted: Tue May 14, 2013 12:13 pm
by Sarah
.If they don't work, then can you post what they do visually in-game? I have a possible second theory after some consideration that would need some gamma adjustment, but it depends on what the original image does, so I need a shot of that too.

Re: Help a programmer make an art (gamma stripping)

Posted: Tue May 14, 2013 12:37 pm
by GooberMan
They're already working well, thanks.

Image

I might try editing them further myself, add a sharpness filter to it, might increase the contrast and dim the whole thing as well as they don't quite fit with the rest of the Doom textures yet.

Re: Help a programmer make an art (gamma stripping)

Posted: Tue May 14, 2013 1:55 pm
by Enjay
Unfortunately, the texture has some quite bold features on it that make the repeating tiling nature of a texture in Doom very obvious. If you could use your source image make the texture longer (and possibly taller too) somehow then it would repeat less often and probably look better.

Re: Help a programmer make an art (gamma stripping)

Posted: Tue May 14, 2013 2:10 pm
by GooberMan
The darken and sharpen definitely help. But yeah, it's definitely too obvious a repeat.

I think this is the source image I pulled it from. And that weird red tint appears to be in this too. Camera probably decided to auto-balance the colours or something. Reminder: Phone cameras actually are pretty shit.

Image

Re: Help a programmer make an art (gamma stripping)

Posted: Wed May 15, 2013 5:36 pm
by MG_Man
What it mostly needs is less contrast overall, and like Xaser said, probably to be a lot larger.

Team Fortress 2 has a very similar texture, perhaps you could look at how it does it.

Re: Help a programmer make an art (gamma stripping)

Posted: Wed May 15, 2013 7:36 pm
by Sarah
Haha, I'm glad they worked. You didn't tell me you needed them to mesh with stock Doom textures though, so I did whatever I felt. I actually massively increased the constrast to get a much clearer definition in color intensities and then did correction as needed. PS sharpening filters are pretty imprecise and I doubt the turnaround effect would be very good in the software rendering. I'd look to soften the image overall, but it could come out mushy in-game. You're best bet is to do color correction without increasing the contrast and create an image that you scale with TEXTURES. I don't know a thing about making it tile-able though(I'm all Photoshop)...you mentioned GIMP has this ability?