“The basic principle behind the View-cone calculations is shadow mapping. We first render a depth texture from the eye position of a selected character. When rendering the main camera we generate a mask that holds information for the various vision areas based in the previously generated depth texture (e.g. “full vision”, “fully occluded”, “crouch distance”, “out of bound”). Using this mask we can colour the View-cone in a final full screen pass, where stencil buffer is used to exclude various objects from being rendered to and to add light-source information.”
The para above is what i aim to do its basically a talk from a developer of Shadow tactics about enemy’s vision cone. I have already tried to achieve vision cone via procedural mesh and EQS but they have flaws most important of which is no support for height vision.
I think the method above will work fine but i don’t know anything about shaders or materials. It would be helpful if you can point me to the right direction. And if you think achieving this type of material is easy i would love it of anyone of you can recreate it in UE.
There isn’t much for me to go to because i think naming convention is also different, if I write on google about Depth Textures it just gives me post process materials and some other stuff, I am really hoping for a good explanation on this because i will need to explain that to my teachers as well but first things first Can anyone make this in UE4?
I actually made my own View Cone using procedural mesh and Decals but it starts to bleed into geometry nearby which I think is due to a bug with Mesh Decals and its something that hasn’t been fixed since 2016 so here i am trying this shader method of which i know nothing about.