Can you Rotate a Procedural Texture?

I am trying to simulate random scratches on glass in Cycles. My approach was to use a procedural noise texture scaled in one direction, then rotated randomly. Then layer a few more noise textures with different rotations. These combined would simulate scratches (at least I hope).

I am using Vector Mapping to try to rotate the texture on the object, but can’t seem to get an angled rotation…scratches only seem to run in X/Y axis.

Attached is node setup and a render example…shows the stretched noise texture but can’t get to rotate at an angle. Any ideas?

Attachments


2 ways

with adding an empty and assign it to the texture

or do it with a node rotate!

salutations

A procedural texture is just like any other texture except that its output is calculated by a computer algorithm. The algorithm can take different inputs, particularly including coordinates of the object being textured. You can then use that texture pretty much like any other type of texture, perhaps after “baking” it. But … why bother?

Honestly, though … what if you just took an image, put a whole bunch of different scratches onto it literally with a (digital…) pen, and then started UV-mapping that image a number of different ways, further modifying the result e.g. with nodes to make it look like scratches of various kinds. It will work, as a raw source of “these are random scratches” input, and between UV-mapping fun and node-based pixel-twiddling fun you can probably in the space of an hour get marvelous scratches.

Keep front-and-center in mind that you always build up a visual effect out of simpler components, and that Nodes Are Your Bestest Friend.

Node Rotate? What is that? Did I mention I am using Cycles?

well even in cycles

add a geometry node and there you can scale and rotate your texture !

salutations

RickyBlender - I’m not understanding…can you post a sample node setup?

try this
can also for proc texture


but the image is also tiled!

salutations

Hi! This is the first topic that comes up on Google for this issue.

I ran into a similar situation today wherein I was trying to rotate a “Noise Texture” that was previously squished by a “Mapping Node”.

The solution that I came upon was doing it in reverse: first rotating and then squishing using two different “Mapping Nodes”.

But if the “Mapping Node” is switched to “Texture” instead of “Point”, it does seem to work using only one node (scale just needs to be its reciprocal and flip the sign on rotation).


I might be just saying stuff everyone already knows XD but I did want to give a heads up in case anyone is running into the same issue as I did today :slight_smile: Peace and God bless!

1 Like

I was going crazy unable to rotate a scaled noise :smiley:
Thanks a lot for your answer and precision !
Mapping rotate then mapping scale works perfectly as expected.

1 Like