CameraVector DotProduct

When im trying to achive radiant falloff using standart UDK setup with CameraVector and DotProduct like that http://udn.epicgames.com/Three/rsrc/Three/MaterialsCompendium/DotProductExample.jpg - all i get is gradient by Z axes. http://s29.postimg.org/rt4azt7c7/grad.jpg

What am I doing wrong?

Any suggestions?

Ok i think i found a solution by using Fresnel node

1 Like

The reason it wasn’t working was that you were finding the dot product between the camera vector and the vector (0,0,1), which is the world “up” vector. What you should have been finding was the dot product between the camera vector and the pixel normal. You won’t get a Fresnel effect with either of the arguments of the dot product as a constant.

That said, the Fresnel effect is the way to go, I just felt you should know why your attempt didn’t work.

For future users

1 Like

Thanks man! Just what I needed!