Announcement

Collapse
No announcement yet.

vray mtlWrapper problem?

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

  • vray mtlWrapper problem?

    Hi there,

    I've looked for the forums for advice on to properly use the mtlWrapper to create a shadow catcher for objects. I'm pretty sure I'm doing it correctly. However I keep running into the following problems:

    1. The ambient occlusion between my objects and my shadow catcher plane seems to disappear.
    2. My shadow catcher never becomes completely transparent
    3. The shadows on the shadow catcher plane don't show up in reflective objects

    I'm using a dome light with a simple ramp as a texture. That same texture is plugged into the vray->environment->background texture slot. I've also turned off "visible in reflections" and "visible in refractions" checkboxes for the shadow catcher plane which may explain why the shadows cast on it don't show up in reflections. But without doing that I see the entire shadow catcher plane reflected.

    I have a standard vrayMtl plugged into the base material for the mtlWrapper.

    Finally, I also tried creating a vray object properties node and using its matte surface settings but I got the same result.

    Can anyone help - I've attached shots to demonstrate the problem as well as the maya file.

    Thanks in advance!

    Ted
    Attached Files

  • #2
    Heya

    Quickly looking at ur screenshots..

    Tick on Matte for all secondary objects

    also set shadow birghtness to 1
    generate render element

    also the AO is visible but its not as easily spotable I guess.. can you render on black/check in photoshop etc etc?
    Its not AO btw, its just IBL thini...

    Will have a look at ur scene in a bit if that wont help.
    CGI - Freelancer - Available for work

    www.dariuszmakowski.com - come and look

    Comment


    • #3
      Thanks Dadal. Turning up the shadow brightness solved the contact shadow problem. And checking "matte for all secondary rays" ensured that the bottom of my spheres were shaded darker.

      However the other problems still exist for me. In particular:

      2. My shadow catcher never becomes completely transparent
      3. The shadows on the shadow catcher plane don't show up in reflective objects

      So if you do have a chance to check out the file, I'd really appreciate it!

      Ted

      Comment


      • #4
        Heya

        Right I had a quick look at ur scene... Some settings were off - or at least not the way I usually set stuff up.
        I changed these things more or less...:

        Gamma = 1
        Affect BG = 1
        Doont affect color = 0 (untick)
        linear workflow = 0 (untick)
        in VFB I ticked on SRGB at the bottom

        Now with those setting you would need to render to openEXR... to keep on the linear behavior. JPG wont cut it as far as I remember.

        On the feflection plane... In render sets you had tick off cast shadow,reflection,refraction... its quite hard to see shadows in reflections from plane if the plane is invisble in reflections and refractions ...

        In Environment Settigns I drag the gradient to Reflection and refraction overrides too..

        And thats pretty much it. I still got plane edge visible... I must have forgotten something. Will have to start from scrach maybe, not sure what else you changed in the scene...

        Any reason why you are using direct light for sun rather than vray sun ?

        Click image for larger version

Name:	linear.jpg
Views:	1
Size:	117.7 KB
ID:	847831
        Thanks, bye.
        CGI - Freelancer - Available for work

        www.dariuszmakowski.com - come and look

        Comment


        • #5
          Thanks Dadal. The settings I'm using for the color mapping (gamma 2.2, etc. ) were set up so I could output 8 bit images - i.e. something I could just use as a final without any comping.

          However, yeah, I should use a linear workflow.

          So when it comes to making that plane invisible, even hooking the ramp into reflections and reflections doesn't cut it. How did you manage to get the render you got with the plane not showing up? Is there any way you can attach that file? Thanks!

          Comment


          • #6
            Ah you can still see the plane in my render. So I don't think I got it right at the end -arrr... Will work on it when I get back in few hours and I'll send you file.

            Regarding 8bit files ahh right then !

            Thanks, bye.
            CGI - Freelancer - Available for work

            www.dariuszmakowski.com - come and look

            Comment


            • #7
              Hi,

              You need to keep the intensity of the Dome light to "1" instead of "1.5". Then your plane will have the same appearance as the background texture.
              Note that "Render stats" parameters are changed for the plane/matte material, therefore no reflections will be visible on the big sphere.
              About the ambient occlusion, you can add it in comp by using the render elements.

              Hope this helps you to get the desired render result.
              Tashko Zashev | chaos.com
              Chaos Support Representative | contact us

              Comment


              • #8
                Oh now that is very interesting ! Didnt know it had to be set to 1...

                Thanks !
                CGI - Freelancer - Available for work

                www.dariuszmakowski.com - come and look

                Comment


                • #9
                  Thanks Tashko. Yep that worked. Thanks!

                  Here's a challenge one though. If I check "dome spherical" on the dome light so that I can see a full HDR, the plane won't disappear. That's because (I think) it's my ramp which feeds into the background/reflection/refraction textures. Any suggestions on how to address this?

                  EDIT: This isn't an issue when I'm using a HDR...
                  Last edited by tedprice; 02-07-2013, 11:04 PM.

                  Comment


                  • #10
                    Hi Tashko - one more question.

                    Is there any way to get that ambient occlusion without comping? When my shadow brightness is set to 1.0 the shadows are too dark (i.e. they're opaque). When I adjust the brightness to lighten the shadows, the shadows become transparent but reveal the lack of ambient occlusion.

                    Thanks!

                    Ted
                    Attached Files

                    Comment


                    • #11
                      Originally posted by tedprice View Post

                      Here's a challenge one though. If I check "dome spherical" on the dome light so that I can see a full HDR, the plane won't disappear. That's because (I think) it's my ramp which feeds into the background/reflection/refraction textures. Any suggestions on how to address this?

                      EDIT: This isn't an issue when I'm using a HDR...
                      I tested this and the matte plane is always invisible,

                      Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	207.1 KB
ID:	847844

                      Can you share the new scene setup?

                      Originally posted by tedprice View Post

                      Is there any way to get that ambient occlusion without comping? When my shadow brightness is set to 1.0 the shadows are too dark (i.e. they're opaque). When I adjust the brightness to lighten the shadows, the shadows become transparent but reveal the lack of ambient occlusion.
                      Ted
                      Ok, here one more try to get the AO effect over the matte object, hope this workaround to be useful for you. However I've added second plane over the existing one with Dirt map for the Opacity.
                      (Can post a scene file if its needed)
                      Click image for larger version

Name:	Preview-01.jpg
Views:	1
Size:	372.0 KB
ID:	847845

                      And the Alpha channel:
                      Click image for larger version

Name:	Alpha.jpg
Views:	1
Size:	58.5 KB
ID:	847846
                      Tashko Zashev | chaos.com
                      Chaos Support Representative | contact us

                      Comment


                      • #12
                        You could use GI ambient oclusion... or blend wrapper with ambient oclusion maybe...

                        Glad you got it to work btw!

                        Thanks, bye.
                        CGI - Freelancer - Available for work

                        www.dariuszmakowski.com - come and look

                        Comment


                        • #13
                          Thanks Tashko! Your solution worked great.

                          So just in case anyone has the same questions, here is the workflow I used:

                          To create the shadows
                          - Create a plane under the objects you want to render
                          - Create a standard vray material
                          + Control the shadow opacity with the Opacity property in that base material
                          - Create a vray mtlWrapper and plug the standard material just created into its base material slot
                          - Use the settings in the attached jpeg for "shadowCatcherMat"


                          To set up dome light/HDRI properly
                          - Assuming you’re using a dome light with a HDRI in its Dome Tex slot to light your scene, make sure the light’s intensity is set to 1
                          - Control the intensity of the HDRI with color gain in the file texture node
                          + To make the shadow catcher plane match the background:
                          + Under Render settings ->Vray tab->Environment check “override environment”
                          + Plug the HDRI file texture node into:
                          - Render settings ->Vray tab->Environment->Background texture
                          - Render settings ->Vray tab->Environment->Reflection texture
                          - Render settings ->Vray tab->Environment->Refraction texture

                          To create ambient occlusion under the objects
                          - Duplicate the shadow catcher plane – move the plane up just slightly on the Y (I’ve found you need to do this to see both the shadow and the ambient occlusion)
                          - Apply a standard vray material
                          - Set the diffuse color to black (this controls the darkness of the shadow you’ll generate along with the VrayDirt’s properties)
                          - Create a VrayDirt material and plug its output color into this new base vray material’s Opacity property
                          + Set the Occluded color to white
                          - The more grey the more transparent the effect will be
                          - You can also set the value above 1 to create darker ambient occlusion
                          + Set the Unoccluded color to black
                          + Play with Radius, Distribution and Falloff to determine how tight or loose you want the ambient occlusion to be

                          I've also attached the maya file in case anyone wants to check it out. The HDRI I used is here:

                          http://www.hdrmill.com/Freebies.htm - it's called Sunny Reno Suburb 01.

                          Note too the problem with the spiky sphere's placement in the reflection. Didn't know how to fix that one...
                          Attached Files
                          Last edited by tedprice; 12-07-2013, 01:05 PM.

                          Comment


                          • #14
                            Hi again,

                            I see the result is pretty good, thanks for sharing.

                            About the issue:
                            Note too the problem with the spiky sphere's placement in the reflection. Didn't know how to fix that one...
                            Probably by adding blurred copy of the background HDRI for reflection environment will do the job.
                            Tashko Zashev | chaos.com
                            Chaos Support Representative | contact us

                            Comment

                            Working...
                            X