POV-Ray : Newsgroups : povray.binaries.images : Crackle Server Time
25 Apr 2024 19:18:45 EDT (-0400)
  Crackle (Message 11 to 13 of 13)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Bald Eagle
Subject: Re: Crackle
Date: 17 Nov 2022 20:20:00
Message: <web.6376dd8c302862a41f9dae3025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> Also, these things are SLOW.

At least they are when I did it the way I did it.


This was a very short scene file, and fast.
This renders in 18 sec.

The color values are crap, and I have a lot of fudge factors, but it's headed in
the right direction.

Fully confident that at some point a version allowing SDL-generated Voronoi of
any user-defined data set will be possible.


Post a reply to this message


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

Preview of image 'shadertoyvoronoi.png'
shadertoyvoronoi.png


 

From: Bald Eagle
Subject: Re: Crackle
Date: 17 Nov 2022 22:05:00
Message: <web.6376f52c302862a41f9dae3025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> Fully confident that at some point a version allowing SDL-generated Voronoi of
> any user-defined data set will be possible.

Like so.

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.


Post a reply to this message


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

Preview of image 'shadertoyvoronoi.png'
shadertoyvoronoi.png


 

From: Bald Eagle
Subject: Re: Crackle
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


 

<<< Previous 10 Messages Goto Initial 10 Messages

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