Announcement

Collapse
No announcement yet.

Glossy stuff

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

  • Glossy stuff

    Hi guys,

    I was doing some experiments with glossy reflections and found out something that may be useful when creating materials. Sorry if someone else has come across this before

    The standard algorithms for glossy reflections (phong, blinn, ward) are based on some generalization of the properties of rough surfaces. However, they are approximations and don't describe exactly the behaviour of real-world surfaces. All of them have the following problem:

    All three methods (phong, blinn, ward) can generate rays that point inside the surface itself, rather than bounce away from it. I haven't found a clear explanation of what is done in this case. Usually, two options are given:
    (a) Consider such rays "black".
    (b) Ignore these rays.

    There are drawbacks to each approach. With (a), the reflections may appear darker at grazing agles, because then a large amount of rays will be black. The (b) option also doesn't work very well, because sometimes (f.e. during photon tracing or light cache calculation) we need to trace only a single ray; what happens if it is one of those pointing into the surface? We could try and generate another ray until we find one in the correct direction, but that may slow down the rendering considerably.

    So I wondered, what actually happens in the real world? Obviously, in nature, all the rays bounce away from the surface, in the correct direction. But which direction exactly is it?

    So, the first thing that came to my mind is to simulate the actual glossy surface - with the bumps and all. So, I created a plane, converted it to NURBS with Delone triangulation approximation, added many many polygons to it (100,000) and applied a Displace modifier with a noise function (not the Noise map in 3dsmax though, but a real noise function, that returns randomly a value between black and white). Then I applied a perfectly reflective Faceted material to the surface, and put a cylindrical environment map.

    Then I viewed the surface from different angles:




    Here is also an .avi file:
    http://www.vrayrender.com/stuff/glos.../glossy_ex.avi

    There is one thing that you immediately notice (except the noise due to the small bumps) - the reflections become sharper as the surface is viewed at grazing angles. At very low angles the surface becomes mirror-like. And it is the very same surface! I was somewhat surprised to see that. And the direction of perfect reflection always points away from the surface. So, it seems the way to deal with the problem above is to avoid the problem in the first place

    The same thing can be observed in real-world cases as well - for example when viewing a coin from different angles.

    This behaviour can be simulated in VRay by putting a Falloff map in the Reflection glossiness slot of the VRay material. It's not quite exact, but it works pretty well, and seems to make glossy objects more reallistic too.

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

  • #2
    when you were a kid your teaches must have mentioned to you ohw brilliant you are.

    ---------------------------------------------------
    MSN addresses are not for newbies or warez users to contact the pros and bug them with
    stupid questions the forum can answer.

    Comment


    • #3
      Thanks for this scientific approach. I see that the transition form glossy to mirror-like is not linear. Do you have an idea how to describe the transition? I mena how can you realisticly describe the amount of glossyness in relation to viwing angle?


      --
      BTW:This was my approach a while back with brushed steel, with a download link for the material.

      EDIT: forgot the link
      http://www.chaoticdimension.com/foru...hlight=brushed
      You can contact StudioGijs for 3D visualization and 3D modeling related services and on-site training.

      Comment


      • #4
        I remember your mat Gijs...it was brilliant.

        ____________________________________

        "Sometimes life leaves a hundred dollar bill on your dresser, and you don't realize until later that it's because it fu**ed you."

        Comment


        • #5
          I thought this was a well known fact when using fresnell functions. In real life, there is no glossiness, only roughness on the surface and the strength (strength might also be a result of roughness and translucency combined)....and nearly all known materials can produce sharp-ish reflections under the right conditions. Actually....most organic based materials have a slight dispersion to the light reflected. I'm wondering, is that due to a slight refraction on the surface and back scatter of the light?
          Signing out,
          Christian

          Comment


          • #6
            Yeah, I suppose it is nothing new, but I was surprised to see it actually working I haven't really come across a description of how glossiness varies with viewing angle, and I'm doing a few more tests now...

            As for the dispersion, this is probably correct - since the light must go through the surface.

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

            Comment


            • #7
              Originally posted by percydaman
              I remember your mat Gijs...it was brilliant.

              Man, Every time I hear that word I see those guys now

              --Jon

              Comment


              • #8
                you aint the only one....I say "Brilliant!" to myself several times a day.... Is that signs of a healthy ego or a unhealthy one???
                ____________________________________

                "Sometimes life leaves a hundred dollar bill on your dresser, and you don't realize until later that it's because it fu**ed you."

                Comment


                • #9
                  not sure....

                  BRILLIANT

                  Actually I think Vlado's the only one who should be saying that to themselves around here

                  Is that commercial only in the US? It's not really that funny just...

                  BRILLIANT

                  --Jon

                  Comment


                  • #10
                    dude, how can you say its not funny... its so funny its.....you guessed it, BRILLIANT!
                    ____________________________________

                    "Sometimes life leaves a hundred dollar bill on your dresser, and you don't realize until later that it's because it fu**ed you."

                    Comment


                    • #11
                      I just stare at it and I promise I want to laugh but....

                      No, it just not THAAAT funny. But I laughed when you posted it...

                      I went "heh! you know that Percy's a funny guy"

                      Sorry for hijacking your thread Vlado, there should be a side thread in every post for background chatter

                      --Jon

                      Comment


                      • #12
                        well if you cant laugh at it, at least you laughed at me.... I think its about time to have me one before I head home for the day...
                        ____________________________________

                        "Sometimes life leaves a hundred dollar bill on your dresser, and you don't realize until later that it's because it fu**ed you."

                        Comment


                        • #13
                          Thanks

                          Have a good weekend.

                          --Jon

                          Comment


                          • #14
                            I actually had this VERY conversation with Paul Debevec regarding the preservation of rays based on a fresnel falloff. In a sense, think of it as such:

                            The rays become more and more glossy as they start to point towards us, to the point that they become 100% glossy (ei diffuse). Even a rough concete can turn reflective at a glacing angle with a bright backgournd. So in a sense the diffuse color should fade as the normals move away from us, the the specular (reflection) rays should pick up... I actually tried to do this in Vray putting fresnel fall off maps in the Reflection, diffuse color, and glossyness... it became very expensive, and somehow did not really look right. I have a feeling that it is because the tradition Blinn, phong, etc... BRDF can't really be used that way. Maybe we need a new Vlado BRDF...

                            Comment


                            • #15
                              This is all very interesting I never thought the reflection became less blurry at glancing angels but it kinda makes sense with the particles becoming more dense to our vantage point.

                              So in a sense the diffuse color should fade as the normals move away from us
                              I think this part should happen with a VRayMaterial just by increasing the reflections with a falloff.

                              Originally posted by cpnichols
                              Maybe we need a new Vlado BRDF...
                              Ok but we MUST call it the Brilliant BRDF

                              --Jon

                              Comment

                              Working...
                              X