Shading: Add More Features To The Voronoi Node.
This patch allows the Voronoi node to operate in 1D, 2D, and 4D space. It also adds a Randomness input to control the randomness of the texture. Additionally, it adds three new modes of operation: - Smooth F1: A smooth version of F1 Voronoi with no discontinuities. - Distance To Edge: Returns the distance to the edges of the cells. - N-Sphere Radius: Returns the radius of the n-sphere inscribed in the cells. In other words, it is half the distance between the closest feature point and the feature point closest to it. And it removes the following three modes of operation: - F3. - F4. - Cracks. The Distance metric is now called Euclidean, and it computes the actual euclidean distance as opposed to the old method of computing the squared euclidean distance. This breaks backward compatibility in many ways, including the base case. Reviewers: brecht, JacquesLucke Differential Revision: https://developer.blender.org/D5743
This commit is contained in:
@@ -733,9 +733,9 @@ static ShaderNode *add_node(Scene *scene,
|
||||
else if (b_node.is_a(&RNA_ShaderNodeTexVoronoi)) {
|
||||
BL::ShaderNodeTexVoronoi b_voronoi_node(b_node);
|
||||
VoronoiTextureNode *voronoi = new VoronoiTextureNode();
|
||||
voronoi->coloring = (NodeVoronoiColoring)b_voronoi_node.coloring();
|
||||
voronoi->metric = (NodeVoronoiDistanceMetric)b_voronoi_node.distance();
|
||||
voronoi->dimensions = b_voronoi_node.voronoi_dimensions();
|
||||
voronoi->feature = (NodeVoronoiFeature)b_voronoi_node.feature();
|
||||
voronoi->metric = (NodeVoronoiDistanceMetric)b_voronoi_node.distance();
|
||||
BL::TexMapping b_texture_mapping(b_voronoi_node.texture_mapping());
|
||||
get_tex_mapping(&voronoi->tex_mapping, b_texture_mapping);
|
||||
node = voronoi;
|
||||
|
||||
Reference in New Issue
Block a user