Where do you access the points that are used to draw textures in nodes?

No. It’s a “time saving” design!

When a procedural texture is called, it’s called only for a specific point (sample). This has the advantage of allowing parallel computing of multiple samples, but it creates a gap between each sample, as they don’t ‘communicate’ with each others.

Voronoi is an expensive calculation to be executed in this kind of paralllel environment, and that’s why our ‘Voronoi’ texture uses the ‘Worley’ algorithm (by Steven Worley), and not a true Voronoi calculation.

The big problem of a true Voronoi procedural, is that for each sample, we need to loop over all points
in its vicinity to calculate the minimum distance to the sampling coordinate (and this lookup must be done for every sample!).

This is not suitable for ‘realtime’/parallel computing, as it might happen that the closest cell point might well be far away from the sampling point, which requires lots of calls to the featured points list.

On the other hand, the Worley Noise is simpler. It uses a grid of 27 cells (3x3x3 in the 3D/4D version) around the sampling point, and all samples perform the same operation! Its calculation is pretty straigth forward, and also easy to implement in parallel computing.

As SterlingRoth said, a true Voronoi can be implemented in OSL, but I can tell you that is quite expensive on its own. Even with a good lookup structure for your point data, it will be slow (exponentially slow, depending on the number of points in your list)!

2 Likes