threads - Cut right-handed threads into a cylindrical object
Displacement "threads" "maporigin" p "xaxis" p "yaxis" p "zaxis" p "freq" n "depth" n "phase" n "zmin" n "zmax" n "dampzone" n
point maporigin=[0 0 0] point xaxis=[1 0 0] yaxis=[0 1 0] zaxis=[0 0 1] float freq=5, depth=0.1, phase=0 float zmin=-1e20 zmax=1e20 dampzone=0
This shader cuts right-handed threads into a cylindrical object using the parameters maporigin, xaxis, yaxis, and zaxis to do a cylindrical projection as described in maps(3sh).
The parameter freq gives the number of threads per unit length along the cylinder. The depth parameter controls the depth of the threads, and phase rotates the threads about the z axis of the cylinder. A value of 0 means no rotation and 1 means 360 degree rotation. This can be used to match threads from different cylinders.
By default, the threads will be rendered along the entire length (along the z axis in shader space) of the cylinder. However, you can set minimum and maximum bounding z values with the zmin and zmax parameters. The surface will not have a thread pattern cut outside these boundaries. In addition, you can make the threads smoothly fade out instead of abruptly stopping at these boundaries by setting the dampzone parameter. This parameter controls the width of the zone in which the depth of the grooves goes to zero. This zone is inside the zmin and zmax boundaries.
Remember to set the displacement bounds attribute when using this shader.
This shader has problems with aliasing. The shadingrate usually needs to be set to quite a low number.
Pixar Animation Studios