First stab at adding a hexagon pattern to Cycles that can be used on the GPU as well as the CPU and that is not
based on OSL.
The image was created with the following noodle:
As you can see, the hexagon node provide both a color and two float outputs. The first is the distance squared to the centre of the hexagon, the second one the distance squared to the centre of the nearest neighbour. Having both output allows for the easy creation of an edge, as shown in the noodle.
Code
The code follows the implementation of the OSL version closely and might be sub-optimal. My first steps will be to document my steps in creating a completely new node (because no less than 15(!) files needed to be changed or added to implement a single node. After that I want to optimize the code a bit and wait for feedback on my
previous patch before submitting this one.
No comments:
Post a Comment