Applying Paning texture on vertical surfaces only?

I’ve been wracking my brain over this, I’m to much of a Ue4 idiot to figure it out it seems.

I’ve made a panning rain texture that I im trying to apply only to vertical surfaces, I’ve managed to scamble together a world alignment node but I cant for the world of me figure out how to exclude the horizontal.

(node)

(the current error, where it pans on surfaces facing the ground/sky)

any help would be appreciated, been trying to search for it but come up short.

You could use a vertex normal multiplied by a Constant3Vector with a 0,0,1 value, feed the result into a clamp node with 0 min and 1 max, feed that into the alpha pin of a lerp node, with the panning rain texture fed into the A pin and the non-panning texture into your B pin. (Might be vice-versa, I’m away from my dev PC at the moment.) You can also add a power node between the Multiply node and the Clamp node to modulate the contrast in acceptable angles between horizontal and vertical surfaces if you don’t want such a sharp contrast.

Good luck!

2 Likes

Hi faven, You could just add (time* color blue(0,0,1) * panning speed in world units) to your absolute world position, that will offset world Z an in effect your texture (with i gather you use for aplying rain?)

@mikiok thanks, ill give that a try (mainly cause for someone at intept at nodes as I am it seems to be the easiest solution)

@hippowombat ill try this aswell, just need to fully understand it:)

Thanks a lot!