Node groups for the creation of procedural polygons and tiling hexagons for Cycles.
This works by remapping your texture coordinates into a modified, polygonal texture space. There are two main node groups: Polyspace creates a texture coordinate system where the X coordinate represents distance along each line of a polygon and Y represents the distance from an arbitrary edge-- you define the number of sides. Hexspace works by remapping your texture space into a series of hexagons in the 0-1 range, and providing a identifier for each hexagon created (for hexagon-wide noise lookups or whatever.)
In addition to these node groups, the file also contains node groups for RotateAboutAxisAngle, ScaleAbout, CoordinateModulo, Ceiling/Floor, Fuzzy Equals, and Unnormalized Cross-product. These use a few additional node groups from my own math nodes blend here on Blendswap: Lerp, Rectangular/Polar, Radians/Degrees/Normal, Length, Vector Scale.
This file contains a couple of textures for the demonstration-- a CC0 tiling floor to demonstrate hexagonal perturbation for tiling textures, a 0 and a 1 texture I created to demonstrate the use of using hexagon ID -> noise tex for texturing tiling hexes with random numbers, and a low-res, CC0 HDR for lighting glossies where I wanted to show the bump.
This was something that felt obvious to me, and it seemed strange that I hadn't seen anyone implement it before-- but after implementing it, I know why. It was a pain.
Hope somebody here finds it useful. Let me know about bugs if you find any-- I wouldn't be surprised.
There are no comments yet, log in to add one and start a discussion. Make someone feel good today!