How do I Emulate Tilt Shift

0 favourites
  • 4 posts
  • For starters, sample image...

    I'm making a Top Down (3/4) and tough that I could emulate this effect easily with the blur effect, thing is that there is no "Mask Blur" where I could blur everything bellow the "PostProcessor" layer. Also with a "un-clur a ribbon at the center, blur the rest" approach I would do fine.

    This can't be only to blur a sprite, it needs to blur the background of the layer. Can it be done with an effect?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I just tried this, hopefully its what your after, I'm not sure what the performance would be like.

    You can mask an effect by doing this:

    1. Create a white mask in its own sprite. (White will be where the effect occurs, Alpha 0/Transparent what you don't effected.)

    2. Give it a Multiply effect. (this effectively hides the white mask, make sure this is the first effect).

    3. Give it the effect you want. In this case blur. (I did 2 blur horizontals at 300 and 100 to address the blur quality I was getting.)

    4. Place this sprite on its own layer (or with other 'post-processing' effects) and anchor it in place.


    Multiple effects can be added, but I found not all effects play nice with this approach.

    The mask doesn't have to be a large image to cover the screen - it can be a small image scaled up... in your case a 1 pixel wide gradiated white-transparent-white band could be scaled across the layer, again I'm not sure what gains you the best performance or if its even relevant.

    You could conceivably animate the mask sprite for additional undreamt up things you could do with it... or call specific frames of a mask for various needs.

  • I was thinking on semthig around those lines. I will test performance on that

    EDIT: It works! The effect or Depth of field is incredible, I'm attaching the mask image I'm using. Granted you will want your game to run at 30fps as a target

  • A screenshot for your viewing pleassure

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)