POV-Ray : Newsgroups : povray.binaries.scene-files : Granite_21 macro - beta #1.4 : Re: Granite_21 macro - beta #1.5 Server Time
18 Apr 2024 15:07:51 EDT (-0400)
  Re: Granite_21 macro - beta #1.5  
From: Bald Eagle
Date: 4 Jun 2021 06:25:00
Message: <web.60b9fe58388d0b7a1f9dae3025979125@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

> ...but seriously, I would be interested to know how to use voronoi
> diagrams for this particular project, apart from the crackles pattern.
> Something where the individual cells (and distribution of them) would be
> more "controlled" by the user. Beyond the "using voronoi without knowing
> it", that would completely change the whole granite setup I think.

Correct, and there has been some interest in exactly that for quite some time.

I have 2 or 3 implementations of Voronoi algorithms coded in GLSL/Shadertoy that
I've been meaning to start converting to SDL, in the hopes that I could get
something reasonably functional.



I didn't get to spend ANY POV-time yesterday, but I was thinking about exactly
what you're talking about, and it occurred to me that one thing we could
probably do is plug crackle into a function and then operate on the function
coordinates - like I did with the vortex.  That would give spatial control.

Then the whole bricks pattern trick would give further control over the
coloring.

And, of course Jerome Grimbert has already addressed this in hgpovray38
https://wiki.povray.org/content/User:Le_Forgeron#voronoi

I mean, even for now, we could probably just add some gentle black hole warps or
other warps to the basic granite pattern and introduce a little bit of
variation.  I'm bad at implementing warps, but maybe the quartz veins could
benefit from some clever application of them.

> At
> this moment, beyond the beta and beyond the final version.

Yes, just looking at the POV-Ray source code for the crackle and other
voronoi-based pattern shows it to be a little complex, and IIRC, the problem was
really that it's one of those things that you can do fairly straightforwardly
with an algorithm when directly shading pixels, but would be difficult or
impossible to do with straight SDL functions.

https://thebookofshaders.com/12/
https://iquilezles.org/www/articles/voronoilines/voronoilines.htm
https://iquilezles.org/www/articles/smoothvoronoi/smoothvoronoi.htm
https://iquilezles.org/www/articles/voronoise/voronoise.htm


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.