holdout collection override

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

holdout collection override

Post 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?
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: holdout collection override

Post 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
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: holdout collection override

Post 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" ?
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: holdout collection override

Post 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:
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: holdout collection override

Post 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?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: holdout collection override

Post 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.
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: holdout collection override

Post 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.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: holdout collection override

Post 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)
Post Reply