Heya,
I am trying to use materials to dynamically project a texture onto a mesh via material. Unfortunately, I am not having as much luck as I am hoping, even though my calculations appear correct (hint: they’re not). Any help on this subject would be greatly appreciated.
Basically, I take a point around my static mesh, make it face it constantly (This is my “projection plane”):
http://i.imgur.com/CeJjxXO.png
In my material, I take the information of that plane, its relative position, up, right and forward vectors, and project my static mesh points onto it (calculation for projection found [here][2]).
http://i.imgur.com/vPEr50J.png
The last thing in the material function is me attempting to get the point’s “plane coordinates”, i.e. its 2D position in the projection plane’s local coordinate system. I then simply use those as the UVs for my mask texture.
http://i.imgur.com/HWucQ3K.png
http://i.imgur.com/A09b3dN.png
This is my end result:
http://i.imgur.com/d0GhxoS.png
Obviously, this is not what I intended. Anyone got any ideas?