I have a mesh that has a Gradient painted between it’s vertices, and I want to use the ‘Direction’ of that Gradient as a world-space direction vector in the material. Is that actually possible, or is there a better way to do it?
Basically the mesh is supposed to simulate ‘flames’ coming out of the jet engines of a vehicle. Currently I simply scale the mesh in the particle system as and when I need to, but it requires having a particle system per-engine on the vehicle, and therefore is pretty inefficient. It would be much easier for me to have one property I can modify in the material which just ‘Stretches’ it out, depending on the direction it’s facing.
Even if I can’t use vertex colours (which I don’t think I can), is there a way I can simply get the general direction that the mesh is facing, purely through the material? Here’s the vertex colours for reference. Regardless of the orientation of this mesh, I want it to ‘Stretch’ the vertices based on how close to white they are, and in the ‘Direction’ of that gradient in WS. In this case, it would be the negative-X axis.
The only way I can think of doing this at the moment is literally modifying the vertex normal’s to face that direction, and using that, but there must be a better way.