Community
Arnold General Rendering Forum
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Can you make it so that only every nth surface hit by a light ray casts shadows?

0 ANTWORTEN 0
Antworten
Nachricht 1 von 1
jeremyeliosoff
200 Aufrufe, 0 Antworten

Can you make it so that only every nth surface hit by a light ray casts shadows?

Hello,

 

We want to do some custom, unconventional shadowing methods for stylized hair, wherin only every Nth hair casts shadows depending on its ray depth. For example, if n==4, when a ray of light enters the hair, the first 3 hairs would not cast shadows, the 4th would, then the 8th, then the 12th etc.

 

Is this possible? One approach would be to write an OSL shader that casts a ray towards the light, counts how many surfaces are in between, and only casts shadows if (nsurfaces + 1 ) % n == 0, but:
a) I'm not actually certain how OSL would count surfaces in this manner, other than using a series of `trace()` calls, each starting from the previous hit;
b) it's not clear how this would actually control shadow visibility, given that aiStandardSurface doesn't have a "shadow opacity" parm for this to plug into;
c) the shader would have to know the position of the specific light to cast a ray towards;
d) it would only work for direct illumination.

 

So, I'm not terribly hopeful that this is possible, but thought I'd ask.

 

We're using Gaffer and custom OSL shaders, as well as the OSLCode node.

 

0 ANTWORTEN 0

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report