Announcement

Collapse
No announcement yet.

How to use stochastic flakes?

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

  • How to use stochastic flakes?

    Hi,

    I can not figure out how am I supposed to use stochastic flakes? I assumed it would work in the same manner as VrayFlakesMTL, which you can just plop on top of the base material with VrayBlendMTL, but stochastic flakes material comes with it's own constant reflective layer that I can not figure out how to turn off and my material is turned pretty much into chrome. How do I get only flakes component from stochastic flakes material?

    Thanks in advance.

  • #2
    Well, I just blend the flakes on top of a base layer which has no reflection, just diffuse color. The flakes get blended with a fresnel, it works quite well! The preview on the material editor ball might look wrong, you have to test in on the object. Maybe I can post a screengrab tomorrow and a preview of the results of my tests.
    https://www.behance.net/Oliver_Kossatz

    Comment


    • #3
      The FlakesMTL is just a standard shader with a procedurally generated, discretly sized, pre-baked, pre-filtered, memory hungry normal map attached to it.
      The StochasticFlakes Material is a wholly new BRDF type: more specifically it's a multi-scale, probabilistic, microfacet brdf which requires no pre-computation and is able to resolve long-tailed behaviours (Say, GGX) and converge to either GGX or Beckmann when seen from far enough (hence the multi-scale tag.).

      So, your flakes count compared to whatever UV settings you have is clearly too high, and all you see is the converged shader.
      The attached image shows a good starting point for a sphere of 1mt made to fit a perspective view ("z" key) and rendered at 2k.
      It will show colored flakes (so you won't mistake them for noise), and will work with ANY other geo without a care for its UV, at the same scale.
      Lower or raise the flakes count, or the flake scale, to change the look to suit your needs.

      Click image for larger version

Name:	1mt_defaults.png
Views:	1
Size:	95.2 KB
ID:	866398

      Since you'll likely be spending some quality time here
      https://docs.chaosgroup.com/display/...asticFlakesMtl
      be kind and let us know what's not obvious in the way the help docs were written, so we can make them better.
      Lele
      Trouble Stirrer in RnD @ Chaos
      ----------------------
      emanuele.lecchi@chaos.com

      Disclaimer:
      The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

      Comment


      • #4
        Good post, Lele.

        Comment


        • #5
          Hehe, thanks for the thorough explanation, although next time it would be better to read more than just the title of my post

          It's not that I do not understand settings of the flakes, it's just that regular FlakesMTL comes only with actual layer of flakes. So if you put that as a coat on your base material, you will get just flakes.

          Stochastic flakes on the other hand come also with their reflection layer, If you create stochastic flakes material, you see in preview that it looks like a chrome. It has its own reflection layer. So if you put that on top of already reflective material, then you turn your material in pretty much metal.

          So there's this workflow difference, that is not documented anywhere, which dictates that if you use regular FlakesMTL, you can use it on top of a reflective material, where as if you use Stochastic flakes, you have to put them on top of a material that has no reflection, because reflection gets handled by stochastic flakes layer.

          That's what confused me.

          Comment


          • #6
            Originally posted by Recon442 View Post
            Hehe, thanks for the thorough explanation, although next time it would be better to read more than just the title of my post
            Impressively, at the net of your well renowned attitude limits, and generally horrible manners, i HAVE read the post, multiple times, and still couldn't figure out what you wanted a reflective flakes BRDF to behave like.
            There is nothing to specify to anyone which read the docs: one is a BRDF, the other isn't.
            For example:
            "The VRayStochasticFlakesMtl material can be used to simulate car paints, snow and other glittery materials. It works by simulating at render time the aggregated effect of a large number of mirror-like flakes scattered over the surface of an object."
            "VRayFlakesMtl is a material that simulates the metallic flakes found in car paints. It is a complex material generated by the mixing of several textures and can be used in blend materials to add metallic flakes to other shaders."

            So i thought that that specifically wasn't the issue, and thought that perhaps you were dealing with the converged scale of the BRDF.
            The flakes shader has no "implicit" reflection layer, it either hits a flake, or it's black.
            You can start from the sample i showed you above, and lower count and blur (to 1 and 0, respectively) and lo! and behold, black.
            I have a feeling it will solve none of your issues, anyways.
            Red reflective coat, blue flakes, white dome:



            Click image for larger version

Name:	youdontsay.jpg
Views:	1
Size:	458.0 KB
ID:	866452
            Lele
            Trouble Stirrer in RnD @ Chaos
            ----------------------
            emanuele.lecchi@chaos.com

            Disclaimer:
            The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

            Comment


            • #7
              I did not intent to get personal or anything like that. I genuinely assumed you skipped the text as it was just short and assumed it's just more elaborate version of the title. I am often guilty of doing that myself. That's why I put the smiley on the end, so it doesn't appear hostile or anything like that I don't perceive it as anything bad. I myself often rush to answer simple questions myself, knowing that answer is easy, before realizing the original poster wanted something more complex.

              As I said, in this case, main thing that confused me is that way Stochastic flakes are used is very different to the way FlakesMTL is used. I know the basic theory in difference between them. I just did not realize the workflow of stochastic flakes assume you will put it on top of a diffuse material with no reflection of its own.

              Comment


              • #8
                Originally posted by Recon442 View Post
                Hi,

                I can not figure out how am I supposed to use stochastic flakes? I assumed it would work in the same manner as VrayFlakesMTL, which you can just plop on top of the base material with VrayBlendMTL, but stochastic flakes material comes with it's own constant reflective layer that I can not figure out how to turn off and my material is turned pretty much into chrome. How do I get only flakes component from stochastic flakes material?

                Thanks in advance.
                MtlBlendMtl

                base MTL > Standard Vray matterial gray
                1st coat > stochastic with ur settings > MASKS > Use falloff or what ever you like over Base. In fresnell mode.
                2nd coat > stochastic with ur settings > MASKS > Use falloff or what ever you like over Base. In fresnell mode. > Optional
                3rd coat > Standard Vray matterial. Black Diffuse. 100% reflection 0% fresnell. Disable it. Make it full chrome. > MASK > plug in falloff mask in fresnell mode.

                Adjust reflection color in Stochastic shader for paint color - more or less...

                Then balance 1snd and 2nd flakes together to get nice metallic look keeping in mind some level of diffuse depending how much you want...

                Does this help ?
                CGI - Freelancer - Available for work

                www.dariuszmakowski.com - come and look

                Comment


                • #9
                  Originally posted by Dariusz Makowski (Dadal) View Post
                  MtlBlendMtl

                  base MTL > Standard Vray matterial gray
                  1st coat > stochastic with ur settings > MASKS > Use falloff or what ever you like over Base. In fresnell mode.
                  2nd coat > stochastic with ur settings > MASKS > Use falloff or what ever you like over Base. In fresnell mode. > Optional
                  3rd coat > Standard Vray matterial. Black Diffuse. 100% reflection 0% fresnell. Disable it. Make it full chrome. > MASK > plug in falloff mask in fresnell mode.

                  Adjust reflection color in Stochastic shader for paint color - more or less...

                  Then balance 1snd and 2nd flakes together to get nice metallic look keeping in mind some level of diffuse depending how much you want...

                  Does this help ?
                  Thanks mate for the suggestion, i noticed ur car renderings are really nice. May i ask what do u mean by MASKS (i think ">" should be ":" so its fresnel?). Also why the two layers of stohastic? Never used it so far i need try it so i apologise for ignorance without even testing it Also what is ur opinion for vray car paint? Any adv/disadv in comparison to stohastic flakes setup? cheers
                  www.yellimages.com

                  Comment


                  • #10
                    Hey
                    Masks > BlendMtl has 2 slots per material, 1 on left where you plug material, 1 on right where you put mask. If u make matterial chrome and want it to be clear coat you need to add a mask with fresnell in it (fallof map with fresnell setting) to mask slot. Then you have clear coat.

                    Usually you want at least 2 layers of metalic paint to get nice effect.

                    I dont use vray car paint. I blend paints. Its older, heavier to render memory wise from what I remember.
                    CGI - Freelancer - Available for work

                    www.dariuszmakowski.com - come and look

                    Comment


                    • #11
                      All correct.
                      Further, there's a texturable filter color (labelled "reflection Map) in the stochastic flakes shader, which will happily (if not per-microflake) accept a fresnel ramp.
                      Lele
                      Trouble Stirrer in RnD @ Chaos
                      ----------------------
                      emanuele.lecchi@chaos.com

                      Disclaimer:
                      The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                      Comment


                      • #12
                        Thanks ye i know how blend works, just didnt understand the way u explained it.
                        Well if u could give me some feedback on this image. This is a quick test with vray carpaint and seems to work alright from scratch quality wise. How would u improve that with 2 layers of flakes instead of one? I mean, despite hardware resources, visually why would i use 2 flake layers? What is the difference between these two, is the one with larger flakes and the other smaller? And how they would blend? with different falloff angles i suppose? I m trying to understand the properties of a realistic car paint.
                        thanks
                        Attached Files
                        Last edited by thanulee; 12-02-2017, 04:45 AM.
                        www.yellimages.com

                        Comment


                        • #13
                          Originally posted by ^Lele^ View Post
                          All correct.
                          Further, there's a texturable filter color (labelled "reflection Map) in the stochastic flakes shader, which will happily (if not per-microflake) accept a fresnel ramp.
                          I don't think you should ever put fresnel ramp in it. Maybe perpent one for different look. But stochastic should already be fresnell based internally. I might be wrong tho ? Can any dev confirm if there is already fresnell calc inside the code or we need to add it on top ?

                          Regards
                          Dariusz


                          Originally posted by thanulee View Post
                          Thanks ye i know how blend works, just didnt understand the way u explained it.
                          Well if u could give me some feedback on this image. This is a quick test with vray carpaint and seems to work alright from scratch quality wise. How would u improve that with 2 layers of flakes instead of one? I mean, despite hardware resources, visually why would i use 2 flake layers? What is the difference between these two, is the one with larger flakes and the other smaller? And how they would blend? with different falloff angles i suppose? I m trying to understand the properties of a realistic car paint.
                          thanks
                          Well you can use 2 flake maps for creative purpose. Make 1 flake fine and smooth, second flake corse and blingi, then blend them howerver you like...
                          Last edited by Dariusz Makowski (Dadal); 12-02-2017, 08:27 AM.
                          CGI - Freelancer - Available for work

                          www.dariuszmakowski.com - come and look

                          Comment


                          • #14
                            Originally posted by Dariusz Makowski (Dadal) View Post
                            I don't think you should ever put fresnel ramp in it. Maybe perpent one for different look. But stochastic should already be fresnell based internally. I might be wrong tho ? Can any dev confirm if there is already fresnell calc inside the code or we need to add it on top ?
                            Well, you should never take my word for it (not even when there's my name too on the paper on the subject.), but it's quite obvious without looking at the code: there is no IoR control.
                            A simple test with a sphere and white dome will show you all you need to see, and verify (should the material editor preview not be obvious as it is.).
                            In the manual, while compact, the description seems exhaustive:
                            It works by simulating at render time the aggregated effect of a large number of mirror-like flakes
                            Asen (or Vlado) will be able to tell you all you need about implementing a per-flake fresnel term under a stochastic distribution, i'm sure.
                            Lele
                            Trouble Stirrer in RnD @ Chaos
                            ----------------------
                            emanuele.lecchi@chaos.com

                            Disclaimer:
                            The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                            Comment


                            • #15
                              Originally posted by ^Lele^ View Post
                              Well, you should never take my word for it (not even when there's my name too on the paper on the subject.), but it's quite obvious without looking at the code: there is no IoR control.
                              A simple test with a sphere and white dome will show you all you need to see, and verify (should the material editor preview not be obvious as it is.).
                              In the manual, while compact, the description seems exhaustive:
                              Asen (or Vlado) will be able to tell you all you need about implementing a per-flake fresnel term under a stochastic distribution, i'm sure.

                              Gacia thanks ! I had no idea that there was no fresnell internally done. Mmmm I may need to relook my shaders... thanks for info !

                              Wait Lele you working for Chaos ? Thats new right? o.O Or different Lele
                              Last edited by Dariusz Makowski (Dadal); 12-02-2017, 03:27 PM.
                              CGI - Freelancer - Available for work

                              www.dariuszmakowski.com - come and look

                              Comment

                              Working...
                              X