Page 1 of 1

holdout collection override

Posted: Thu Apr 29, 2021 5:16 am
by lacilaci
Since there is now holdout material option in luxcore, can we get this button working?
hldt.jpg
It's an override in blender to make whole collection into a holdout. To make several object into a holdout I would now have to go through each object and their materials to turn this on/off....

Or is there another way to do this for luxcore?

Re: holdout collection override

Posted: Thu Apr 29, 2021 7:12 am
by B.Y.O.B.
The problem is that LuxCore has the holdout toggle only in the material settings. Cycles has it both for materials and for objects.
So if you have for example 5 objects with the same material, and you enable holdout on 2 of those objects, that's simple in Cycles: just enable holdout in the object settings and leave the material alone. But for LuxCore, the exporter would now have to create 2 materials: one with holdout enabled, and one with holdout disabled. And these would need to be put in some sort of registry and re-used between objects depending on what their original material was and wether it has holdout enabled or disabled ... it becomes very complicated.

So best would be if LuxCore would get a holdout toggle for objects as well.
See also https://github.com/LuxCoreRender/BlendL ... issues/536

Re: holdout collection override

Posted: Thu Apr 29, 2021 9:48 am
by Dade
Can't you just set all object material holdout to "1" if the button on the object panel is set and vice versa ? It is different from Cycles behavior but it makes sense.

I know you can end having object made of different materials with hold out enabled in some and disabled in others. Can the button have a 3th state ? Something half way between "1" and "0" ?

Re: holdout collection override

Posted: Thu Apr 29, 2021 10:14 am
by lacilaci
B.Y.O.B. wrote: Thu Apr 29, 2021 7:12 am So best would be if LuxCore would get a holdout toggle for objects as well.
Dade plz :shock:

Re: holdout collection override

Posted: Thu Apr 29, 2021 10:48 am
by B.Y.O.B.
Dade wrote: Thu Apr 29, 2021 9:48 am Can't you just set all object material holdout to "1" if the button on the object panel is set and vice versa ? It is different from Cycles behavior but it makes sense.
Cycles can have two objects with the same material, where one object has holdout enabled and the other not. I don't see how your proposal makes sense in that context, it would mean that both objects become holdout if I understand you right?

Re: holdout collection override

Posted: Thu Apr 29, 2021 11:03 am
by Dade
B.Y.O.B. wrote: Thu Apr 29, 2021 10:48 am it would mean that both objects become holdout if I understand you right?
Yes. If you use the object panel button (on the first of the hypothetical objects with the same material), the second is will flip too: you set all materials holdout connected to the first object, than refresh the panel buttons (so the second object button is flipped too).

As far as I understand, at the moment, the current button doesn't work at all. This way, at least, will have some functionality.

Re: holdout collection override

Posted: Thu Apr 29, 2021 11:58 am
by lacilaci
Dade wrote: Thu Apr 29, 2021 11:03 am
B.Y.O.B. wrote: Thu Apr 29, 2021 10:48 am it would mean that both objects become holdout if I understand you right?
Yes. If you use the object panel button (on the first of the hypothetical objects with the same material), the second is will flip too: you set all materials holdout connected to the first object, than refresh the panel buttons (so the second object button is flipped too).

As far as I understand, at the moment, the current button doesn't work at all. This way, at least, will have some functionality.
If I understand this right, this would make it so that all objects materials within layer would become holdout, but what if you reuse same material outside the layer? It is pretty common to have a material reused all over the scene.

A workaround for this in blender would be to make all objects within layer use unique materials, but in many scenes this would complicate things on user end when editing stuff.

Re: holdout collection override

Posted: Thu Apr 29, 2021 12:07 pm
by lacilaci
Here
objectss.jpg
iPhone model has 13 objects, some use multiple materials.

It is in a clear case, now if I want to make phone into a holdout every material within every object has to be enabled and disabled manually. And even if the object had holdout flag I would have 13 of them to do manually. (but in that case I think Simon would have much less work to make collection holdout working)