How to make OWN MATERIAL NODE for Material Editor

Hi, I am looking to create a custom node based on SkyAtmosphereLightDirection or AtmosphereSunLightVector. Except that instead of from the light, I would like to retrieve the Forward Vector from a selected object in the scene. I assume that the Forward Vector is what the AtmosphereSunLightVector provides. Do you think it’s possible to rework an existing node or create a new one that will behave identically to the original and allow you to point to the object whose Forward Vector it will feed? Assuming that the node will occur several times in the material, probably, as in SkyAtmosphereLightDirection, an Index input will be needed. (Actor Index/Object Index)