I am trying to figure out if I can basically use a float3 vector to control the projection angle of a world aligned texture mask. The main goal I had in mind was to make a mask to lerp in moss onto certain objects in the scene, like trees and rocks, and make the moss grow from say the north-west side of the objects, with the opposite side of the objects not having any moss. I thought for sure this would be possible, but all of my attempts at doing it myself, or finding a tutorial online have failed. Any help with this would be greatly appreciated.
Use the vector as the alpha for a LERP to blend between your base-texture-set and the moss-texture.
Triplanar, XY-projection, UVs don’t matter here as you are not mixing the UVs but the textures.
Sorry for the late reply to this, but I think I need to re-word my question a little. Firstly, thank you @Frenetic for attempting to answer my question, but this wasn’t quite what I was trying to explain.
To re-word this, many of you are probably familiar with the idea of using a Material Collection to globally control wind direction in a scene via a float3 parameter. Well, I’m basically looking for the same thing, only it controls the direction of a texture mask being projected at any object with this logic within it’s master material. For example, I could have the texture only showing on the north-west side of an object, with maybe a 20 degree downward angle as well.
I hope this makes it more clear what I am looking for, if it’s possible to do in the first place. Thanks again.
Something like this? +X → Forward in Unreal, so assume that is ‘north’.
There is no reason you cannot use the MPC or whatever to store/set that vector you want to blend across, it’s just 4 numbers in the end. You could also use a custom primitive data element when spawning the meshes and add some variability that way.
Thank you so much @Frenetic, this gets me very close to what I’m after. I just need to work out how to use the MPC instead of the VertexNormalWS node. Then it will be just what I’m after.
Ok, so using a “HeightLerp” node, I could figure out how to connect my “Moss_Direction” MPC. However, as viewable in the image below, I was able to make it work perfectly to what I was after using the “WorldAlignedBlend” node. Thanks again for the help!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.