I tried using the same technique in UE4 and its not working. Here is a screenshot of my code
Some notes: I have tried changing the material domain to “deferred decal” and “light function” from the default option “surface” and still no night lights are showing on the dark side of the planet. For some reason in “surface” mode the light vector produces an error -> Error [SM5] (Node LightVector) LightVector can only be used in LightFunction or DeferredDecal materials
UE3 used a technique called forward lighting, which enabled the materials to access the lighting information per light as the object was being rendered. In UE4 on the other hand, a different technique called deferred lighting is used. It allows games to use many, many more dynamic lights than is possible with forward lighting. Unfortunately, one of the major drawbacks is that it can limit the expressiveness of your material system. You my friend have hit that limitation.
Your best bet will be to set a vector parameter yourself which you can treat as a light vector exactly the same as the tutorial does.
For an example of this, check out the clouds in the Stylized sample on the Marketplace. They use a blueprint to set a lighting vector from the sun into the material to light them all fancy like.
I am not sure what “Stylized sample” you are referring to on the marketplace. I can not find it. Is it a level within one of the items in the marketplace. I looked through the content examples and levels within that project and still couldn’t find anything.