Community
Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Shadow problem with cutout opacity

8 REPLIES 8
Reply
Message 1 of 9
JakobAppleby
231 Views, 8 Replies

Shadow problem with cutout opacity

Hey i have a problem with shadows when it comes to using cutout opacity driven by a distance node.

It seems to kill my shadows entirely. Distance shader seems to be the culprit since plugging in a flat utility shader or a ramp with no input works as intended.

 

Attached a test scene and my result with that scene

 

Untitled 4.jpg

8 REPLIES 8
Message 2 of 9
lee_griggs
in reply to: JakobAppleby

Quick question. Why are you doing this?

Lee Griggs
Arnold rendering specialist
AUTODESK
Message 3 of 9
JakobAppleby
in reply to: lee_griggs

Because i have a setup that includes a lot of materials that turn invisible when an object gets close, a sort of see through effect. Is it a strange thing to do? Should i be using transparency instead? Ive got over 40 materials that all fade out with the distance shader into cutout opacity, but it breaks the shadow even when the distance trace isnt even close

Message 4 of 9
lee_griggs
in reply to: JakobAppleby

Interesting. I was wondering if there was an alternative way of doing that like projecting a ramp to the opacity but if you have over 40 materials I can see why you would seek an alternative solution. Could you upload a simplified scene so that we can test whether it is a bug or not?

Lee Griggs
Arnold rendering specialist
AUTODESK
Message 5 of 9
JakobAppleby
in reply to: lee_griggs

The rar file in the original post is the test scene that i screenshotted. 

 

Its basically taking the distance from the ground object and putting that either straight or through a ramp into the cutout opacity.

In my project i have a car that becomes transparent when a set of planes go through it, looks really good except the shadows

 

Let me know if you need a zip instead.

 

 

Message 6 of 9
JakobAppleby
in reply to: JakobAppleby

At first i thought it had something to do with the amount of ray depth, but the scene in the first post shows that it its not working correclty. 

Message 7 of 9
JakobAppleby
in reply to: JakobAppleby

If i flip the output from the distance shader around with the ramp i get this, which is also wrong but the shadow is there atleast, though not a correct shadow

(And if i flip the black and white output in the distance shader itself i get the same result but no shadow at all)

 

CutoutOpacityProblem_02.jpg

Message 8 of 9
lee_griggs
in reply to: JakobAppleby

Apparently, this is expected behavior. It is happening here because the distance shader currently early exits returning nothing when evaluated for a shadow ray. We will look into it. Meanwhile, maybe you could project a ramp to the opacity instead?

Lee Griggs
Arnold rendering specialist
AUTODESK
Message 9 of 9
JakobAppleby
in reply to: lee_griggs

Alright, for now i will either try to get it working with just a ramp or do some comping in post .

 

Would be cool to have it work 👍

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report