Announcement

Collapse
No announcement yet.

excluding geo from occlusion?

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

  • excluding geo from occlusion?

    Is there a way to exclude certain objects from the ambient occlusion calculation in an AO pass?
    I know that I could make a separate render layer and do this manually,
    but it would be preferable to do this in the extraTex render element pass if possible.

  • #2
    In the VRayDirt, use the "result affect" (connect a set) and the "As inclusive Set"
    www.deex.info

    Comment


    • #3
      Originally posted by bigbossfr View Post
      In the VRayDirt, use the "result affect" (connect a set) and the "As inclusive Set"
      Brilliant, thanks!

      Comment


      • #4
        Okay, I got this to work but it was a bit cryptic, so I thought I'd add this for others who might stumble onto the thread:

        The "result affect" slot is greyed out in vrayDirt so I could not click on the "map" button. Is that intentional? It looks different in the screen shot of the manual...


        Instead I did the following
        1) created a set of the geo I wanted to exclude
        2) in the connection editor I connected the set's "usedBy" output (i.e. the sub section usedBy[0]) into the "result affect" input of the dirt
        3) turned "as inclusive set" off in the dirt's attribute editor to exclude this set
        Last edited by sharktacos; 30-03-2012, 11:18 AM.

        Comment


        • #5
          Okay... Update:

          What this does is affects whether an object casts occlusion onto other objects. It does not however affect whether that object receives occlusion shading from other objects.

          I need instead for the selected objects to get any occlusion shading (=pure white) AND not to cast any either. So they are truly excluded from the entire AO calculation. Is that possible?

          The reason is that we have some objects (a group of trees with zillions of leaves) that take forever to calculate the AO for. So we would like to exclude these so the render is faster.

          What I'm looking for is something like "cast shadows" and "receive shadows" in the object render stats, except for occlusion.
          Last edited by sharktacos; 30-03-2012, 11:49 AM.

          Comment


          • #6
            Originally posted by sharktacos View Post
            Okay... Update:

            I need instead for the selected objects to get any occlusion shading (=pure white) AND not to cast any either. So they are truly excluded from the entire AO calculation. Is that possible?
            Why do you not add simply a white VrayLightMtl (or surface shader) for this objects?
            www.deex.info

            Comment


            • #7
              Originally posted by bigbossfr View Post
              Why do you not add simply a white VrayLightMtl (or surface shader) for this objects?
              Because I want to make a render AO pass rather than a render layer. As I understand it, AO is made with an extraTEx render element with vrayDirt applied. I don't know any way to apply a white VrayLightMtl to some objects in an extraTex pass with dirt to others. Is that possible?

              Comment


              • #8
                Yes.
                You can use "user attributes".
                On objects you want to exclude, create a Vray user attributes.
                Set the user attributes like : aoExclusion=1;
                Now create your extraTex renderElement. Connect a "blend utility color" node.
                Create a user scalar node (utility). Set the attribute : aoExclusion. Set the default to : 0
                Now connect your user scalar node in the blend of your blend color node.
                Connect your VrayDirtTex on the color 2 of the blend color node.
                Set the color 1 to white.

                Done.
                Last edited by bigbossfr; 31-03-2012, 09:19 AM.
                www.deex.info

                Comment


                • #9
                  I think this is forgotten in Maya, since there is such option in 3ds Max. We will add it.
                  V-Ray/PhoenixFD for Maya developer

                  Comment


                  • #10
                    Originally posted by bigbossfr View Post
                    Yes.
                    You can use "user attributes".
                    On objects you want to exclude, create a Vray user attributes.
                    Set the user attributes like : aoExclusion=1;
                    Now create your extraTex renderElement. Connect a "blend utility color" node.
                    Create a user scalar node (utility). Set the attribute : aoExclusion. Set the default to : 0
                    Now connect your user scalar node in the blend of your blend color node.
                    Connect your VrayDirtTex on the color 2 of the blend color node.
                    Set the color 1 to white.

                    Done.
                    Thanks, works great. A very useful trick!

                    Comment


                    • #11
                      That's creative usage of the extra attributes

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

                      Comment


                      • #12
                        Originally posted by bigbossfr View Post
                        Yes.
                        You can use "user attributes".
                        On objects you want to exclude, create a Vray user attributes.
                        Set the user attributes like : aoExclusion=1;
                        Now create your extraTex renderElement. Connect a "blend utility color" node.
                        Create a user scalar node (utility). Set the attribute : aoExclusion. Set the default to : 0
                        Now connect your user scalar node in the blend of your blend color node.
                        Connect your VrayDirtTex on the color 2 of the blend color node.
                        Set the color 1 to white.

                        Done.
                        Question: I have a scene that uses geo caches. When I apply the above method on the mesh with no cache applied it works fine. But as soon as I apply the cache it fails. I think this must have to do with the user attribute on the mesh not being recognized with the geo cache. However, when I look at the geo itself it does still have that user attribute there, it just is not being read by the cache apparently. Is there any way to resolve this?

                        Comment


                        • #13
                          I can't think of why it wouldn't work; if you like you can send us a small test case to vraymaya@chaosgroup.com and we'll check it out.

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

                          Comment


                          • #14
                            It is very easy to replicate. I am attaching a file here that demonstrates it.

                            The file consists of 3 spheres with a geo cache applied to the middle one. The middle sphere has the user attribute on it so that only it appears in the fresnel pass.

                            This works great when the file is opened normally and the geo cache is applied.
                            However if you reference this file into a new scene and apply the geo cache the fresnel pass is black (empty)
                            Attached Files

                            Comment


                            • #15
                              So I tried this, and it worked on a piece of geometry (with polygons) but it didn't work with a vray rectangle light.
                              Any reason a light should act differently?

                              Okay, I got this to work but it was a bit cryptic, so I thought I'd add this for others who might stumble onto the thread:

                              The "result affect" slot is greyed out in vrayDirt so I could not click on the "map" button. Is that intentional? It looks different in the screen shot of the manual...


                              Instead I did the following
                              1) created a set of the geo I wanted to exclude
                              2) in the connection editor I connected the set's "usedBy" output (i.e. the sub section usedBy[0]) into the "result affect" input of the dirt
                              3) turned "as inclusive set" off in the dirt's attribute editor to exclude this set
                              Last edited by sharktacos; 03-30-2012 at 02:18 PM.

                              Comment

                              Working...
                              X