Home Technical Talk

Fresnel Textures

does anyone have any info or procedures on painting fresnel texture maps for games?

Replies

  • arshlevon
    Offline / Send Message
    arshlevon polycounter lvl 18
    i have no idea what that means, usually fresnel is based on angle, so its done in a shader not a texture.
  • Essynim
    yes, Fresnel is done through a shader but a fresnel texture is one which designates the area of a model which recieves the fresnel. I'm wondering if anyone has any resources for good schools of thought when tackling fresnel textures. do we just treat it like a mask, like a specular map, do colors effect the outcome or is it all greyscale, what other things can help tie into the texture, some good examples of fresnel done wrong and right and why...this kind of stuff
  • Shadownami92
    Offline / Send Message
    Shadownami92 polycounter lvl 7
    If anything I think you would just use a mask of some sort, probably greyscale. Never heard of there being any special texture to use for masking our the fresnel effect though.
  • arshlevon
    Offline / Send Message
    arshlevon polycounter lvl 18
    you can do anything with fresnel in a shader. think of your fresnel effect as a mask, now you can take that mask and do anything you want to it. you can tint it all a color, you can use a diffuse cube map to color fresnel like your environment, i have used AO maps to mask fresnel as you mentioned so you dont get anything funky going on in the nostrils or inside the lips, usually it comes down what looks right for your game, and how much is it going to cost performance wise.
  • Vailias
    Offline / Send Message
    Vailias polycounter lvl 18
    entirely dependent on the material look you're trying to achieve.

    In the real world the fresnel effect is always a reflection of the ambient environment. Some things exhibit more or less of a fresnel reflection based on their low level molecular structures.

    So if you want to paint a map for controlling the fresnel effect of your model in different areas, then you could get away with a simple greyscale mask and a cubemap. If you're looking for a particular artistic feel you could include a RGB components to have certain areas have different fresnel/rim lighted colors and mask the strength of it all with the alpha channel.

    Really the virtual fresnel effect is just another piece contributing to the visual aesthetic. So what you do with it depends entirely on what your end product is going to be.
  • Mark Dygert
    I use it all the time for rim lighting. I used shaderFX and max2009 on this guy to get a realtime Fresnel viewport shader working, its the green glow around the outer rim. The camera/view angle is used with a gradient ramp to control how much of the effect is scene. On the ShaderFX site there was a pretty good tutorial that did a pretty good job of explaining it. It shouldn't be that hard to find.

    You can do the same thing in UDK, Source, Crytek, Max and Maya, all of them have plenty of documentation included in the apps and online to get them hooked up and working how you need.

    The question isn't where you can go to learn more about the effect that's the easy part, its using it wisely and to great effect when needed and that just takes practice after the learning is done.

    This page has TONS of info on it and its a good place to start.

    Personally it sounds like you want someone to write you a paper on Fresnel...
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    I was able to create a Fresnel effect in my shader for my diffuse channel using a RGB map as a masking inside ShaderFX.

    If you want to take a look, here it is: http://www.polycount.com/forum/showthread.php?t=85641

    I plan on expanding the Fresnel also to Specular and SI, but it's the same idea as the RGB map, you could also add another masking map to the final node on the RGB map and add/multiply it so you in theory have 4 maskings (5 if you plan on including Alphas).

    As Mark pointed out, start on Google and search a few papers and/or UDK tutorials. Once you have the basics down, adding a mask will be pepper easy.
  • Scruples
    Offline / Send Message
    Scruples polycounter lvl 10
    A very old school way of getting a fake fresnel in game was to alter your mipmaps to be brighter as the mipmap got smaller, this is not really worth it because of the other problems it causes and looks like crap....just thought I would mention it :D, (works pretty well for grass admittedly).
Sign In or Register to comment.