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

Do multiple AiMixShader's get merged?

4 ANTWORTEN 4
GELÖST
Antworten
Nachricht 1 von 5
zenop
667 Aufrufe, 4 Antworten

Do multiple AiMixShader's get merged?

When mixing multiple aistandardsurface shaders through the aimixshader nodes, do they get merged to a single shader at shading time? Can anyone shed some light on the optimisations arnold uses behind the hood?

Beschriftungen (4)
4 ANTWORTEN 4
Nachricht 2 von 5
Stephen.Blair
als Antwort auf: zenop

The shaders are not merged, but closures have an efficient mix op, so the returned BSDFs are mixed after. Plus things like diffuse BSDFs are cached so they aren't evaluated multiple times in the same shader network. That's roughly how it works.



// Stephen Blair
// Arnold Renderer Support
Nachricht 3 von 5
zenop
als Antwort auf: zenop

Sweet, that's ideal. I haven't had the time to test the speed results yet - but would you guess be that the internal closure mixing would make a custom merging tool obsolete? Since everything is slider based I was thinking of writing something that merges mix shaders into a single surface shader.

Nachricht 4 von 5
Mike_Farnsworth
als Antwort auf: zenop

I wouldn't bother with a custom merging tool. In the future, we're fairly likely to convert many (if not nearly all) built-in shaders to OSL, and so even the multiple-node overhead will for the most part go away at that point. You already get most of the benefits of closures being combined already with mix_shader.

Note that you can combine C++ and OSL shaders in the same shader network, no problem; but when there are larger groups of OSL nodes together they will optimize among themselves and be more efficient. As we move more to OSL shaders, you'll automatically get this benefit.

Nachricht 5 von 5
zenop
als Antwort auf: Mike_Farnsworth

That's brilliant Mike, the ideal case scenario. Cheers for the explanation.

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