There are a bunch of nodes that do things very similar to this under the engine\content\arttools folder. One is called “BoundingSphereLightTransform”.
The name may be somewhat confusing, but I made it in order to do custom per-object shadowmap projection for trees in the Apple Zen demo. What it basically does is transform the object local space into the input “light vector” which would be your projection vector. You would just do component mask of the UV (which is the same as RG in the mask node) for a 2d texture projection.
There are already parameters that would let you scale the projection texture, but in order to add support offsets from the center of the mesh (rather the center of its bounding sphere as viewed from the projection vector), you would need to add an offset parameter into the mix somewhere. What you would probably need to do is also transform your offset into the “projection vector space” using matrix3x3transform and add the result to the raw worldposition before piping it into the BoundingSphereLightTransform node. Or you could add an offset without transforming it, but the offset will then be less intuitive to set but a bit cheaper.
The function “VolumeShadowMap” is a companion node for performing self shadowing using a depth map of the object from the given vector. There are also some blueprint tools under the RenderToTexture level blueprint that let you bake out a matching depth-map of the mesh from a lights perspective so you can do custom per object shadows.
edit just looked at your math and I’m not sure if you need to do the inverse transforms like that. That would only apply if your BP for setting up the transforms was rotated in addition to the vector component. But I think that would be transform position, not inverse transform… So if you don’t rotate the base BP the original values are the same. Then I think you need to use the inverse transform instead of the matrix3x3transform inside your material. That is basically what the function I suggested does as well.
FWIW I usually test that kind of thing out with vectors made entirely in the material at first. Ie make your projection vector the only parameter then use “CreateThirdOrthogonalVector” with (0,0,1) as the “vector2” and then use the 3 resulting vectors as your 3 axes.
I also suggest you test on a sphere at first since it is much easier to see projection errors on a sphere.