Announcement

Collapse
No announcement yet.

Feature request: V-ray cloth/fabric material

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

  • Feature request: V-ray cloth/fabric material

    In CG animations one of the most common materials is cloth/fabric. Like skin or hair, fabric deserves it's own dedicated shader.

    It is possible, to some degree, to get a VrayMtl to look like cloth, but it has its limitations. One limitation is particular is with the fine detail in the thread pattern. When using a bump map do achieve this, one gets a hard line where the diffuse moves from lit to shadow, rather than a soft diffuse transition. as seen here:

    Click image for larger version

Name:	vray3.2.JPG
Views:	1
Size:	47.3 KB
ID:	883586

    One approach to this is to use a BTF (bidirectional texture function) for the close-up weave detail, coupled with a BRDF that models fabric from afar. For example this paper: http://www.graphics.cornell.edu/pubs/2006/IM06.pdf.

    This BTF + BRDF approach, if I am understanding it correctly, could be a method of getting the fine-detail weave patterns you see in films like Pixar's Up and Toy Story3:

    Click image for larger version

Name:	Carl_ties_031.png
Views:	1
Size:	273.9 KB
ID:	847313

    Click image for larger version

Name:	cloth.png
Views:	1
Size:	360.9 KB
ID:	847294

    At any rate... regardless of the approach taken to the shader itself... it would be awesome if there was a Vray material dedicated to emulating common fabric which was able to both get the appearance of fabric from a distance as well as getting up-close details of the weave too.

    Again, I'm sure there are many different solutions to this, and the above paper is just one. I'd love to hear about anything the Chaos team has cooking in regards to a dedicated fabric material for Maya!

  • #2
    Sure is quiet in here...

    Comment


    • #3
      Thank you for the detailed explanation. This paper is surely worth looking into.
      I'm curious if you tried to use displacement instead of a bump map in order to get a soft diffuse transition. This might be a good fit for 2D displacement as well.

      Best regards,
      Mihail
      V-Ray for Maya dev team lead

      Comment


      • #4
        Hi Mihail,

        Yes we tried displacement too. No joy. However I think I found a fix: The error occurs when using Maya's viewport subdivisions. If you instead apply Vray subdivisions attributes to the geo, the error is gone. Yay!

        On a related note, there is a cloth material plugin for Vray for Max called Thunderloom. This is apparently what Ikea uses to render cloth with Vray. Anyway I spoke with the developer and he said he would be open to creating a plugin for Vray for Maya, but had some questions about this. Would it be possible for me to connect the two of you, perhaps via email?
        Last edited by sharktacos; 10-04-2017, 11:02 AM.

        Comment


        • #5
          Yes, send it to mihail.djurev (at) chaosgroup.com
          V-Ray for Maya dev team lead

          Comment


          • #6
            Email sent. Thanks Mihail!

            Comment


            • #7
              Originally posted by sharktacos View Post
              Hi Mihail,

              Yes we tried displacement too. No joy. However I think I found a fix: The error occurs when using Maya's viewport subdivisions. If you instead apply Vray subdivisions attributes to the geo, the error is gone. Yay!

              On a related note, there is a cloth material plugin for Vray for Max called Thunderloom. This is apparently what Ikea uses to render cloth with Vray. Anyway I spoke with the developer and he said he would be open to creating a plugin for Vray for Maya, but had some questions about this. Would it be possible for me to connect the two of you, perhaps via email?
              I second that. A good fabric shader would be really handy.
              www.mirage-cg.com

              Comment


              • #8
                So an update: I've been testing the Thunderloom fabric material for Vray in Maya, and it's pretty awesome. However one big issue is that it does not work with bump/normal maps. It would be very important to have bump/normal mapping to capture subtle creases and folds and wrinkles in clothing.

                I tried connecting it to a VrayBumpMtl and this did not work either, so there appears to be something about the shader that is not playing nice with the VrayBumpMtl. So I'm hoping that perhaps Vlado or one of the super awesome Chaos team coders might be able to take a look at the code on Github and maybe fix it?

                Vlado was proposing that this shader might be something that could ship with Vray in the future, so... how about it? It's almost all the way there, just needs a little love. Here's hoping!

                Comment


                • #9
                  I thought folks might enjoy seeing some Vray renders of the Thunderloom shader. This is of a knit cotton shirt:





                  and a close-up where you can see the thread detail.

                  Comment


                  • #10
                    There are some issues with the Thunderloom shader currently that I am hoping the Chaos folks might be able to help with (specifically with the diffuse), but all in all it looks like a pretty awesome shader that allows an artist to make many types of different fabrics, both woven and knit, using the shader in conjunction with the WIF pattern editor.
                    Last edited by sharktacos; 09-08-2017, 10:09 PM.

                    Comment


                    • #11
                      Here's another example, this time of a twill weave cotton dress shirt.

                      We begin with photos zoomed to see the thread detail of the weave pattern.

                      Click image for larger version

Name:	
Views:	0
Size:	521.2 KB
ID:	963856

                      This is then made into a WIF pattern using the Pattern Generator.



                      And the resulting render in Vray

                      Click image for larger version

Name:	
Views:	0
Size:	1.24 MB
ID:	963858
                      Attached Files
                      Last edited by sharktacos; 12-08-2017, 10:36 AM.

                      Comment


                      • #12
                        What's great about the use of WIF files in the Thunderloom shader is that it allows you to create whatever weave pattern you want, thus allowing the shader to create any type of woven or knit fabric (t-shirts, denim pants, twill jackets, etc) as well as to create whatever weave pattern is desired (stripes, plaid, etc) doing so at the thread/yarn level.

                        Comment


                        • #13
                          This looks very good. Are bump and normal maps working yet?

                          Bruce Allen
                          Senior Theatrical Designer & TD - mOcean

                          Comment


                          • #14
                            Originally posted by Bruce Allen View Post
                            This looks very good. Are bump and normal maps working yet?

                            Bruce Allen
                            Senior Theatrical Designer & TD - mOcean
                            They work in the standalone and Max version of the plugin, but not in Maya yet. It's listed currently as a bug on Github:
                            https://github.com/vidarn/ThunderLoom/issues
                            Last edited by sharktacos; 11-09-2017, 06:12 PM.

                            Comment


                            • #15
                              Is a compiled version of the plugin available anywhere?

                              Cheers, Florian
                              Florian von Behr
                              CG Supervisor
                              The Scope GmbH
                              Behance

                              Comment

                              Working...
                              X