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?
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.
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 Peace and God bless!
I was going crazy unable to rotate a scaled noise
Thanks a lot for your answer and precision !
Mapping rotate then mapping scale works perfectly as expected.