Hey guys,
I am trying to achieve a flash light effect, exactly like the one which is in the Alan Wake game :
Currently, I was trying to achieve this effect with a simple volumetric shader, applied on a cone geometry which is driving with a socket on my character, like this :
So i could be happy with this, the only problem is when my effect is passing through an object, it just goes outside of it, and if the character view is not well placed, then we can see it and that's really anoying :
So i was thinking about a new system that allow me to have a nice effect without the constrainst like this, but I can't find any other solutions, and I know that I can not calculate a volumetric effect dynamicly because it is just to heavy.
Maybe the UDK is not designed to achieve that kind of things, but if anyone have any idea, you're welcome !
Thanks !
Replies
What do you mean by post process ? because post process effect are only meant to be used as a layer that comes over all effects that are already in the game, or maybe it is possible to use it to hide some things ?
I've had good results with this, by creating a small Render to Texture actor placed at the same position/rotation as the flashlight, and then giving it a process to return the Z-Depth.
So basically you've got a small texture that now shows rays from the flashlight point outwards.
You do need to do alot of processing to this in the shader, but that is a fundamental that ultimately, should work and give you some good intersections.
Cost, is a little high as you're not only doing a costly RTT, but also you'll be left with a slightly more expensive transparent material for your flashlight. So unless it's a hero function, or something your project is fully based around, may I recommend using the standard solution for this and just using Depth Bias Alpha?