Coordinate Space Inversion – Unreal 4
I developed an inversion material function using Unreal 4 for fun, and to see if I can make something interesting with it later.
It’s this happening in texture space. It is equivalent to projecting the coordinate plane onto a sphere, then rotating the sphere upside down, then projecting it back onto a plane. Points at infinity go to zero, and points at 0 go to infinity. Straight lines map to circles, but interestingly, circles stay circles (or ellipses), just with different radii.
This: Becomes this:
(With the texture’s Y repeat behavior set to “clamp”)
If you animate the coordinate output, you can get some mind bending effects (this is just panning the transformed coordinates horizontally and mapping a tiling hex texture)
The shading network is this:
Also, if you’d like to download the Unreal package to play around with, do so from here: Inversion and a few other functions. I created this with Unreal 4.6, but it should be fairly self contained and backward compatible.