POV-Ray : Newsgroups : povray.advanced-users : Direct stochastic tiling Server Time
23 Nov 2024 23:56:33 EST (-0500)
  Direct stochastic tiling (Message 17 to 26 of 26)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Bald Eagle
Subject: Re: Direct stochastic tiling
Date: 1 Nov 2023 20:05:00
Message: <web.6542e74b5bb87ec31f9dae3025979125@news.povray.org>
Working through the spiral part of:

http://flycooler.com/download/Wood_SIGAsia2016.pdf

And struggling to understand

1) how the texture actually gets mapped/tiled onto the spiral

and

2) what points then, am I interpolating?

I'm guessing that either the 2D texture get mapped once onto each successive
turn of the spiral,
or it gets mapped linearly onto the nonlinear arc-length of the spiral arms, and
so there are then spaces between the x-dimension points?

Maybe someone could look at this and offer some ideas?
Even if you're just shooting in the dark, whatever you suggest might trigger an
idea for a solution.

Thanks!

- BW


Post a reply to this message

From: Bald Eagle
Subject: Re: Direct stochastic tiling
Date: 2 Nov 2023 18:20:00
Message: <web.654420575bb87ec31f9dae3025979125@news.povray.org>
Slowing working through things.

To help me work through understanding how to use the end result of all of the
daisy-chained algorithms in an actual texture, I needed to understand how to
remap <x, y> into <r, theta>

So here's a nice pigment {function {}} to make an infinite spiral in the xy
plane.

(Thanks again, ShaderToy coders!)

I think this would be a nice basic stock pattern for POV-Ray.
I set the spiral turn spacing to twice the line thickness to get a "maximally
dense" spiral.

- BW


Post a reply to this message


Attachments:
Download 'spiralpattern.png' (588 KB)

Preview of image 'spiralpattern.png'
spiralpattern.png


 

From: Bald Eagle
Subject: Re: Direct stochastic tiling
Date: 2 Nov 2023 20:00:00
Message: <web.654437bf5bb87ec31f9dae3025979125@news.povray.org>
It also seems to me that in addition to knowing if I'm on of off/in-between the
spiral, I'll need to somehow be able to know how far along the arc length of the
spiral I am at any given point.

Varying the r, g, and b values by different multiples of the arc length formula,
and changing the thickness of the lines as a function of arc length gives me the
attached.

- BW


Post a reply to this message


Attachments:
Download 'spiralpattern.png' (439 KB)

Preview of image 'spiralpattern.png'
spiralpattern.png


 

From: William F Pokorny
Subject: Re: Direct stochastic tiling
Date: 3 Nov 2023 08:35:39
Message: <6544e91b$1@news.povray.org>
On 11/2/23 18:19, Bald Eagle wrote:
> I think this would be a nice basic stock pattern for POV-Ray.
> I set the spiral turn spacing to twice the line thickness to get a "maximally
> dense" spiral.

I'm interested - FWIW. :-)

Maybe 5-6 weeks back I started to dig more into our warp{} code. I'd 
like to rework it all, including a bunch of hacks I have in that code. 
Then stuff, and more stuff, and it's on the back burner of the stove 
again...

One thing I'd like to do in yuqk is dump the two inbuilt spiral patterns 
for more general, tapered spiral warping as one or more additional 
options of the warp{} mechanism.

We have too f_spiral() - which has issues - as you well know. The 
solutions to which, I believe, sit more with some sort of general 
tapered warping capability.

Aside: We can today implement a limited form of the sort of spiral - I 
think you're implementing - with a series of half arc functions (there 
is too the new-ish list_object pattern in yuqk which could use the torus 
or functions via coded isosurfaces(a) (inside tests)). This approach, 
however, slows down significantly on the addition of each half arc.

(a) The inside test of 'isosurface shapes' is relatively fast when used 
for object based patterns. It's just whether the function returns a 
negative value or not at a given location. In fact, 'isosurface shapes 
for inside test purposes' do not need to be good isosurfaces with 
respect to being render-able as actual shapes!

Anyhow, I'm interested in seeing what code you work up.

Bill P.


Post a reply to this message

From: Bald Eagle
Subject: Re: Direct stochastic tiling
Date: 3 Nov 2023 15:35:00
Message: <web.65454a8c5bb87ec31f9dae3025979125@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

> One thing I'd like to do in yuqk is dump the two inbuilt spiral patterns
> for more general, tapered spiral warping as one or more additional
> options of the warp{} mechanism.

Just search "shadertoy spiral" and you'll be there for hours.  ;)
https://www.shadertoy.com/user/FabriceNeyret2     is your guy.
Maybe if we reached out to him, he might have some interest in seeing what we do
here...

> We have too f_spiral() - which has issues - as you well know. The
> solutions to which, I believe, sit more with some sort of general
> tapered warping capability.

Well, f_spiral, I think - was just something to make an isosurface type thing.
I think we could probably use some general spiral equations and implement the
tubular function approach for things like that.

Speaking of functions, it would probably be a good idea if you're implementing
inbuilt functions to have some mechanism by which to get the 1st and 2nd
derivatives, or a tangent to a point using a numerical approach --- useful
things to have that make coding a scene & orienting shapes a thousand times
easier for people.

With regard to warps and spirals, I finally got that spiral warp worked out,
which is just a rotation matrix with a falloff function.

Perhaps you could play with a general warp mechanism which takes a
transformation matrix and a falloff function and pairs them up to make a warp.
You could have 2D warps, 3D warps (like my tornado), etc.

I also absolutely think that we need to have a geometric inversion function,
since I think it's something that would inspire a LOT of experimentation, cool
scenes, novel approaches, animations, and all manner of things I can't possibly
predict.

Ditto FFT.  Have it take a start, stop, and function (especially spline), and
have it output an array.

> Aside: We can today implement a limited form of the sort of spiral - I
> think you're implementing - with a series of half arc functions (there
> is too the new-ish list_object pattern in yuqk which could use the torus
> or functions via coded isosurfaces(a) (inside tests)). This approach,
> however, slows down significantly on the addition of each half arc.

Bah.  No need to do any such thing when doing it analytically it so
straightforward.

> (a) The inside test of 'isosurface shapes' is relatively fast when used
> for object based patterns. It's just whether the function returns a
> negative value or not at a given location. In fact, 'isosurface shapes
> for inside test purposes' do not need to be good isosurfaces with
> respect to being render-able as actual shapes!

True.  That might be a good point to make in the documentation.

- BW


The basic Archimedean spiral is just:

#declare Distance = function (X, Y, Z) {sqrt (X*X+Y*Y+Z*Z)}
#declare fmod = function (Value, Modulo) {select (Value, 1 - mod (abs (Value),
Modulo), mod (abs (Value), Modulo))}  // this gives a mod function that remains
consistant across the origin
#declare Sqr = function (N) {N*N}

#declare ArmSpacing = 0.004;
#declare LineThickness = 0.0004;

#declare Aspect = image_width/image_height;
#declare U = function {x/image_width*Aspect}
#declare V = function {y/image_height}

#declare Angle = function {atan2 (V(x,y,z), U(x,y,z))}
#declare l = function {Distance (U(x,y,z), V(x,y,z), 0)}

#declare Offset = function {l(x,y,z) + ArmSpacing * (Angle(x,y,z)/(tau))}
#declare circles = function {fmod (Offset(x,y,z), ArmSpacing)}

#declare FracTurn = function {abs (l(x,y,z)/ArmSpacing - Angle(x,y,z)/(tau))}
#declare ArcLength = function (b, _Theta) {b/2 * (_Theta * sqrt (1 +
_Theta*_Theta) + ln (_Theta + sqrt (1 + _Theta*_Theta)))}

#declare f_Spiral = function {select (circles (x,y,z) - LineThickness, 0, 1)}


Plenty of other spirals out there to code up and experiment with, once I get
some of this other heavy-lifting out of the way.

Maybe we could/should have a website topic every month / quarter, and solicit
submissions for algorithms, functions, patterns, renders, etc. and have
something new and fresh on the POV-Ray homepage.

(I still think that getting out there on social media, and promoting POV-Ray is
the way forward wrt to finding new talent, and new people to help write source
so that we can fix bugs, add new features, and brainstorm a workable fresh start
with 4.0.)

- BW


Post a reply to this message

From: William F Pokorny
Subject: Re: Direct stochastic tiling
Date: 3 Nov 2023 19:20:38
Message: <65458046$1@news.povray.org>
On 11/3/23 15:31, Bald Eagle wrote:
> Plenty of other spirals out there to code up and experiment with, once I get
> some of this other heavy-lifting out of the way.

:-) Indeed. Somewhere, I've got a book on nothing but spirals.

I guess I see a practical need for some basic capability for vortex 
effects and a few of the more basic spirals. Beyond that, not sure.

Thanks for the additional ideas and especially the spiral code with 
which I play. I've got some of your earlier work on spirals stashed away 
too for when I can really get after the topic.

Heck, I've got a LOT of your general ideas stashed away! I can't keep up 
with you - or jr - truth be told.

On the "bah" comment. One of the things our current spiral capability 
doesn't do well is start and stop exactly where we want it to - in a 
clean way. We have hard starts and stops on numerical limits or by 
fading the effect in or out. The piecemeal assembly of spirals does fill 
a need for clean, limited duration, spirals - admittedly by default! :-)

Thanks for the thought to add the isosurface inside test comment to 
documentation. It's done in the documentation I'm shipping with the yuqk 
fork.

These days, I'm less a fan of massive popularity for POV-Ray than I 
expect you and others are. I'm becoming more and more averse to noise - 
and kids playing on my lawn.

Bill P.


Post a reply to this message

From: Bald Eagle
Subject: Re: Direct stochastic tiling
Date: 3 Nov 2023 20:50:00
Message: <web.654594d25bb87ec31f9dae3025979125@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

> On the "bah" comment. One of the things our current spiral capability
> doesn't do well is start and stop exactly where we want it to - in a
> clean way. We have hard starts and stops on numerical limits or by
> fading the effect in or out. The piecemeal assembly of spirals does fill
> a need for clean, limited duration, spirals - admittedly by default! :-)

Humbug.

The spiral equations are analytical, and therefore ought to lend themselves to
directly limiting the radius or arc length of the generated spiral.

It would be a simple matter of experimenting, asking a shadertoy coder, or
posting a request on stackoverflow or similar smarty-pants site for a way to
limit the rendered spiral's domain.

I have wide-ranging interests, a fertile and sometimes overactive imagination,
usually shallow pockets, and a disdain for people telling me what I can't or
especially am not allowed to do.

Which means that somehow, some way, eventually, _I'll find a way_.
I've done it with making a commercial database using only an open source
spreadsheet, and I've done it will full-color (almost) tileable Voronoi using
only functions.

Spirals ought to be easy.
I haven't even investigated implementing a SDF for the spiral, but I know it's
possible.

- BW

It would be nice to have a wish-list that operated something like a c++ list -
where things could be added onto the list and then removed (or marked as done),
so that people could scroll through it if they were bored and looking for
something to do.  ;)
Maybe enable tags to assign priority or difficulty levels, etc.
(Similar to bug-reporting 3rd party services like FlySpray, do they have
feature-request maintaining services?)
[Oh, right, I guess they do - it's called "SaaS"]


Post a reply to this message

From: Bald Eagle
Subject: Re: Direct stochastic tiling
Date: 4 Nov 2023 12:25:00
Message: <web.65466f605bb87ec31f9dae3025979125@news.povray.org>
Trying to work out the "growth rings" part of the the paper, and while the words
sound reasonable, translating that into equations and code is --- less
straightforward.

Thankfully, due to the lessons of the past million projects, I can at least come
up with workable POV-Ray equivalents that serve the same purposes.

At least the pattern looks like wood, although the texture and finish are
obviously not even close - since that will rely heavily on later work.

hdr light probes really change the colors compared to a point light source and
sky_sphere!   :O

At least it looks somewhat like a cheap 4x4 post I might see at a big box store.

- BW


Post a reply to this message


Attachments:
Download 'growthrings.png' (1248 KB)

Preview of image 'growthrings.png'
growthrings.png


 

From: Bald Eagle
Subject: Re: Direct stochastic tiling
Date: 4 Nov 2023 15:45:00
Message: <web.65469e125bb87ec31f9dae3025979125@news.povray.org>
After a few more hours of feeling my way through the math of the patterns I
wanted,  I was able to apply the pores to the wood, and then add the rays.

I only partially know what I'm doing, and don't have very good control over how
all of the parameters in the functions work.

Basically what I'm doing is creating a grid of circles, but radially, using
cylindrical coordinates.

Then it's just adding some randomness and scaling to get the desired effects.

No idea if at this point adding SSLT to the finish would really boost it.

- BW


Post a reply to this message


Attachments:
Download 'growthrings.png' (1480 KB)

Preview of image 'growthrings.png'
growthrings.png


 

From: And
Subject: Re: Direct stochastic tiling
Date: 15 Nov 2023 07:00:00
Message: <web.6554b1945bb87ec319234387aa81652d@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Trying to work out the "growth rings" part of the the paper, and while the words
> sound reasonable, translating that into equations and code is --- less
> straightforward.
>
> Thankfully, due to the lessons of the past million projects, I can at least come
> up with workable POV-Ray equivalents that serve the same purposes.
>
> At least the pattern looks like wood, although the texture and finish are
> obviously not even close - since that will rely heavily on later work.
>
> hdr light probes really change the colors compared to a point light source and
> sky_sphere!   :O
>
> At least it looks somewhat like a cheap 4x4 post I might see at a big box store.
>
> - BW

Wow, this looks interesting.

The paper you posted: ?
https://arxiv.org/pdf/1511.04224.pdf

When I saw it again, it looks more valuable.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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