Announcement

Collapse
No announcement yet.

Frosted Glass ?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Frosted Glass ?

    Is there any examples out there about making frosted glass ?
    It was easy in UDK with distortion but refraction and transparent systems work different and I couldnt figure it out myself.
    http://www.greenbutterflydesigns.com...roth-stock.jpg
    This is what I wanna achieve with less opacity.
    https://canerozdemirportfolio.wordpress.com

    #2
    I don't think there currently is an optimal way to achieve this effect right now, but I managed to get pretty good results with the technique explained in this thread.
    Basically, you pipe in a high frequency noise into the refractive index of your glass material. The only downside is the the material has some kind of latency (the refracted image is updated with a noticeable delay)

    Comment


      #3
      This is how that particular effect looks:


      And the shader network:


      You can alter the scale of the noise to change the frequency of the frosting.
      Last edited by scrcr0; 08-11-2014, 01:05 PM.

      Comment


        #4
        Crow87, I've noticed that if I tint the glass with some light color (e.g. a green somewhat lighter than the one you used) on one side I get the effect I want, but the opposite side look much less translucent. Are you experiencing the same?

        Comment


          #5
          Is your glass solid, or a single 2D plane?

          If its the latter, you may have to activate 'Two sided' for it to work correctly.

          Comment


            #6
            Sorry to bump this thread. I was working with this kind of material. Same settings as above and it worked poifectly. Until I came back in today at work. I checked the settings, I checked older files, everywhere the frosted effect is gone, its just plain see through material. Might there be a bug in the last update? Cant remember if I updated it friday and the glass was already messed up though.

            Comment


              #7
              can u fix it manuelly?

              Comment


                #8
                I actually found a way to get a smooth, frosted translucent glass effect to work very cheaply with static cubemaps on opaque surfaces. My methodology was:

                1 - Create and light a scene requiring a frosted pane of glass, but don't implement the glass in the model (yet).
                2 - Use a scene capture cubemap actor to generate a static HDR cubemap right on the window pane. This method only works with static cubemaps.
                3 - In Photoshop, shift the cubemap 256 pixels to the right. This should invert it. Blur the texture using gaussian blur as well.
                4 - Re-implement the glass material as a separate object. Do not let it cast shadows.
                5 - In the glass material, plug a reflection vector into the cubemap. The end result is, instead of reflecting the cubemap over the surface, it's refracting it, and should appear to almost match up with the environment on an opaque surface.
                6 - Multiply down the values and colors, and plug it into emissive. The more you lower the colors, the more opaque the glass becomes.
                7 - Use other material settings for recreating a reflective glass surface, like very low roughness and metallic set to 1. Balance the base color value with the emissive value to get both direct reflection and translucency.

                Limitations:
                *Not dynamic. Cannot be updated in realtime.
                *Requires blurring function to be performed in Photoshop instead of realtime in the editor: if you need to change how blurry the translucency is, you need to go back to the original scene capture in Photoshop.
                *Requires HDR photo editing suite with blurring capabilities.
                *Translucent effect not entirely accurate, and loses accuracy as players move away from the window (only completely accurate when player assumes same position as original scene capture location.

                Pros:
                *Extremely efficient: because it uses opaque surfaces, it's very easy to render with minimal instructions. And an effect like this can even work on unlit opaque surfaces. Like I said, EXTREMELY efficient!
                *Compatible with normal maps, but can also be used on smooth, flat surfaces.
                *Texture-based blurring can be more accurate than blurring functions in realtime.

                Most of my material setup is actually just to tile the normal map and soften it. The cubemap and reflection vector multiplied by a color is all you need in the shader for getting the translucent effect to work properly.

                Click image for larger version

Name:	glass1.jpg
Views:	1
Size:	79.4 KB
ID:	1072440

                Comment


                  #9
                  Originally posted by Kanizitas View Post
                  can u fix it manuelly?
                  Ive tried changing the settings and just now I tried to recreate the material from scratch but no frostedeffect. Can someone else confirm this as I think this might be a bug in the latest update of UED.

                  Comment


                    #10
                    Would a roughness map work? I used one in Substance Painter and it worked perfect for frosted glass, high metallic with a roughness map.

                    Comment


                      #11
                      A roughness map will get you the appropriate blurring on reflections, but not through translucency.

                      Comment


                        #12
                        Just found this. Looks awesome man.
                        Current Projects -Cat Interstellar
                        Lead Developer - Ionized Games

                        Comment


                          #13
                          Anybody know a way to use it in Mobile? I'm trying like crazy and there is no way.

                          Comment


                            #14
                            1) In Photoshop or Paint.Net, render clouds.
                            2)Add Blur.
                            3)Increase Contrast.
                            4) Create Normal Map.
                            5) Add Normal to Glass Material in Unreal 4. It will provide clean distortion

                            Adjust everything accordingly.

                            Comment

                            Working...
                            X