Jump to content

Shadow non-self material


Recommended Posts

I am trying to make a material that catches shadows from other objects and casts shadows onto other objects but doesn't cast shadows on itself (be able to toggle this functionality on and off).

I have attached a scene where I have a shader that catches shadows from other objects but doesn't cast any shadows at all.

Is it possible to make a shader that does this?

Thanks everyone!

shadowCaster_v01.hip

Link to comment
Share on other sites

  • 2 weeks later...

Hi!

I think the there is no way to do such kind of a trick in surface shader.

That's why you should probably customize the shadow shader of the light. I've attached the basic setup for that.

Everything interesting is in the Inline of /shop/customShadow and some code inside of /shop/lambert

As soon as we want to have a control of this feature on per object basis we want to place the "Cast Shadow On Self" toggle on the surface shader.

This is a little bit limited version in comparison with default ASAD shadow shader in a way that in this particular implementation there is no support of any shadow parameters defined on the light. So you should upgrade code a bit to have it.

Feel free to ask If accidentally something is not working there.

By the way this version should work well only with H13. Previous release had some bugs with simport() that is not crucial but really needed for performance.

shadowCaster_v02.hip

post-5753-0-31834800-1386335191_thumb.jp

post-5753-0-05107500-1386335208_thumb.jp

Link to comment
Share on other sites

  • 2 weeks later...

Another way is to dig into the surface model vop, find the direct lighting vop and uncheck the shadow checkbox.

No sure if it exists in the h13 compute lighting vop.

edit: nevermind that, just realised you want it to receive shadows from other objects which wont work with this.

Edited by Serg
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...