Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Holdout Shader #423

Closed
MarioPeper opened this issue Jul 27, 2020 · 12 comments
Closed

Implement Holdout Shader #423

MarioPeper opened this issue Jul 27, 2020 · 12 comments
Assignees

Comments

@MarioPeper
Copy link

MarioPeper commented Jul 27, 2020

In the cycles setting you have the possibility to set Outliner > filter > Holdout and the Object Properties > Visibility > Holdout, together with the function Render Properties > Film > Transparent, to make it invisible but still makes indirect light. Very useful in compositing. I think Luxcore should have this.
Edit: For a better understanding https://youtu.be/fJtaboOKxeE?t=95

@Theverat Theverat transferred this issue from LuxCoreRender/BlendLuxCore Aug 2, 2020
@Theverat
Copy link
Member

Theverat commented Aug 2, 2020

Blender manual on holdout shader: https://docs.blender.org/manual/en/latest/render/shader_nodes/shader/holdout.html

Simply put, areas on the film containing a holdout material should be transparent. Otherwise the material behaves normally.
(in Cycles it appears black to camera rays, but I'm not sure if we necessarily need to copy this behaviour)

Capture

@Theverat Theverat changed the title Holdout missing in cycles scene reader Implement Holdout Shader Aug 2, 2020
@MarioPeper
Copy link
Author

MarioPeper commented Aug 2, 2020

No I didn't mean the holdout shader. It is already listed in the Cycles scene reader task.I have no global illumination on this. Please have a look in the linked video (it is only short)
holdout

@Theverat
Copy link
Member

Theverat commented Aug 3, 2020

I am pretty sure they are the same thing internally in Cycles.
At least this looks like it to me: https://github.com/blender/blender/blob/c3651adf8914048ecd2668937c3ed4414a6707bd/intern/cycles/kernel/kernel_path.h#L283

@MarioPeper
Copy link
Author

But when I use the holdout shader, it no longer casts light on other objects. Whereas the holdout setting in the object properties > visibility does. If there is an easier way to achieve this in Luxcore, why not. But this makes a big difference in compositing.

@Theverat
Copy link
Member

Theverat commented Aug 3, 2020

From a user perspective, the best way to implement this might be a material flag, so any material can become a "holdout".

@MarioPeper
Copy link
Author

Yeah that sounds good.

@Dade916 Dade916 self-assigned this Aug 4, 2020
@Dade916
Copy link
Member

Dade916 commented Aug 4, 2020

I added the support for holdout. It is a material attribute and can be set with property ".holdout.enable". This is a normal rendering:

normal

and this with ".holdout.enable" set to 1:

holdout

@MarioPeper
Copy link
Author

Wow, that was fast. Thank you so much.

@Theverat
Copy link
Member

Theverat commented Aug 4, 2020

I added support for it in the Blender addon.

@Theverat Theverat closed this as completed Aug 4, 2020
@MarioPeper
Copy link
Author

Thank you very very much, you are incredible.

@Theverat
Copy link
Member

Theverat commented Aug 4, 2020

Note: I didn't yet add support for holdout to the Cycles scene reader.
The view layer holdout setting is also not supported yet.
Until that is done, you have to open the "advanced" options in a Lux material output node and enable "Holdout" there.

@MarioPeper
Copy link
Author

MarioPeper commented Aug 4, 2020

Actually I find this solution much better than the scrolling nightmare in cycles. It fits perfectly to the Shadow Catcher and to luxcore :-) . The sense of the Holdout shader (without GI) is not quite clear to me either. Being able to set holdout and indirect only in the outliner would be nice, but it is no longer necessary in my workflow now. Now I also know how to set it in the text editor for LuxCoreRender, so I get the render layers much faster. Thanks again for that feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants