Results 1 to 12 of 12
  1. #1
    Prisoner 849
    Join Date
    Feb 2010
    Posts
    957

    Default Glass refraction

    This may be common knowledge but I just figured it out so I thought I'd share.

    One of the downsides of using UDK for architecture was making realistic looking glass. And that comes from refraction. This obviously is not real refraction but the effect is very close and convincing. Connect fresnel to distortion. Default fresnel effect may be too strong so multiply with constant (0.3 seems to be good value) to reduce the effect.

    If you have better way or other ways to improve this, please share.

    Here's sample of the effect. It enhances the edge of the glass as well. This effect obviously looks much better in motion.

    Last edited by taz1004; 06-26-2012 at 10:46 AM.

  2. #2
    MSgt. Shooter Person
    Join Date
    Feb 2012
    Posts
    61

    Default

    That looks pretty great, and I'm sure in motion it is even better. I think it is one of those details that people just don't think about, but their eye picks up and it adds a whole new level of realism without them even realizing it.

  3. #3
    Prisoner 849
    Join Date
    Feb 2010
    Posts
    957

    Default

    Quote Originally Posted by Icemopper View Post
    That looks pretty great, and I'm sure in motion it is even better. I think it is one of those details that people just don't think about, but their eye picks up and it adds a whole new level of realism without them even realizing it.
    Yea, it's actually one of those things that people don't notice if it's there. But notice it if you don't have it. I had people mentioning that the glass looks flat before I used this. But now no one says anything about glass.

  4. #4
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    Denver, CO
    Posts
    417
    Gamer IDs

    Gamertag: K0par

    Default

    Wow! that's really nice looking. Good to see some traditional arc-viz in here. "Boring" shopping malls full of mudane details are the bread and butter of this industry, but all you see are the 'crazy' projects.
    As for the glass, I do something similar, my big difference is putting a less translucent edge on the glass. That really helps pop the shape of the glass:
    Last edited by Tom Shannon; 06-26-2012 at 07:00 PM.

  5. #5
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    Denver, CO
    Posts
    417
    Gamer IDs

    Gamertag: K0par

    Default

    Oh, there's another trick/info:
    The distortion node uses a vector to distort in the requested direction. That means a bare Fresnel into the distortion slot will create a distortion that always moves from 0,0 (black:0,0,0) to 1,1 (white:1,1,1), so it always shifts the sample up and to the right (shifting the image down and to the left). By multiplying the Reflection Vector by a fresnel, you can make your distortions a little more dynamic:
    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version
    Just Fresnel:
    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version

  6. #6
    Prisoner 849
    Join Date
    Feb 2010
    Posts
    957

    Default

    I used to add separate material on the edge too but extra draw call just for that seemed... I donno... inefficient. Also with real glass, depending on the angle, edge are sometimes darker and sometimes lighter.

    Reflection vector with fresnel sounds like a great idea. Will try it out.

  7. #7
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    Denver, CO
    Posts
    417
    Gamer IDs

    Gamertag: K0par

    Default

    Do you do a cube-map or just a simple projection map for your reflections?

  8. #8
    Prisoner 849
    Join Date
    Feb 2010
    Posts
    957

    Default

    I usually use cube map. I didn't know there was projection map in UDK.

  9. #9
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    69

    Default

    i made an UDK glass materials tutorial a while ago.
    could be useful in this thread

    http://forums.epicgames.com/threads/...terials-in-UDK

  10. #10
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    Denver, CO
    Posts
    417
    Gamer IDs

    Gamertag: K0par

    Default

    Everything I know about glass in UDK I learned from that tut!

  11. #11
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    69

    Default

    glad to hear that

  12. #12


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.