POV-Ray : Newsgroups : povray.binaries.images : Crackle : Re: Crackle Server Time
19 Apr 2024 07:43:13 EDT (-0400)
  Re: Crackle  
From: Bald Eagle
Date: 18 Nov 2022 16:45:00
Message: <web.6377fc36302862a41f9dae3025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> Now to just figure out my damned screen coordinates and calculations, remove any
> fudge factors, and figure out what's making it so dull & gray.
>
> Then maybe there's away to assign a color to the cells.

Cleaned it up a bit, explicitly understood all of the function outputs, and
removed all of the fudge factors.

The gray color was the Voronoi function pigmenting the plane at a distance from
the cell centers.

I tried doing something along the lines of crackle solid, using cosine, and
raising the result to a power, and trying to use select() or modifying the color
map.   Maybe someone has a better idea than I do.

As for adding per-cell color, I don't think it's possible through SDL, as the
pattern (as currently implemented) just yields the minimum of all of the
distances between the current pixel and all of the cell centers.  There's no way
that I can see to carry-over a tag or other identifying value, principally
because it's the min () that generates the extent of every cell.

I don't see how there's a way around the "scrubbing" of all additional data
through the min () and POV-Ray's scalar-only functions.  But maybe someone has a
clever idea.

I think it could be done with an algorithm, but that would probably require
sacrificing the speed of the current method.   But if a user-controlled Voronoi
pattern with specified colors or textures, or finishes were required for a
project, it could be done - just with a lot of waiting for the result.

I do think that the current results would make a neat heightfield for a terrain
scene.


Post a reply to this message


Attachments:
Download 'shadertoyvoronoi.png' (55 KB)

Preview of image 'shadertoyvoronoi.png'
shadertoyvoronoi.png


 

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