1
$\begingroup$

I want to combine or merge diffuse passes with glossy passes to get a set of new color, direct and indirect passes.

$\endgroup$
1
$\begingroup$

What you normally do when you combine passes is to add indirect pass with direct pass and then multiply with the color, then do the same with the other type of passes and add them together, so:

Composite = Xcolor * (Xind + XDir) + Ycolor * (Yind + YDir)

now you want to separate Composite in Zcolor * (Zind + ZDir), then:

Zcolor * (Zind + ZDir) = Xcolor * (Xind + XDir) + Ycolor * (Yind + YDir)

There are 3 unknowns for one equation, therefore you have to assume more relationships for the unknowns, I chose these because they give good results:

Zind = Xind + Yind

ZDir = XDir + YDir

with these relationships Zcolor can be solved to

Zcolor = Composite/(Zind + ZDir)

This is the node setup.

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.