Tuesday, 5 April 2011

Vintage look

One of current trends in photography is trying to give a photo a vintage look. Not the black & white but rather pink & blue tone. With a photo editing suite it's just a matter of a few clicks. Recently I came up with an idea of porting this effect to HLSL as it is very interesting effect in my opinion (works very well not only to make image look older but also warmer).

Let's start with outlining the technique. In general we take a base photo and blend it with 3 layers in a following order:
  1. Yellow (actually close to yellow one) one with multiply mode,
  2. Pink one with screen mode,
  3. Blue one with screen mode.
And here is a more detailed description:
  1. Get the base photo.
  2. Blend this photo with a color1 = {0.9843f, 0.9490f, 0.6392f} using multiply mode and using 0.59f factor.
  3. Blend the result with a color2 = {0.9098f, 0.3960f, 0.7019f} using screen mode and using 0.205f factor.
  4. Blend the result with a color3 = {0.0352f, 0.2862f, 0.9137f} using screen mode and using 0.17f factor.
Multiply blending mode should be obvious. It's implemented like this:

result = lerp(source, source * dest, t);

Screen mode might be a bit less intuitive for those not familiar with Photo editing and here is the code:

result = lerp(source, (1.0 - ((1.0 - source) * (1.0 - dest))), t); 


And that's it. Almost :)

Let's take a look at the example base image:

In general applying described effect results in a low contrast image like the one below:



So it is a good idea to apply a contrast enhancement filter and here is example result of applying it to the image above:


The photo definitely have a different look than the base one. You can note the pink and blue tones in the final image.

It is also possible to use almost the same approach to have a warmer looking image. The only difference is to skip step no. 4 i.e. not applying blue layer. The results follow (contrast enhancement filter applied):





Today I also committed a few fixes to the nGENE since I started writing my master thesis. More will come this week.

1 comment:

  1. Nice post and nice effect too, I've tried out.
    God job your doing.

    ReplyDelete