Lens distortion

hi there!

would anyone happen to know how I could go about creating some lens distortion effects for my camera? more precisely I’m trying to get some barrel distortion working without actually having to increase the FOV to some unholy value.

thanks a lot in advance,
chris

Can’t see the YouTube video at work (Firewall restrictions) but will this not help:

https://forums.unrealengine.com/showthread.php?45394-Tutorial-Eat3D-UE4-Shader-FX-Cubic-Lens-Distortion

Not sure if it is what you need.

heya,

yap I’ve gone through that tutorial, thank you.
in the end I always get crazy stretching along the borders and no one seems to know how to solve that problem.
so unfortunately that’s not really of any use to me :confused:

anyone?

I can think of a way you might do it using the material editor, actually. It is possible to get the position of a pixel in screen space at render time (ScreenPosition), and also to shift pixels using WorldPositionOffset.

It might require some complicated node-math, but I’m almost certain it would be possible to design a postprocess material that would perturb pixels toward screen center slightly, with a weight determined by how far they originally were from screen center.

hey you guys!

thanks a lot for the replies.
jeremy, I thought what you went through in your tutorial was indeed a shader for a postprocess volume lol.
only when I applied it did I notice that it doesn’t work. hmm.
so… stupid question… what could one actually use this shader for? :slight_smile: