POV-Ray : Newsgroups : povray.binaries.images : Crackle again : Re: Crackle again Server Time
26 Nov 2022 04:01:44 EST (-0500)
  Re: Crackle again  
From: Bill Pragnell
Date: 24 Nov 2022 05:50:00
Message: <web.637f4aa5c37f1de022cd71f26f35e431@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> I've only just gotten back in, and haven't worked it out in enough detail to
> understand exactly how all the parts work.   I tried it with the "POVRAY"
> point set, got it to work, dabbled a bit more, and broke it again...

Everything used to generate the cells gets stored in arrays - try rendering
individual meshes to get a feel for the objects that go into the pigments.

What made me think of this method was a comment someone made in the other thread
that a field of cones could be used to generate a 2D voronoi field. My code uses
a 'depth' of 10, with 45-degree cones - the slice used by the function is just
above this y=-10 floor so tweaking might cause it to miss the objects.

The other thing I'm unsure about is how many arguments the max() function can
accept - this is probably the practical upper limit on the cell count.

> I'm wondering if there are other ways to control the colors of the cells - by
> height?  by area?

In that snippet, the BrightFn is what I use to generate the cell value 0-1; a
pigment was the obvious choice, but you might be able to do something with the
stored meshes to generate a suitable function for area... basically anything
that could feasibly be encoded in a function.

> Very interested in your mortar idea.

I was referring to the custom 'standard' crackle that you demonstrated in your
post, using the min distance from a seed point to generate the color value. The
documentation even mentions using a solid crackle with a regular crackle layered
over it to generate mortar for the solid cells.

> Also wondering if the Delaunay triangulation can be done as well.  Rendering
> the dual would be a cool effect.

No idea - this is a bit of a hack! I imagine triangulation could be done with an
SDL macro, and then the triangles could be colored however you want... but I
have no experience implementing Delaunay triangulation so I'm not sure.

> Great work, Bill - this was a very clever solution.

It was fun to think through! Now if only we could have iteration in user-defined
functions... :)


Post a reply to this message

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