Announcement

Collapse
No announcement yet.

Custom BRDF or Schlick implementation... pretty please !

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

  • Custom BRDF or Schlick implementation... pretty please !

    This is something I'm sure has cropped up before but I'd like to see the thoughts of the dev's & end users on this.
    If it's not in the pipeline to be implemented what would be an ok work around for now ?

    A sort of mini disclaimer, this has only really cropped up due to my EXCELLENT fxphd class with Rob Harrington (MYA214).
    So I'm not claiming to be an expert on this, only that I can see the benefits of having this implemented, and if not, how we can get close enough.



    Just a recap if you've not used MR for some time.
    Under the BRDF settings in the MIA material you can choose between Fresnel, or unchecking that and using what seems like the Schlick implementation instead.

    Why would you want this ?
    It's purely for better control, more so if we can input the numbers ourselves (like the MIA mat), and especially useful for metal approximations compared to Fresnel.

    Simple IOR - Fresnel (plastics/wood/organic )
    Complex IOR - Schlick/Custom (metals)


    Now this isn't in anyway to suggest that work done so far doesn't look good, of course not, just that this would be a good addition to have in our vray toolkit !


    If you check out the graphs below, you'll see it a bit clearer what is going on.
    (permission has been granted to post screen shots from my fxphd class)

    Click image for larger version

Name:	BRDF_01.jpg
Views:	1
Size:	328.0 KB
ID:	873558

    In this first graph, using pure copper as an example, and some data from http://www.refractiveindex.info
    The Wavelength values have been changed in accordance with our R/G/B values (top left of the graph) before generating the n (Refractive index/IOR) and k (Extinction coefficient/K) values.
    This data is then represented in the corresponding red/green/blue curves in the left graph.
    The 'Schlick' value is just flat lined to make it easier to see what's happening in this first screen shot.


    Click image for larger version

Name:	BRDF_02.jpg
Views:	1
Size:	327.3 KB
ID:	873559

    In this second shot, we want to get the Schlick curve following the red curve of our data, as close as it can be.
    Not bad, it's pretty close.


    Click image for larger version

Name:	BRDF_03.jpg
Views:	1
Size:	325.0 KB
ID:	873560

    Now in this final screen shot, I have reset the Schlick curve to flat line again and now have edited the B curve (just to show as an example).
    Of course, now I'm trying to match the blue curve to the red one.
    You see where it's value in the IOR box is at 60 - but look at the curve and how it drastically dips !
    To visualise that, the reflections would be getting weaker, right until the final angle of it, then it shoots back up to 1.

    So that number is like us in VR setting the Fresnel IOR to 60 (just so you know what I'm on about).


    Of course these numbers are for very pure materials, and we're likely to have scratches and other things messing it up. It's merely a guideline and interesting to see what is going on.
    Something I know a few people would like to see implemented, for us to have some kind of control over the BRDF, if that's not going to happen - is there a way we at least get a little closer ?


    I did have a brief chat with Dimitar 'Jimmy' Krastev last week in London about this but it seems like 3dsMax perhaps has something but not Maya unfortunately (yet).

  • #2
    uhhh this would be awesome.. I've been going through that class as well and the results are breathtaking. I second the suggestion!

    Comment


    • #3
      Originally posted by RobPhoboS View Post
      Something I know a few people would like to see implemented, for us to have some kind of control over the BRDF, if that's not going to happen - is there a way we at least get a little closer ?
      What kind of control would you like to see? V-Ray uses the Fresnel formula by default (not Schlick approximation), and you can use a Ramp texture to get whatever curve you need for ultimate control (in 3ds Max this is done through the Falloff texture). Other than that, there are plans to add support for complex IOR as it does help to represent metals somewhat better.

      Best regards,
      Vlado
      I only act like I know everything, Rogers.

      Comment


      • #4
        Originally posted by vlado View Post
        What kind of control would you like to see? V-Ray uses the Fresnel formula by default (not Schlick approximation), and you can use a Ramp texture to get whatever curve you need for ultimate control (in 3ds Max this is done through the Falloff texture)
        .

        Where would you suggest plugging a ramp in the reflection ?
        This is something I suspected we could do but as of yet, I'm not sure what the ramps would look like until I start playing. Perhaps the best way for now would be to texture a simple object in Max and try to replicate the Schlick approximation in Maya by trial and error ?

        Originally posted by vlado View Post
        there are plans to add support for complex IOR as it does help to represent metals somewhat better.
        That's very nice to hear it's being looked into

        Comment


        • #5
          Where does one plug the ramp texture for further control? I can't seem to figure out how?

          Comment


          • #6
            You need to plug the info sampler node in a ramp (facing ration in Vcoord). then plug the ramp in the reflection colour.

            I have to say that a curve representation of the reflection fall off would be really usefull.

            Cheers,

            Yannick
            Portfolio: http://www.cgifocus.co.uk

            Comment


            • #7
              Originally posted by Yannick View Post
              You need to plug the info sampler node in a ramp (facing ration in Vcoord). then plug the ramp in the reflection colour.
              Thanks for the clarification, I thoughts thats where it would go since I sometimes use the vray fresnel node in there.
              Guess it's time for some testing !

              edit:
              Just having an initial play and I can see that the results are definitely better than ramping the fresnel numbers up really high.
              What I'll probably do is create a generic scene and material with MR+Schlick, then proceed to imitate it with the ramp & vray.
              Last edited by RobPhoboS; 09-11-2011, 11:13 AM.

              Comment


              • #8
                Great job posting this request, Rob. I have yet spent enough time the course materials to understand the whole thing clearly. I bet you have chewed through the videos and learned a whole lot from it. I too really hope there is a curve representation thing we Maya users can tweak the BRDF, instead of using the vertical Ramp. Better yet, like Vlado mentioned, having the support of complex IOR in VRay in the near future.

                cheers,
                Jason
                always curious...

                Comment


                • #9
                  Anyone use the TexFalloff plugin? I saw a carpaint that had that setup, where I later put the vray fresnel in the second color slot a got some nice results.
                  ...
                  edit... ok.. i found it..... Dryzen.com has the carpaint mat.... absolute car paint it has the TexFalloff in it, but I'm still trying to figure out how to implement it. Nothing on spot3d
                  on how to use it that I can find.
                  Last edited by refract; 14-11-2011, 07:14 PM. Reason: update

                  Comment


                  • #10
                    Just thought I'd check in again to see where CG is in terms of complex IOR's ?
                    Is it still a possibility we'll see something implemented ?

                    Many thanks !

                    Comment


                    • #11
                      Yes, I'm interested in this too..

                      Comment


                      • #12
                        Something I was whining about from a looong time now... in my case I was asking to get an option to load a custom ior data from scans...

                        In any case I would not plug the ramp in to reflection. I would plug the ramp in to the Fresnel parameter. Set up the ramp to be black a 1.4 brightness for minimum ior, and maximum ior 2/3 or what we want it to be then I would use sample node to control its coordinates thats if IOR can read a rgb and control colors. If it cant then I guess u have to stick it in to ur reflection and use don't use Fresnel options at all.

                        Keep in mind that when you try to reproduce a graph of reflection of RGB spectrum you are doing it in a very inaccurate way. The graphs that are available are usually smooth and lack a lot of detail. In reality I think that each RGB curve would be very micro noisy going up and down here and there. Not sure I have no access to pure raw IOR data to confirm it.
                        Last edited by Dariusz Makowski (Dadal); 22-11-2012, 04:20 AM.
                        CGI - Freelancer - Available for work

                        www.dariuszmakowski.com - come and look

                        Comment


                        • #13
                          Hey DADAL,

                          Now that I've gotten some time to play with rendering again, I shall try this out - thank you !
                          I wonder if we'll see something in the next version ?

                          Comment


                          • #14
                            Heya

                            Errr next version what version ? You lost me
                            CGI - Freelancer - Available for work

                            www.dariuszmakowski.com - come and look

                            Comment


                            • #15
                              Originally posted by DADAL View Post
                              Heya

                              Errr next version what version ? You lost me
                              Hopefully the next version/update to VR

                              Comment

                              Working...
                              X