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 ?
Gelöst! Gehe zur Lösung
Gelöst von thiago.ize. Gehe zur Lösung
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)
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.
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.