UE4.26:How to get the direction of specific directional lights in custom node material?

I am assuming you want to know the vector of the light from any material, eg: you might want materials to have a specific path for being lit under a torch vs general-lighting?

If it was me I’d put the position of the light into a material-parameter-collection. Use a BP to grab the position of the torch and put it’s location in worldspace into the mpc. In the material, figure the vector you need from that position to whatever the material is on, etc, etc.

This is the same kind of trick that does the grass-bendyness via WPO as the character typically updates it’s position to an MPC so the grass-material can bend. Same deal here except you are sampling ‘somethings’ position for a lighting-path.