POV-Ray : Newsgroups : povray.binaries.scene-files : Granite_21 macro - beta #1.4 : Re: Granite_21 macro - beta #1.5 Server Time
20 Sep 2021 22:45:59 EDT (-0400)
  Re: Granite_21 macro - beta #1.5  
From: Thomas de Groot
Date: 4 Jun 2021 08:06:30
Message: <60ba1746$1@news.povray.org>
Op 4-6-2021 om 12:20 schreef Bald Eagle:
> 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 did a bit of browsing about voronoi diagrams, in particular MathWorks, 
and it occurred to me (just thinking aloud here) that if we could 
generate a 3d voronoi volume based on a random set of points in an 
array, that volume - intersected by the object we want to texture with 
granite - would give a 2d voronoi granite pattern. At least, that was 
how I interpreted the info given in MathWorks, which somehow seemed to 
click right away with those papers you directed me to.

Perhaps, we do not even need a 3d volume at all, but it seems to me that 
it would be a better, or more "natural", approach to the problem.

> 
> 
> 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.
> 
That is an interesting idea... we should certainly follow up that line 
to see where it would get us.

> And, of course Jerome Grimbert has already addressed this in hgpovray38
> https://wiki.povray.org/content/User:Le_Forgeron#voronoi
> 
Ok. I need to look at that.

> 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.
> 
Maybe. I am not sure what the black hole warp would really add to the 
turbulence warp already in place. Granites are not very turbulent by 
themselves and rather monotonous in fact.

>> 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
> 
Well, it appears we shall not have time to get bored or idle. ;-)

In the meantime, I have started to write that piece of documentation you 
asked about. Steadily growing.

-- 
Thomas


Post a reply to this message

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