← All ideas
  • Published 13 Dec 2020

Advanced holdout shader to mask selected objects - hide from render.

Advanced holdout shader which should work like mask - masking/generating alpha only for selected objects (object list node needed or other way to select meshes / objects which holdout shader object would mask away from render but only those objects) . Based on render overlaying. Did I make any sense?

youtu.be/_Rqsb2Bvoo0 so if i would want to make render where i have some objects in background like in this fast demonstration.. then object in the background will be holdout but it would be faster if i could set holdout only for that foreground object (by selecting object/objects which will be affected by holdout shader)

edit. Mask shader / ray teleport / ray pass / ray clipping shader. Also having ability to mask objects with grease pencil would be very handy - like doing 2d rotoscope in 3d space and masking out of objects with 2d filled strokes (so workflow should be something like: add / list objects / collections some how - which are needed to mask off from renders).

So it would be kind of ray teleportation / clip area (like layers masking / alpha channel in image editing. Now i can do this (masking objects with holdout shader) using multiple view layers and combining them in compositing but there could be more intuitive way to do this i think.

100%

Development Status: Open

Upvote 4 Downvote 0
jmu
13 Dec 2020

7 Comments

Vyach

Holdout cuts ray. And if only certain objects should be masked/transluted, it is transparency. So there can be special «holdout» ray that travels through all objects. And can be taken inside shader as transparency (or another) mask.

I suppose, atm you can use transparent shader and light-path node with «transparent 1st ray». Or render layers and compositing.

1
jmu Author

* @ Vyacheslav * at the moment best way is make multiple view layers and composite them into one but its slow process - i tried it but it goes too complex (slow) in bigger scenes. So this why i made this proposal.

Vyach

* @juhamukari * yes, i understand the reason. And proposal shows, that composer is slow.

1
lsscpp

I didn't understand much, neither watching your video. Ican only suggest to use "Holdout" in the Object>Visibitility panel for the objects you need. Bypassing shaders. Or make saviour use of Collection (in holdout mode)

jmu Author

* @ Lsscpp * maybe i should describe it more like mask shader - or teleport rays (those which user want to be skipped in ray tracing - or ray tracing clipping shader.. hmm.. hard to explain but i know workflow how to do this kind of but its complex and slow - basicly i would call it mask shader 🤔 ray / path mask.. maybe there could be some way to do this kind of masking using light path node but no idea how - it would be very complex setup i guess.

lsscpp

* @juhamukari * I still don't get what you want to achieve. Apart from holdout and transparency, what do you want to do with your rays?

jmu Author

Just photoshop kind of layer masks but in blender. Maybe i need to do some demo video/visualization from this one. Just 2d masks in 3d space - like ray teleportation.