8:24 - There is one major issue with this tutorial: LERP Alpha in UE4 is not clamped. This means it can go beyond the range of [0,1]. If you feed an alpha of 2 there, it won't stop at value B, but instead will interpolate further. Which will Oversaturate the colors. Example: A = 0, B = 100, Alpha = 2 -> Output will be 200. To clamp value in [0,1] range use SATURATE node.
@PsyCoCinematics2 жыл бұрын
Very nice! Read your comment before finishing the vid, just duplicated a spare box and saw the color change as soon as I upped the stencil depth number. Tweaked it as ya said, boom! Perfect!
@DavidAllenFarrell6 ай бұрын
You were born to do this kind of work. Thank you.
@alienrenders Жыл бұрын
To make this obey depth buffer, add two more scene texture nodes. Select SceneDepth and CustomDepth. On each, add a Mask node (leave R checked, uncheck the rest). Link CustomDepth (mask) to the top of subtract node. Link SceneDepth (mask) to the bottom. Use a Saturate node on the result of subtract. Then feed that into a 1-x node. Then multiply this to what you're using for the alpha of your last LERP node and use the result as your new alpha. Make sure your actor has the checkbox enabled to write to the Custom Depth buffer.
@bigolbearthejammydodger65273 ай бұрын
you are a bloody life saver mate. absolute legend! I'm an indi dev and you just made our 'with thanks' to section with this. I knew it was the depth buffer causing the problem but honestly was not sure how to fix, you saved me a day or so research.
@shivandrews10552 ай бұрын
Thank you! this works a charm - though the only thing I've run into after implementing this, is the Skylight object in my scene is no longer affected by my PPV. I have the PPV set to infinite bounds as well... Any ideas?
@alienrenders2 ай бұрын
@@shivandrews1055 Does your skylight use the custom depth buffer? I've seen water assets do this. If so, you can't have two uses for the same buffer. Some water assets let you disable the use of custom buffer. Other than that, not sure why a light would be affected.
@thepixeldump18 күн бұрын
Champ comment!
@csking99294 жыл бұрын
This really helps!! Finally, there is a tutorial with clear explanation about post processing!!
@stefanguiton4 жыл бұрын
Super useful! Ive been looking at how to do this for ages, this is quite a simple approach.
@lpnp94773 жыл бұрын
Finally, I've been searching for an answer to this question since literally 2015. THANK YOU!
@blueneongraphics2 жыл бұрын
one of the best and to the point tutorials/examples. thank you for the reference content. have had to come back to this video several times
@bobbyr4 жыл бұрын
Keep making these shorter and consice tutorials, we don't need the drawn out intros and podcast style tutorials are way too long.
@HandheldGamingHQ3 жыл бұрын
this ^
@suitoha93363 жыл бұрын
Totally agree!!!!
@rickfuzzy Жыл бұрын
100%
@digitaltrash4 жыл бұрын
we need more video like this
@jakelofgren25104 жыл бұрын
So the full color on certain objects is working... but whenever that object is placed behind something, whatever is in front of it gets full color based on the shape behind it. how do you fix this??
@Jambax4 жыл бұрын
To make it more useful, the Custom Stencil really needs to be made available for Opaque materials in the pixel shader. It's already possible with engine modifications, but it's a nasty hack to do so.
@stormolflak Жыл бұрын
Thank you! It took some time to figure some stuff out muself, but this is really helpful!
@Rolangee6 ай бұрын
This is amazing explanation !!!!!
@NahitoKunАй бұрын
change your anti-aliasing to FXAA or MSAA in project settings > Rendering to remove jitters.
@allashama3 жыл бұрын
God damn! Texturing is a mindblowing brain! You have to be alien to understand it lol.
@3datonement687 Жыл бұрын
Great Explanation, Thanks A lot
@joepolidoro4292 жыл бұрын
Any thoughts on being able to identify if an actor is currently showing its custom buffer/stencil? I'm looking to trigger events only when an object displays its stencil.
@나랑드-i3y3 жыл бұрын
I can understand so easily! thanks to this video
@haiyimei3 жыл бұрын
dude, amazing tutorial! thx a lot!
@ty197810 ай бұрын
How would you go about using this method on decals? My scene is black and white using a desaturate in the PP Mat but I need for the decal (blood etc) to still be red when I shine my flashlight on them. I set up a Decal BP to test but the decal has no custom depth, any ideas? Thank you!
@evecsb Жыл бұрын
Hey thanks! You saved my life!
@milagro23003 жыл бұрын
That´s what I call "TEACHING"! Thanks!
@DemonsWizards4 жыл бұрын
6:57 🖤 from DEMONS WIZARDS
@HyperCazual4 жыл бұрын
I think I can speak for most of us saying... we've heard enough about "making your own masks". Can we give it a rest already? Oh wait, what?
@skydrowdev4 жыл бұрын
Lol I had a hard time getting it 😭😂
@samohickey3 жыл бұрын
I am trying to use this technique on my ocean, so that it doesn't have a comic outline like the rest of my game.. I'm soooo close... but having an issue on where to hook it up on my material. Must... Study... More... Materials! :D
@tacticalteamkilling65392 жыл бұрын
Is there a way this can be applied to lights? For example, an IR light/laser
@giovannisolimeno50403 жыл бұрын
This was really useful, thank you
@nonpurplestar4158 Жыл бұрын
Greetings_!! Thank you for the helpful tutorial_!! I have sprites instead of regular objects on my stage. These sprites are markers that I can colorize. The problem is that the color of the material is not accurate due to the lighting in the scene. In the editor, I can turn off the light by applying the unlit mode, but after building the project, this mode is not available! I know that this effect can be repeated by inserting into (post-process material) your post-process material with a diffuse map. After this action, my sprites on the stage become transparent, how can I avoid this or am I doing something wrong_?! Thank you in advance_!!
@KostasOreopoulos3 жыл бұрын
What a great tutorial
@samgielen3 жыл бұрын
How could I render that mask as an alpha channel instead of a color? I want to use this technique to create an occlusion object in Virtual Production, which is running realtime, so Luma Matte usage isn't possible, I really need the mask to render as an alpha channel. How would I go about creating that?
@nitrork2 жыл бұрын
Thanks for the tutorial, this is approaching pretty close what I need to accomplish, but I'm wondering if there is a way to create stencil passes PER track/element- or individual meshes of an object? I'm working with alembic geometry caches of character animation and would like to be able to isolate certain parts of a render (like the eyes for example) independent from the rest of the object. Is there a way to do this without having to import every single character element separately? Ideally it would be great if you could assign custom stencils according shader Id's.
@dysnXO3 жыл бұрын
anyone know if its possible to enable and use Custom Stencil pass on Decals? it works with meshes but it seems not to work with decals
@oxygen98283 ай бұрын
no way there's anything you don't know about unreal. Really like your works, I am often motivated to keep going by them. GL!
@Armetron3 жыл бұрын
Lets say I want to render an object that is behind a wall infront of a wall as if the wall wasn't there, how could I do that?
@android05525 ай бұрын
how to hide actors with post process and custom stencil?
@RealDaveTheFreak2 жыл бұрын
Awesome feature for the most part. But it doesn't seem to work with sprites. :(
@rendermanpro4 жыл бұрын
Make "add AOV channel", or custom buffer, and it will simplify everything.... instead of that duct taping style. *Make simple things simple.*
@liepins4444 жыл бұрын
This would make it a universal change to the object, where the current implementation is selective use. In this example, it's to a specific post process material. Keeping things modular enables more use case scenarios at the cost of ease of use. Epic is pretty good about not over simplifying features that would put them in a small box. Edit:spelling
@liepins4444 жыл бұрын
That said, tools to create "render layers" would be fantastic! These overrides would be specific to rendering and would not be expected to function properly in realtime.
@kinggore52294 жыл бұрын
Good stuff.
@mediaguy95573 жыл бұрын
Thanks, but my head hurts trying to comprehend the later part of the videos...
@goldennboy19893 жыл бұрын
How do I prevent the mask from being visible even if the masked object is occluded by something else?
@joelwynd92332 жыл бұрын
did you find a solution ?
@Urammar2 жыл бұрын
@@joelwynd9233 Did you? Lmao
@joelwynd92332 жыл бұрын
@@Urammar you need to assign a stencil mask to everything else in the scene as well. Object being masked = stencil 001. Everything else in the scene = stencil 002 . This worked for me
@Urammar2 жыл бұрын
@@joelwynd9233 thank you, but I've actually found a more robust solution! Compare the stencil with a custom depth/scene depth comparison. It's probably not as performant though, but it catches all the edge cases
@CYPHERNATURE2 жыл бұрын
Is there a way to do it inverted, where the post processing only affects the object, and not the reset of the environment?
@fattumhawk2 жыл бұрын
what do you mean? just affect the result of the stencil buffer to modify the affected range, you are supposed to do it in material
@Kaboom1212Gaming Жыл бұрын
This is an old comment, but the way you can isolate your object is by putting a 1- node before the multiply in the shader, it'll invert the mask in there. If that's what you mean.
@yang_daxia2 жыл бұрын
Why the objects have no jitter? I've been working this for two weeks...
@yang_daxia2 жыл бұрын
Could I get the resource in this case?
@edwinluthfisaputra1072 жыл бұрын
Try changing the processing in your post process mat setting to be before/after tonemap
@johnvpaite4 жыл бұрын
Whats the difference between this and using the default channel system when we are rendering out custom passes? Does this take into account the depth of field?
@Mw_kwak2 жыл бұрын
Hmm, this doesn't seem to be working on Blueprint object. Well not in UE5. Haven't tried older versions
@dissonantprotean54952 жыл бұрын
this works fine for objects inside blueprints in UE5. Are you trying to put the post process volume in a blueprint? Because you can't do that.
@offbeatlegend21714 жыл бұрын
wow
@joshryan23824 жыл бұрын
Can you do a live stream or a video explaining ai with Fortnite henchman or bots