UE4. Adding specular highlights to "fake" light calculated inside material

Hi guys :slight_smile:

Creating “fake” directional light with specular are relatively simple task. But looks like making same for point light are way harder.
For directional light it something like this:

DIrectional light are just 1 directional vector. But point light are omnidirectional, so… how to find or define omnidirectional point light vector? :face_with_raised_eyebrow:

That directional lights vector is relative to positional differences,
Object_position : Point_position

It’s not perfect but this a is a fake light material that I’ve made. Maybe it’ll help.


2 Likes

Thank you a lot, Cel! Now everything work as it should :slight_smile:

Looks like my problem was:

  1. dont transform normals from tangent to world
  2. i was relying on CustomReflectionVector node which work nice with directional, but not with point light
Kind of old bronze or something like that :)