Home Technical Talk

BRDF - anyone using this?

I just got handed a new BRDF-like lighting option for our realtime shaders, wondering if anyone else has played with and/or studied BRDF, I'm wondering what other ways artists might be using it.

I've been given three controls...

X axis of the bitmap is for controlling the incidence that normals reflect light (bitmap left edge is perpendicular to light direction, right edge is parallel). So a left-to-right black-to-white gradient is regular diffuse lighting, while the inverse is kind of like rim lighting (light appears on surface where normals are perpendicular to light direction).

Y axis of the bitmap is for controlling the compass direction that normals reflect light, bitmap bottom edge is 0°, top edge is all the way around the clock at 360°. So if I want an anisotropic effect, like specular for hair or those groovy Christmas ornaments then I give the bitmap some white bands at 3 o'clock (1/4 down the bitmap) and 9 o'clock (3/4 down). So then the light only reflects from the polygonal surface when the normals face those directions relative to the light.

Last control is an exponent number, which takes that bitmap and alters it for controlling the specular part of the light. The bitmap without the exponent is used for regular diffuse lighting, then the bitmap is altered by the exponent to make a tighter (or wider) control for the specular.

Sorry that's a bit long-winded, but are there any artists playing with BRDF? How have you been controlling it? Wondering if there's a better method...

Replies

  • Xenobond
    Offline / Send Message
    Xenobond polycounter lvl 18
    Uhh.. what is BRDF?
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    It's a bidirectional reflectance distribution function, of course.

    Although I've never heard of it tongue.gif
  • Kevin Albers
    Offline / Send Message
    Kevin Albers polycounter lvl 18
    I worked with an engine a couple of years ago that used similar shader tech. It could do some cool stuff that I hadn't seen in realtime engines (and still rarely see), such as iridescence. You can make some trippy shader effects for non-realistic materials suitable for fantasy/sci-fi easily. I assume that once you work with it for a while it's possible to build a small library of presets for different surface types (metallic, etc) that help assets look a lot less like shiny plastic. Overall it seemed very cool and usefull. I don't have extensive experience with it, though.
  • JordanW
    Offline / Send Message
    JordanW polycounter lvl 19
    I havent had any experience with this although i do remember the ESC guys talking about it a couple years ago at Siggraph, do you have any links to real time stuff we could play around with?
  • Eric Chadwick
    Thanks guys.

    Well I just got the heads-up about it, so now the exporter guys have to implement it in their code before I can really play with it.

    Also since it uses a bitmap, we can affect the red, green, and blue channels of the incoming light separately. Haven't decided what to do with the alpha channel yet, but probably should since we have it just sitting there. Maybe replace that exponent number with the alpha, per-pixel control and all that.

    Here's some info, and a sample realtime app (right-click for options).
    http://developer.nvidia.com/object/BRDFbased_Lighting.html
  • Downsizer
    Offline / Send Message
    Downsizer polycounter lvl 18
    Seems like a lot of work for the complete lack of comparision in lighting models on the nvidia site. I can plug HLSL into my engine I suppose, but are there any more viable resources for this? I'm at work, cant run the demo. Also if it's just a teapot in black space, is the result really noticable?
  • Eric Chadwick
    Up to you I guess, whether you want it or not. I'm already being handed it, so my job is to figure out how artists are going to want to use it, and to help them realize it.

    It basically helps control what direction the lighting is reflected off the surface. So I can use it to do fancy car paint, gold/brass/copper, anisotropic bands on CDs, buffed metal, soft fuzz like a muppet, silk/satin, etc.

    Some screencaps of the NVIDIA demo.
    http://www.ericchadwick.com/examples/images/brdf_nvidia.jpg

    The more I'm reading up on it, the more I'm liking it. The gradient map idea might be weird, but I guess like Kevin says I'll just have to play with it, make some examples that other artists can use as a base.
  • Downsizer
    Offline / Send Message
    Downsizer polycounter lvl 18
    Thanks for the shots. I can see where this would be usefull, especially in use with a spec or normal map to simulate metal or other reflective surfaces. I'm working on a SHMUP right now, that is shader intensive. This would be great for a few of the ships if I can get a brushed metal look going.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    we had it in rendering classes, I suspect a tool that generates the output bitmap would be best.

    A tool with like a normal/reflect handle and some sort of shinyness slider. so that you can have a graphical representation of what it really does... although this of course limits the customization a bit. but I think with proper modifiers for those "vector handles" it would be easier than purely painting colors.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    CrazyButcher - there's an idea for a program you can write, then smile.gif
    Be a hero!
  • Eric Chadwick
    I'd welcome a tool like this, though it seems like most devs would use straight up math rather than bitmap-controlled math, so I don't know if it'd be useful for others.

    I'll probably start with just multiplying a few Gradient Ramps together, horizontal * vertical. Should be pretty easy to control.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    yeah after all the brdf texture is only there to store math results, not really design a lot. so you could enter different brdf functions, there should be a lot of "values" floating around and then straight compute it.
  • Xenobond
    Offline / Send Message
    Xenobond polycounter lvl 18
    Whew! Those were some long and dry reads, but I think I get the idea now. The images helped out, too. Those teapots almost looked good enough to eat.
  • motives
    Offline / Send Message
    motives polycounter lvl 18
    we had kevin bjorke from nvidia her at dice yesterday talking about a bunch of shader stuff including BRDF..

    Looks pretty cool. was nice you could paint the maps in realtime and see them change "on the fly"
  • Eric Chadwick
    Oh that's cool, I appreciated the scripts he made for Photoshop, nice guy.

    How were the bitmaps setup for his app? Like the one I've been given? Or...?
  • motives
    Offline / Send Message
    motives polycounter lvl 18
    I think he used the FX Composer but im not sure if the BRDF part was something he added in there himself. Im in no means a tech-guy so i dont really know smile.gif
    Basically you loaded up a sample model and your bitmaps and then you could change brushsize and color, paint and watch your changes on the model.

    It was pretty crude tho, but i guess with some tweaks it could be turned into a real handy app.
Sign In or Register to comment.