|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Relevant search results and further reading:
Stephane Laurent (stla)
https://github.com/stla/Apollonius
Inigo Quilez
https://www.shadertoy.com/view/4sd3D7
Voronoi Diagram Research Center
http://voronoi.hanyang.ac.kr/c3_voronoiDiagrams.htm
Need to further look into:
Johnson-Mehl tessellation
Post a reply to this message
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Re: v3.8+ crackle instability (facets?) with >1 uses per thread.
Date: 12 Nov 2024 03:17:16
Message: <67330f0c$1@news.povray.org>
|
|
|
| |
| |
|
|
On 11/11/24 15:30, Bald Eagle wrote:
> Relevant search results and further reading:
>
> Stephane Laurent (stla)
> https://github.com/stla/Apollonius
>
> Inigo Quilez
> https://www.shadertoy.com/view/4sd3D7
>
> Voronoi Diagram Research Center
> http://voronoi.hanyang.ac.kr/c3_voronoiDiagrams.htm
>
> Need to further look into:
> Johnson-Mehl tessellation
>
Thanks for the references. IIRC shadertoy has a distance method to draw
the outline of cells, but I don't recalled the particulars at the
moment. I have ideas for how to do it in C++, but I also wonder if in
yuqk it cannot already 'mostly' be done. Stuff like this why I added the
ip_raw_return as a yuqk crackle option. Maybe I'll take a 'crack' at it
in a bit.
I see a path to something like a the Delaunay dual for which performance
might be acceptable, but due the current limits to the three closest
measures it would be limited / degenerate in a strict sense.
As for other extensions, some might be worth a try.
With a lot of this voronoi like stuff, 2d is a lot easier than three.
General, solid 3D solutions likely requires stand alone dedicated code.
We are working under the constraint that we want a reasonably performant
pattern in the end - as you know :-).
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
William F Pokorny <ano### [at] anonymousorg> wrote:
> IIRC shadertoy has a distance method to draw
> the outline of cells, but I don't recalled the particulars at the
> moment. I have ideas for how to do it in C++, but I also wonder if in
> yuqk it cannot already 'mostly' be done. Stuff like this why I added the
> ip_raw_return as a yuqk crackle option. Maybe I'll take a 'crack' at it
> in a bit.
Perhaps you are thinking of this article:
https://iquilezles.org/articles/voronoilines/
> I see a path to something like a the Delaunay dual for which performance
> might be acceptable, but due the current limits to the three closest
> measures it would be limited / degenerate in a strict sense.
I'm not sure where we are with libraries, but I'm pretty sure CGAL has all of
this stuff, plus a bewildering pile more.
> With a lot of this voronoi like stuff, 2d is a lot easier than three.
> General, solid 3D solutions likely requires stand alone dedicated code.
> We are working under the constraint that we want a reasonably performant
> pattern in the end - as you know :-).
Maybe?
I don't really know that that's true, if we exclude the fancy stuff.
A dirt-simple min (distance-of-pixel-from-all-seeds) ought to work just as well
in 3D as it does in 2.
I'll bet that visualizing that with a black-to-clear gradient or media would be
a quick and easy test.
- BW
Post a reply to this message
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Re: v3.8+ crackle instability (facets?) with >1 uses per thread.
Date: 17 Nov 2024 06:51:35
Message: <6739d8c7$1@news.povray.org>
|
|
|
| |
| |
|
|
On 11/12/24 03:17, William F Pokorny wrote:
> Thanks for the references. IIRC shadertoy has a distance method to draw
> the outline of cells, but I don't recalled the particulars at the
> moment. I have ideas for how to do it in C++, but I also wonder if in
> yuqk it cannot already 'mostly' be done. Stuff like this why I added the
> ip_raw_return as a yuqk crackle option. Maybe I'll take a 'crack' at it
> in a bit.
I didn't spend much time on it, but the top of the attached image shows
outlines as a pigment just slightly red (negative) by allowing raw value
returns after changing ip_form to: 'ip_form <-0.1,0.08,0> - the default
is <-1,1,0>.
The bottom of the image is an isosurface where a cylindrical shell is
intersected with a similar crackle pattern in space. No attempt wrap the
cylinder - just punching out a thin part of the crackle cell outlines.
The isosurface functions are:
// yuqk required
#declare Fn00 = function (x,y,z) {
f_planar(f_cylinder(x,y,z,0.9),0.01,1)
}
#declare FnCrk = function {
pattern {
crackle
ip_form <-0.1,0.097,0>
ip_strength <0.25,0.25,0.25>
ip_raw_return
raw_wave
translate <0,0,0.25>
scale 1/5
}
}
#declare Fn01 = function (x,y,z) { max(Fn00(x,y,z),FnCrk(x,y,z)) }
Yes, The outline / cell-walls vary some due differences in gradients -
but more due how the slices catch the cell wall. For practical purposes,
expect an approach like this often OK for cell outlines.
Bill P.
Post a reply to this message
Attachments:
Download 'be_crk.jpg' (124 KB)
Preview of image 'be_crk.jpg'
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Re: v3.8+ crackle instability (facets?) with >1 uses per thread.
Date: 17 Nov 2024 07:53:18
Message: <6739e73e$1@news.povray.org>
|
|
|
| |
| |
|
|
On 11/17/24 06:51, William F Pokorny wrote:
> No attempt wrap the cylinder - just punching out a thin part of the
> crackle cell outlines.
Got some coffee in me and gave the cylindrical warp a go. The crackle
function becomes:
#declare FnCrk = function {
pattern {
crackle
ip_form <-0.1,0.080,0>
ip_strength <0.25,0.25,0.25>
ip_repeat <5,0,0>
ip_raw_return
raw_wave
scale 1/5
scale <1/5,1,1>
warp { cylindrical }
}
}
(And I fattened up the cell walls for a better gradient)
Aside: I think there is a slight stretch in the wrap because the warp{}
mapping warps often seems to want radian measures - 'scale <1/tau,1,1>'
for best geometric mapping.
Anyhow. Image attached.
Bill P.
Post a reply to this message
Attachments:
Download 'tmpiso_wrp.png' (178 KB)
Preview of image 'tmpiso_wrp.png'
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Re: v3.8+ crackle instability (facets?) with >1 uses per thread.
Date: 17 Nov 2024 18:13:28
Message: <673a7898@news.povray.org>
|
|
|
| |
| |
|
|
On 11/17/24 07:53, William F Pokorny wrote:
> Got some coffee in me and gave the cylindrical warp a go.
While playing, created attached images. The right one by accident...
Last part of the function { pattern {crackle ...} } used was:
warp {
it_amount <1/3,1/3,1/3>
it_omega 0.87 it_lambda 4.7 it_scale 1/5
}
scale <1/6,1,1>
warp { cylindrical }
warp { spherical } // Oops
Aiming again for shapes that are not really shapes in a usual way.
Suppose yesbird's recent gravity toy post in the same vein.
The isosurface gradient set low (1.3), accuracy really rough at 0.05,
but with isosurface jitter (jittering within accuracy range) on - and
aggressive AA (antialias_min_depth=2 +r4) sampling. yuqk only features
are involved.
Bill P.
Post a reply to this message
Attachments:
Download 'morecracks.jpg' (251 KB)
Preview of image 'morecracks.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 11/17/24 06:51, William F Pokorny wrote:
> > No attempt wrap the cylinder - just punching out a thin part of the
> > crackle cell outlines.
Huh. And what happens if you do the same sort of thing with something like the
Stanford bunny?
- BW
Post a reply to this message
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Re: v3.8+ crackle instability (facets?) with >1 uses per thread.
Date: 18 Nov 2024 06:51:54
Message: <673b2a5a@news.povray.org>
|
|
|
| |
| |
|
|
On 11/17/24 21:52, Bald Eagle wrote:
> William F Pokorny <ano### [at] anonymousorg> wrote:
>> On 11/17/24 06:51, William F Pokorny wrote:
>>> No attempt wrap the cylinder - just punching out a thin part of the
>>> crackle cell outlines.
>
> Huh. And what happens if you do the same sort of thing with something like the
> Stanford bunny?
>
If the aim is seeing the outlines rather than creating an isosurface
shape from them, the quick thing would be to create a pigment from the
crackle pattern set up to show outlines - the parts of the pattern not
outlines would be set transparent. Ignoring that we can define an inside
vector for a well formed / closed mesh, a mesh surface is already
infinitely thin for the purposes of sampling.
If you want to play with isosurfaces based upon a mesh, one of the
techniques to turn them into value fields would be the up front
approach. There are a couple SDL only ones. A method I posted in the mid
to late 2000s and one Sam B posted in the early 2010s. The yuqk fork has
hard_object{} and soft_object{} inbuilt features for turning shapes into
value fields / patterns.
The recent filling a shape with random noise approach might work for a
noisier result. There is too a way to pre-sample a shapes interior
saving the result as a df3 file which can then be used as a value
pattern suitable for an isosurface.
A straight intersection with a mesh having a clean inside region or any
object with an defined inside is an option too. The gradients will be
bad and the result, visually, less interesting as the outer layer of
cell outlines will hide everything to the interior.
Bill P.
Aside: I've wondered some what an intersection of two crackle value
pattern intersected might look like - where one crackle changes ip_seed,
is rotated or scaled differently such that the cells walls intersect
sparsely.
With the ip_strength option set up asymmetrically we might also be able
to define certain patterns or shapes. One crackle ip_repeat, repeating
differently than the other where both have identical ip_seed, seeds...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|