question

Alex B avatar image
Alex B asked ·

Changing shadow color and opacity inside shader?

Hey Arnold Community!

I have a question regarding stylized rendering.

Question: Is it possible to change the shadow color and shadow opacity of an object inside the Arnold shader?

What I want to achive is the following:

Inside of the PxrSurfaceShader you can change the color of the shadow per shader.

I found the possibilty to do this in the Arnold light:

But this would make it quite complicated to have a separate light for every object.

I tried doing it with the aiRaySwitch but did not get how to setup the shadernetwork.
This is my failed attempt, maybe someone can show me how to do it.



I am trying to achieve a 2D look and this would help to soften certain objects. For example having a bush and letting the shadow only cast at 20% through the leafs and making it look softer.

Thanks for your time,

Alex


shadershadow
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Lee Griggs avatar image
Lee Griggs answered ·

Here is a scene (ensure Opaque is disabled for the mesh). Password: arnold


rayswitch-shadow.jpg (149.4 KiB)
3 comments
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

@
It's so sad that the file is no longer available. Is there even a chance that you will share this file again, sir?

0 Likes 0 ·
Lee Griggs avatar image Lee Griggs Alexander Artamonov ·

Here is the scene file.

1 Like 1 ·

Perfectly! Thank you so much!

1 Like 1 ·
Alex B avatar image
Alex B answered ·

Thank you @Lee Griggs
That's exactly what I needed! Thank you very much for your help!
Awesome!
Cheers Alex

10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.