Announcement

Collapse
No announcement yet.

VRayLayeredTex not working

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

  • VRayLayeredTex not working

    So i have seen a lot on this issue in the forums already regarding VRayLayeredTex. I really like the idea of using overlay to add grunge maps to base textures, something that mayas native layered texture doesnt support. But it simply does not work. i thought it could be colour management issue but its the same useing mayas colour management or manually adding gamma correct tick box in the texture node vray rollout menus.

    I have two textures conrete, and overlay which is streaky dirt it is 50% grey apart from the streaks. In practise on overlay 50% is transparent right?

    In the following images i am manually gamma correcting the texturenodes


    mtl_01.jpg - concrete
    Click image for larger version  Name:	image_56035.jpg Views:	1 Size:	81.1 KB ID:	1065818


    mtl_02.jpg - concrete and overlay why is this darker?
    Click image for larger version  Name:	image_56036.jpg Views:	1 Size:	80.2 KB ID:	1065819


    mtl_03.jpg - concrete and overlay (gamma1) wierdly this works, why doesnt vray respect gamma on the overlay?
    Click image for larger version  Name:	image_56037.jpg Views:	1 Size:	85.3 KB ID:	1065820


    mtl_04.jpg - concrete and overlay (projected) doesnt work , exactly the same overlay only projected
    Click image for larger version  Name:	image_56038.jpg Views:	1 Size:	86.8 KB ID:	1065821


    mtl_05.jpg - as above but turning of gamma correct on texture swatch and manually adding a maya gamma correct node afterthe projection, close but there is an overall adjustment to the concrete brightness so not working!
    Click image for larger version  Name:	image_56039.jpg Views:	1 Size:	85.1 KB ID:	1065822


    is this a known bug or exspected behavour

    thanks

    matt
    Last edited by matthew999; 01-04-2020, 09:02 AM.

  • #2
    scene file and textures attached to this message, rendered in maya 2018.6 vray 4.12.02
    Attached Files

    Comment


    • #3
      Hi matthew999

      I can't seem to access the attached files. Can you try and upload the files again? Or just send it via dropbox/google drive or something similar.
      I'd file to have a look at the scene, so make sure the scene file itself is included.
      Alex Yolov
      Product Manager
      V-Ray for Maya, Chaos Player
      www.chaos.com

      Comment


      • #4
        sure, no problem, you can download the fils here

        https://www.dropbox.com/s/etlvbmiiz0...ample.rar?dl=0

        thanks


        matt

        Comment


        • #5
          Thanks for the files. Here's what I can say after looking at this:
          *) The Overlay mode in the LayeredTex seems to be working as expected. Photoshop gives the same results, for example.
          *) In your 2nd image, once you turn overlay, the result becomes darker, because the overlaid texture is now gamma corrected and mid-grey before gamma isn't mid-grey anymore, but is darker. If the image is not gamma corrected, mid-grey stays mid-grey and overlay doesn't darken the result. Here's some comparisons:

          Photoshop Overlay with raw images:

          Click image for larger version

Name:	PS_raw.gif
Views:	182
Size:	1.34 MB
ID:	1067490



          Photoshop Overlay with gamma corrected images:

          Click image for larger version

Name:	PS_gamma.gif
Views:	298
Size:	2.33 MB
ID:	1067489


          V-Ray Overlay with raw images

          Click image for larger version

Name:	vray_raw.gif
Views:	232
Size:	2.11 MB
ID:	1067491

          V-Ray Overlay with gamma corrected images

          Click image for larger version

Name:	vray_gamma.gif
Views:	181
Size:	1.88 MB
ID:	1067492
          Alex Yolov
          Product Manager
          V-Ray for Maya, Chaos Player
          www.chaos.com

          Comment


          • #6
            In this case, you may want to keep your textures raw (i.e. don't gamma correct them), but this way the textures will likely be rendered wrong because of the incorrect gamma color space.
            In other words, it might be better to just mask out the streaks and just add them over the concrete texture if you need to gamma correct the images.
            Alex Yolov
            Product Manager
            V-Ray for Maya, Chaos Player
            www.chaos.com

            Comment


            • #7
              so what you are saying is that it doesnt work with gamma corrected textures, surely this is a bug then? as who doesnt want to gamma correct tetures in this day and age

              Comment


              • #8
                also can you explain why there is a difference between mtl_03.jpg and mtl_04.jpg. when the only difference is the use of a projection instead of directly assigned. Ideally i would like to project grunge maps so if mtl_04 worked like mtl_03 that would be ideal.

                In the mean time i have used mayas native layered texture instead and masked them out with an alpha as this old node behaves without any suprises. Its a shame as my node graph is now big an messy and overlay would be nice if it worked

                Comment


                • #9
                  This is not an issue with gamma corrected textures. The Oeverlay operation (just like all operations) on the VRayLayeredTex just takes in the input (the texture), performs the operation and gives a result.
                  Gamma-correcting these particular textures just changes the input and gives you an undesired result.
                  Alex Yolov
                  Product Manager
                  V-Ray for Maya, Chaos Player
                  www.chaos.com

                  Comment


                  • #10
                    but if im using a jpg from photoshop with 50% grey , for it to appear 50% grey i need to gamma correct it right? are u saying that i should not gamme correct anything until after the vray layered tex?

                    Comment


                    • #11
                      ho yolov,

                      i have set up a scene here with two shaders one directly assigned and one projected overlay, i have gamma correction appearing after the vray layered text. Can you explain to me why adding a projection on the second material in hyperhade effect the end result

                      https://www.dropbox.com/s/tvc2ldjoq5...mple_2.mb?dl=0

                      thanks

                      matt

                      Comment


                      • #12
                        I can't say without looking very deep into this. I doubt it it will help finding out.
                        Instead, I suggest another setup that ensures proper mid-grey values for an Overlay operation for gamma-corrected textures, so everything is properly color managed.

                        Your gamma-encoded texture needs to preserve a perfect mid-grey value for a correct Overlay operation. I've enabled Maya's Color Management, so it handles color spaces for me and I don't need to use gamma nodes.
                        I've used a colorLogic and colorCondition after the texture, which basically means: wherever the color value is less than or equal to a given color (dark grey here is manual input based on a couple of quick attempts), output a perfect mid-grey color. When the condition is not met - use the rest of the pixels from the "overlay" texture. This becomes the new texture that gets the overlay operation and this way everything works perfectly in the correct color space.

                        Here's how the shader looks:

                        Click image for larger version

Name:	color_logic_condition.png
Views:	162
Size:	237.8 KB
ID:	1067545


                        Also - I can use the same approach with and without a projection and I will get completely identical results.
                        Here's how the shading network looks with and without projection:

                        Click image for larger version

Name:	shader_projection.png
Views:	162
Size:	162.6 KB
ID:	1067546


                        Here's some renders of the consistent results with and without projection:

                        Click image for larger version

Name:	vray_layered_tex_overlay_2.gif
Views:	219
Size:	3.34 MB
ID:	1067547


                        And finally, here's a maya scene where you can look at the setup. Hope this helps: vraylayeredtex_sample_2_edited.zip
                        Alex Yolov
                        Product Manager
                        V-Ray for Maya, Chaos Player
                        www.chaos.com

                        Comment


                        • #13
                          hey yolov

                          thanks very hekpful as usual, ill take a look at the scene. I really should move onto mayas colour management, but im a creature of old habits lol

                          thanks

                          matt

                          Comment

                          Working...
                          X