Dynamic Frost Effect

So a while ago, while I was making a christmas themed version of a level at work, I was playing the latest SSX after hours.

MetroXmas
The christmas level

There’s a game mode in SSX where you have to stay out of the shadow or you freeze to death, they visualise this by putting more and more frost on the screen.

I quite liked this effect, and thought it would be nice to include this in the christmas level at work.

Now in essence it’s just an image overlay, but the special thing about it is that when it fades in or out, it doesn’t just get less or more transparent, but the frost shrinks or grows.
I figured they must be using a blend map or something alike to achieve this,
which is how I then made it.

Here’s what it looks like:

sharp35 sharp65 smooth75 smooth100
this is the frost effect I made, not the one in SSX

Distortion

After making this, I thought it would be even better if the ice also distorts the view.
Since the frost effect was already a post effect, this wasn’t that difficult to implement.

What I did was create a normalmap from the frost texture.
This is used to determine the direction of the distortion, and the amount of distortion is relative to the opacity of the frost, together these define the sampling offset.
(It’s a screen space image distortion, so the distortion works by just sampling the source image with the offset.)

So this is what I got:

melting2 melting1 melting3

I’ve made this post effect available for free on the Unity Asset Store:
https://www.assetstore.unity3d.com/#/content/5337
It requires a Unity Pro license in order to work though.

Advertisements

3 thoughts on “Dynamic Frost Effect

  1. Pingback: The power of blend maps (or whatever they’re called) | Steven Craeynest's Blog

  2. Hello. I tried to use the frost effect you made, but it slows my mobile device a lot. It’s imposible to play the game..It’s because of the shader, but i don’t know what to change to make it run with a normal FPS on mobile devices…
    Thank you.
    Diana

    • Hi Diana,
      Image Effects are in general not suited for mobile (at least in Unity), and the Frost Effect is unfortunately not an exception.
      I’m sorry, but don’t know how to fix that, if it’s at all possible.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s