Announcement

Collapse
No announcement yet.

Remove self shadowing from a mesh but still cast shadows

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

  • Remove self shadowing from a mesh but still cast shadows

    Hi,

    is there any way I can remove the self shadowing of a mesh, but still cast and receive shadows from other objects? Or any workarounds for this,

    thanks!

    Gianluca

  • #2
    Don't know if there is a way to do it without a workaround, but you can always split it up into render layers, putting the mesh in one and the environment in the other (using matte objects), and then disable shadow casting on that object only in its own layer.
    __
    https://surfaceimperfections.com/

    Comment


    • #3
      There is no easy way to do that in a single pass. The best way to get the job done is to it on multiple passes.
      Svetlozar Draganov | Senior Manager 3D Support | contact us
      Chaos & Enscape & Cylindo are now one!

      Comment


      • #4
        There is a somewhat complicated way. I just gave it a try and seems to work for me.
        Here's the gist of it: I'm using the samplerInfo with V-Ray additional outputs. The parentObjIDTex output goes into the switch input of a vraySwitchMtl. The object, for which I want to only disable self-shadowing, gets V-Ray Material Override attributes and the SwitchMtl is assigned as a shadow material. The SwitchMtl contains two materials - one opaque and one transparent (shadow material overrides only work with transparency and nothing else). Then I assign a V-Ray objectID to my non-self-shadowed object and set it to whatever slot my transparent material occupies in the switchMtl.
        For exampe, let's say my SwitchMtl has an opaque material at slot 0 and a transparent at 1. The objects that receive shadows from my special object, should have an object ID 0, and those that won't receive shadows from the special object will have an ID of 1 (they will receive transparent shadows).
        Since the special object also casts shadows onto itself, and its ID is 1, it will not receive shadows from itself. All other objects don't need an objectID to cast shadow onto the special object.

        This is probably a bit better described in this tutorial: https://docs.chaosgroup.com/display/...pler+Info+Node

        And I've attached a sample scene to illustrate the setup to this post. Let me know if that works for you or if you need any other help with this setup.
        Attached Files
        Alex Yolov
        Product Manager
        V-Ray for Maya, Chaos Player
        www.chaos.com

        Comment


        • #5
          Originally posted by yolov View Post
          There is a somewhat complicated way. I just gave it a try and seems to work for me.
          Here's the gist of it: I'm using the samplerInfo with V-Ray additional outputs. The parentObjIDTex output goes into the switch input of a vraySwitchMtl. The object, for which I want to only disable self-shadowing, gets V-Ray Material Override attributes and the SwitchMtl is assigned as a shadow material. The SwitchMtl contains two materials - one opaque and one transparent (shadow material overrides only work with transparency and nothing else). Then I assign a V-Ray objectID to my non-self-shadowed object and set it to whatever slot my transparent material occupies in the switchMtl.
          For exampe, let's say my SwitchMtl has an opaque material at slot 0 and a transparent at 1. The objects that receive shadows from my special object, should have an object ID 0, and those that won't receive shadows from the special object will have an ID of 1 (they will receive transparent shadows).
          Since the special object also casts shadows onto itself, and its ID is 1, it will not receive shadows from itself. All other objects don't need an objectID to cast shadow onto the special object.

          This is probably a bit better described in this tutorial: https://docs.chaosgroup.com/display/...pler+Info+Node

          And I've attached a sample scene to illustrate the setup to this post. Let me know if that works for you or if you need any other help with this setup.
          Is this possible in 3dsmax?
          I can't see any V-Ray additional outputs option.
          I'm trying to create a real time mask for the shadows a water droplet creates on a leaf without the mask including the self shadowing from the leaf itself.
          admin@masteringcgi.com.au

          ----------------------
          Mastering CGI
          CGSociety Folio
          CREAM Studios
          Mastering V-Ray Thread

          Comment


          • #6
            I don't think the Maya setup is possible in 3ds Max. I can't think of a way to do it there.
            I haven't had time to do tests, but what if you add a Shadows render element and a multimatte and substract the object mask from the shadows ? Will something like that do the trick ?
            Alex Yolov
            Product Manager
            V-Ray for Maya, Chaos Player
            www.chaos.com

            Comment

            Working...
            X