|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Been doodling.
I'm not even sure if I had anything specific in mind when I started this, it was
a what-if situation that sort of ran away with itself. It's only partially
parametrized, so not yet something that could easily be deployed into a more
coherent scene.
It's basically a field of cells with some simple rules governing each cell's
contents, initial placement based on arbitrary geometry. I'd say at least half
the code is concerned with the stairs. It could be adapted to make balconies,
galleries or battlements for buildings... another half-finished tool for the
toolbox :)
Bill
Post a reply to this message
Attachments:
Download 'autobuild.jpg' (292 KB)
Preview of image 'autobuild.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 11/8/2021 6:27 PM, Bill Pragnell wrote:
> Been doodling.
>
> I'm not even sure if I had anything specific in mind when I started this,
Bucky Escher
--
dik
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Op 09/11/2021 om 00:27 schreef Bill Pragnell:
> Been doodling.
>
> I'm not even sure if I had anything specific in mind when I started this, it was
> a what-if situation that sort of ran away with itself. It's only partially
> parametrized, so not yet something that could easily be deployed into a more
> coherent scene.
>
> It's basically a field of cells with some simple rules governing each cell's
> contents, initial placement based on arbitrary geometry. I'd say at least half
> the code is concerned with the stairs. It could be adapted to make balconies,
> galleries or battlements for buildings... another half-finished tool for the
> toolbox :)
>
> Bill
>
M.C. Escher would have loved it!
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Bill Pragnell" <bil### [at] hotmailcom> wrote:
> Been doodling.
>
> I'm not even sure if I had anything specific in mind when I started this, it was
> a what-if situation that sort of ran away with itself. It's only partially
> parametrized, so not yet something that could easily be deployed into a more
> coherent scene.
>
> It's basically a field of cells with some simple rules governing each cell's
> contents, initial placement based on arbitrary geometry. I'd say at least half
> the code is concerned with the stairs. It could be adapted to make balconies,
> galleries or battlements for buildings... another half-finished tool for the
> toolbox :)
This is great, Bill. I love these sorts of things.
Are you familiar with the so-called "wave function collapse" algorithm? It can
produce similar results to this, but must be run for many cycles. Probably too
expensive to do in POV-Ray, but you never know. I haven't looked into WFC too
closely make an implementation yet, but it looks very promising.
Are the pathways here completely traversable, or are there islands?
Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Samuel B." <stb### [at] hotmailcom> wrote:
> Are you familiar with the so-called "wave function collapse" algorithm? It can
> produce similar results to this, but must be run for many cycles.
I was not! Having just looked it up, it does indeed seem applicable to this kind
of thing. However, as you say, probably quite expensive for an SDL
implementation. A very interesting approach to procedural generation that I'll
be sure to come back to at some point, thanks for the pointer!
My somewhat naive algorithm currently traverses the grid only 5 times: once to
zero it, once to populate it with 'floor' cells, once to remove 'loners', once
to place stair cells between suitable near-neighbour floor cells (in a
kind-of-random way), then finally once to build cell geometry based on the final
state.
> Are the pathways here completely traversable, or are there islands?
Good question! There will most certainly be islands, the above algorithm in no
way guarantees complete connectivity. However, given a high initial density of
floor cells, and also that the stair cell pass might replace
otherwise-unconnected floor cells with stair cells, it seems likely that
completely connected structures might occur by chance!
A nice aspect of this approach is that setting floor and stair cells manually is
an option. If I made the stair pass a bit more rigorous, in theory one could set
floor cells alone and let the program fill in the stairs etc.
Bill
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Bill Pragnell" <bil### [at] hotmailcom> wrote:
> Been doodling.
>
> I'm not even sure if I had anything specific in mind when I started this, it was
> a what-if situation that sort of ran away with itself. It's only partially
> parametrized, so not yet something that could easily be deployed into a more
> coherent scene.
>
> It's basically a field of cells with some simple rules governing each cell's
> contents, initial placement based on arbitrary geometry. I'd say at least half
> the code is concerned with the stairs. It could be adapted to make balconies,
> galleries or battlements for buildings... another half-finished tool for the
> toolbox :)
>
> Bill
Hi Bill,
Very well done !
I enjoy as much looking at the picture as thinking about how you did it. And I
was going to ask you the same as Samuel B. about wave function collapse.
I also wonder what a walk would look like in that maze. Maybe you could make an
animation out of it. Take a random cell on the surface of the sphere, perform a
random walk following the cells rules until you reach another surface's cell,
interpolate the camera position smoothly along the traversed cells...
Anyway, thanks for sharing.
Pascal
(thinking it's been way too long he hasn't done anything just for leisure
purpose using Pov... :( )
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Bill Pragnell" <bil### [at] hotmailcom> wrote:
> "Samuel B." <stb### [at] hotmailcom> wrote:
> > Are you familiar with the so-called "wave function collapse" algorithm? It can
> > produce similar results to this, but must be run for many cycles.
>
> I was not! Having just looked it up, it does indeed seem applicable to this kind
> of thing. However, as you say, probably quite expensive for an SDL
> implementation. A very interesting approach to procedural generation that I'll
> be sure to come back to at some point, thanks for the pointer!
It is very interesting. And coincidentally, somebody posted an implementation of
the wave function collapse algorithm in Shadertoy today. I don't know what kind
of rig you're running over there, but perhaps you can view it (warning: it takes
a while to compile): https://www.shadertoy.com/view/st3GDM
> My somewhat naive algorithm currently traverses the grid only 5 times: once to
> zero it, once to populate it with 'floor' cells, once to remove 'loners', once
> to place stair cells between suitable near-neighbour floor cells (in a
> kind-of-random way), then finally once to build cell geometry based on the final
> state.
It sounds like a good algo.
I was doing some /slightly/ similar things a while back, but only in 2D. I was
using marching squares, basically. But to make it work, I had to use lookup
tables for 2x2 evaluation, which meant I needed to specify all 16 unique
cases... 16 different objects that I needed to script manually. :/ And it gets
worse for 3d, since I would need to make a table comprised of 256 entries. There
must be a better way. But all that work would be to get seamless geometry for
marching cubes, something that is not really needed for most things.
> > Are the pathways here completely traversable, or are there islands?
>
> Good question! There will most certainly be islands, the above algorithm in no
> way guarantees complete connectivity. However, given a high initial density of
> floor cells, and also that the stair cell pass might replace
> otherwise-unconnected floor cells with stair cells, it seems likely that
> completely connected structures might occur by chance!
Getting a single connected path can be accomplished by using a maze algorithm,
whereby you would choose a random cell and then test neighboring cells randomly
to see if they contain a filled cell, and then branch a pathway off from that,
making sure not to intersect older, filled cells (unless you wanted looping
paths, of course). But you would need to wait some time before all cells were
filled.
> A nice aspect of this approach is that setting floor and stair cells manually is
> an option. If I made the stair pass a bit more rigorous, in theory one could set
> floor cells alone and let the program fill in the stairs etc.
Well, whatever the case, the result is a very nice aesthetic!
Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"BayashiPascal" <bai### [at] gmailcom> wrote:
> I enjoy as much looking at the picture as thinking about how you did it.
It is kind of fascinating. The render before this one, I'd mucked up how the
stairs get placed, and it took me ten minutes looking at it before I noticed the
problem.
> I also wonder what a walk would look like in that maze. Maybe you could make
> an animation out of it. Take a random cell on the surface of the sphere,
> perform a random walk following the cells rules until you reach another
> surface's cell, interpolate the camera position smoothly along the traversed
> cells...
That could actually work. I have a swathe of query macros to see what sort of
cell we're in, so choosing a path is totally feasible. It'd take forever, but
nice idea!
> (thinking it's been way too long he hasn't done anything just for leisure
> purpose using Pov... :( )
Do it! This started out tinkering on my phone whilst afk, switching between nano
buffers and command-line uberpov and typing using only my thumbs!
Bill
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Il 09/11/2021 00:27, Bill Pragnell ha scritto:
> Been doodling.
>
> I'm not even sure if I had anything specific in mind when I started
this, it was
> a what-if situation that sort of ran away with itself. It's only
partially
> parametrized, so not yet something that could easily be deployed into
a more
> coherent scene.
>
> It's basically a field of cells with some simple rules governing each
cell's
> contents, initial placement based on arbitrary geometry. I'd say at
least half
> the code is concerned with the stairs. It could be adapted to make
balconies,
> galleries or battlements for buildings... another half-finished tool
for the
> toolbox :)
>
> Bill
>
An impressive result, Bill! It reminds me a wip I abandoned years ago...
but your image is far better.
Paolo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Samuel B." <stb### [at] hotmailcom> wrote:
> And coincidentally, somebody posted an implementation of
> the wave function collapse algorithm in Shadertoy today. I don't know what
> kind of rig you're running over there, but perhaps you can view it
Not a very spry one unfortunately, but I'll try it on my work machine at some
point (much beefier than anything I have at home).
> Getting a single connected path can be accomplished by using a maze algorithm
Another algo I've never got around to tinkering with... mainly because I've
never thought of an interesting application for it :)
I've just been playing with putting the camera on a random floor cell, and I've
discovered some bugs in the stairs and cornering... fixit fixit fixit
Bill
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|