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

Importance sampling env

4 ANTWORTEN 4
GELÖST
Antworten
Nachricht 1 von 5
maxtarpini
538 Aufrufe, 4 Antworten

Importance sampling env

Hi, is there a way to detect a shader is being called when arnold is importance sampling the skydome where the shader is attached to ? 

4 ANTWORTEN 4
Nachricht 2 von 5
thiago.ize
als Antwort auf: maxtarpini

I haven't double checked if this works, but maybe this works? I think the AtShaderGlobals shading context in the shader will have AI_CONTEXT_IMPORTANCE when it's being run through the skydome light.

 

if (sg->sc == AI_CONTEXT_IMPORTANCE)

 

 

Nachricht 3 von 5
maxtarpini
als Antwort auf: maxtarpini

Exactly what I was looking for, thanks Tiago, works a bunch ! :vulkanischer_Gruß: 

Nachricht 4 von 5
maxtarpini
als Antwort auf: maxtarpini

Btw, Arnold does not stop when importance sampling the environment after i.e. a cancel render has been invoked. The 'abort signal' is received only when importance sampling is done. It's almost never a problem with bitmaps but with heavy computations in the attached shader (that could even be a user try or error) it starts to. This way Arnold can get stuck at any time when 'experimenting' with a shader network for example. 

Nachricht 5 von 5
thiago.ize
als Antwort auf: maxtarpini

Yes, aborting the skydome_light importance map computation would be nice. We actually did briefly consider this many years ago but because at the time it was surprisingly tricky to do right, we postponed that in favor of other higher priority work. If enough people ask for it, we can bump up it's priority.

 

In the meantime, a workaround while modifying values is to temporarily lower the skydome_light.resolution so that modifications happen more quickly.

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