POV-Ray : Newsgroups : povray.binaries.images : Bocce - WIP Server Time
21 Dec 2024 08:14:18 EST (-0500)
  Bocce - WIP (Message 11 to 20 of 21)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 1 Messages >>>
From: Chris R
Subject: Re: Bocce - WIP
Date: 19 Jun 2024 10:15:00
Message: <web.6672e7992d85bd69a364adf25cc1b6e@news.povray.org>
"Chris R" <car### [at] comcastnet> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > "Chris R" <car### [at] comcastnet> wrote:
> >
> > > One of the things that really helps with this is having a version of
> > > f_rounded_box that more accurately returns the distance of a point from the
> > > surface of the box.  That allows me to simply add/subtract other pigment
> > > functions with a depth I can model to the shape function in the isosurface.
> > > It's much slower than the built-in f_rounded_box, but gives more controllable
> > > results.
> >
> > Interesting.
> > What equation are you using?
> >
> > I'm wondering if you might benefit from this:
> >
> > https://iquilezles.org/articles/distfunctions/
> >
> > - BW
>
> Thanks for the link!  I'll have to compare them to what I wrote.  For my rounded
> box I basically constructed it from boxes, cylinders, and spheres for which I
> had exact distance functions; this version is much more elegant.
>
> -- Chris R.
I started with the rounded box function in the article and compared it to my
implementation, both just a straight box, and with noise added for a bumpy
surface.

First note:  The images are identical in both cases, so both functions are
computing the same thing.

Second note:  my version is 10X slower than Quilez version!

So, I will be replacing my version with the Quilez version in my code library,
and updating the library with all of the shapes from the article over time.

There is a little work in the porting, because POV-Ray functions don't take
vector arguments, so you have to unroll all of the vectors as x,y,z parameters,
but otherwise it was pretty simple.

Thanks again for the pointer!  I'm looking forward to faster renders...

-- Chris R


Post a reply to this message

From: Bald Eagle
Subject: Re: Bocce - WIP
Date: 19 Jun 2024 12:00:00
Message: <web.6672ffb22d85bd69de5e631125979125@news.povray.org>
"Chris R" <car### [at] comcastnet> wrote:


> Second note:  my version is 10X slower than Quilez version!

Yes, considering that you were assembling a big, piecewise function, that's not
surprising.

But also I.Q. is kind of known for trimming things down to the very barest
minimum and optimizing for speed, so he's always a good reference.

> So, I will be replacing my version with the Quilez version in my code library,
> and updating the library with all of the shapes from the article over time.

Good idea - I'm sure it will speed thing up immensely, and there's always
something new to learn.

> There is a little work in the porting, because POV-Ray functions don't take
> vector arguments, so you have to unroll all of the vectors as x,y,z parameters,

Tell.
Me.
About it.

Maybe you can write a macro or something to help with the unrolling to make
things more efficient.

- BW


Post a reply to this message

From: Chris R
Subject: Re: Bocce - WIP
Date: 24 Jun 2024 17:10:00
Message: <web.6679e0892d85bd694d6accde5cc1b6e@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Chris R" <car### [at] comcastnet> wrote:
>
>
> > Second note:  my version is 10X slower than Quilez version!
>
> Yes, considering that you were assembling a big, piecewise function, that's not
> surprising.
>
> But also I.Q. is kind of known for trimming things down to the very barest
> minimum and optimizing for speed, so he's always a good reference.
>
> > So, I will be replacing my version with the Quilez version in my code library,
> > and updating the library with all of the shapes from the article over time.
>
> Good idea - I'm sure it will speed thing up immensely, and there's always
> something new to learn.
>
> > There is a little work in the porting, because POV-Ray functions don't take
> > vector arguments, so you have to unroll all of the vectors as x,y,z parameters,
>
> Tell.
> Me.
> About it.
>
> Maybe you can write a macro or something to help with the unrolling to make
> things more efficient.
>
> - BW

If anyone is interested, you can find my "libisoshapes.inc" file that includes
implementations of most of the code from the Quilez article at
https://github.com/carath63/povlibrary

-- Chris R


Post a reply to this message

From: William F Pokorny
Subject: Re: Bocce - WIP
Date: 24 Jun 2024 20:32:54
Message: <667a1036$1@news.povray.org>
On 6/24/24 17:09, Chris R wrote:
> If anyone is interested, you can find my "libisoshapes.inc" file that includes
> implementations of most of the code from the Quilez article at
> https://github.com/carath63/povlibrary

I am. Thank you for this work! :-)

Bill P.


Post a reply to this message

From: kurtz le pirate
Subject: Re: Bocce - WIP
Date: 25 Jun 2024 12:38:51
Message: <667af29b$1@news.povray.org>
On 24/06/2024 23:09, Chris R wrote:
>
>
> If anyone is interested, you can find my "libisoshapes.inc" file that includes
> implementations of most of the code from the Quilez article at
> https://github.com/carath63/povlibrary
>

Very good job Chris.
I love the way you create functions in "libfn.inc".
I'd never have thought of untilizing a function for rotations.
LOL !


Still on the Inigo Quilez website, there's a page on colors pallets
<https://iquilezles.org/articles/palettes/>.



I had implemented his method for making color_maps.
The code is attached.



If you want to add it to your libraries.





-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message


Attachments:
Download 'utf-8' (5 KB)

From: Chris R
Subject: Re: Bocce - WIP
Date: 28 Jun 2024 15:15:00
Message: <web.667f0b882d85bd692ac081225cc1b6e@news.povray.org>
kurtz le pirate <kur### [at] gmailcom> wrote:
> On 24/06/2024 23:09, Chris R wrote:
> >
> >
> > If anyone is interested, you can find my "libisoshapes.inc" file that includes
> > implementations of most of the code from the Quilez article at
> > https://github.com/carath63/povlibrary
> >
>
> Very good job Chris.
> I love the way you create functions in "libfn.inc".
> I'd never have thought of untilizing a function for rotations.
> LOL !
>
>
> Still on the Inigo Quilez website, there's a page on colors pallets
> <https://iquilezles.org/articles/palettes/>.
>
>
>
> I had implemented his method for making color_maps.
> The code is attached.
>
>
>
> If you want to add it to your libraries.
>
>
>
>
>
> --
> Kurtz le pirate
> Compagnie de la Banquise

Cool!  I will have to read the article first to understand it, but I will
definitely look into adding it to my libraries.

If you pull the latest code, I have added more of the manipulation functions
from the article, including the straight combining (union, subtraction,
intersection), and smooth combining functions, with an extension for specifying
different mixing methods to create the union.  I added several of the examples
from his article on smooth min functions.

I also added his extrusion and revolutions as a general purpose function, and in
the process updated libfn.inc to include 2D transformations for 2D functions,
which you need for those functions.

I also found some typos and fixed them so everything I have tested works.

I'm finding with these functions that I can use a reasonable accuracy value of
0.01 but still get away with pretty low max_gradients, so they render pretty
quickly, and they all work really well with perturbations of the surface, which
is my main reason for modeling with isosurfaces in the first place.

-- Chris R.


Post a reply to this message


Attachments:
Download 'libisoshapes_test.png' (110 KB)

Preview of image 'libisoshapes_test.png'
libisoshapes_test.png


 

From: Chris R
Subject: Re: Bocce - WIP
Date: 1 Jul 2024 09:30:00
Message: <web.6682ae932d85bd69caf2d0115cc1b6e@news.povray.org>
"Chris R" <car### [at] comcastnet> wrote:
> kurtz le pirate <kur### [at] gmailcom> wrote:
> > On 24/06/2024 23:09, Chris R wrote:
> > >
> > >
> > > If anyone is interested, you can find my "libisoshapes.inc" file that includes
> > > implementations of most of the code from the Quilez article at
> > > https://github.com/carath63/povlibrary
> > >
> >
> > Very good job Chris.
> > I love the way you create functions in "libfn.inc".
> > I'd never have thought of untilizing a function for rotations.
> > LOL !
> >
> >
> > Still on the Inigo Quilez website, there's a page on colors pallets
> > <https://iquilezles.org/articles/palettes/>.
> >
> >
> >
> > I had implemented his method for making color_maps.
> > The code is attached.
> >
> >
> >
> > If you want to add it to your libraries.
> >
> >
> >
> >
> >
> > --
> > Kurtz le pirate
> > Compagnie de la Banquise
>
> Cool!  I will have to read the article first to understand it, but I will
> definitely look into adding it to my libraries.
>
> If you pull the latest code, I have added more of the manipulation functions
> from the article, including the straight combining (union, subtraction,
> intersection), and smooth combining functions, with an extension for specifying
> different mixing methods to create the union.  I added several of the examples
> from his article on smooth min functions.
>
> I also added his extrusion and revolutions as a general purpose function, and in
> the process updated libfn.inc to include 2D transformations for 2D functions,
> which you need for those functions.
>
> I also found some typos and fixed them so everything I have tested works.
>
> I'm finding with these functions that I can use a reasonable accuracy value of
> 0.01 but still get away with pretty low max_gradients, so they render pretty
> quickly, and they all work really well with perturbations of the surface, which
> is my main reason for modeling with isosurfaces in the first place.
>
> -- Chris R.

Smooth union of cube and sphere with cosine-gradient pigments...

-- Chris R.


Post a reply to this message


Attachments:
Download 'libisoshapes_test.png' (142 KB)

Preview of image 'libisoshapes_test.png'
libisoshapes_test.png


 

From: Chris R
Subject: Re: Bocce - WIP
Date: 1 Jul 2024 11:05:00
Message: <web.6682c4dc2d85bd69caf2d0115cc1b6e@news.povray.org>
"Chris R" <car### [at] comcastnet> wrote:
> "Chris R" <car### [at] comcastnet> wrote:
> > kurtz le pirate <kur### [at] gmailcom> wrote:
> > > On 24/06/2024 23:09, Chris R wrote:
> > > >
> > > >
> > > > If anyone is interested, you can find my "libisoshapes.inc" file that includes
> > > > implementations of most of the code from the Quilez article at
> > > > https://github.com/carath63/povlibrary
> > > >
> > >
> > > Very good job Chris.
> > > I love the way you create functions in "libfn.inc".
> > > I'd never have thought of untilizing a function for rotations.
> > > LOL !
> > >
> > >
> > > Still on the Inigo Quilez website, there's a page on colors pallets
> > > <https://iquilezles.org/articles/palettes/>.
> > >
> > >
> > >
> > > I had implemented his method for making color_maps.
> > > The code is attached.
> > >
> > >
> > >
> > > If you want to add it to your libraries.
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Kurtz le pirate
> > > Compagnie de la Banquise
> >
> > Cool!  I will have to read the article first to understand it, but I will
> > definitely look into adding it to my libraries.
> >
> > If you pull the latest code, I have added more of the manipulation functions
> > from the article, including the straight combining (union, subtraction,
> > intersection), and smooth combining functions, with an extension for specifying
> > different mixing methods to create the union.  I added several of the examples
> > from his article on smooth min functions.
> >
> > I also added his extrusion and revolutions as a general purpose function, and in
> > the process updated libfn.inc to include 2D transformations for 2D functions,
> > which you need for those functions.
> >
> > I also found some typos and fixed them so everything I have tested works.
> >
> > I'm finding with these functions that I can use a reasonable accuracy value of
> > 0.01 but still get away with pretty low max_gradients, so they render pretty
> > quickly, and they all work really well with perturbations of the surface, which
> > is my main reason for modeling with isosurfaces in the first place.
> >
> > -- Chris R.
>
> Smooth union of cube and sphere with cosine-gradient pigments...
>
> -- Chris R.

One more, more realistic example of using the isosurface functions and a better
example of using the Cosine colormap generation.

-- Chris R.


Post a reply to this message


Attachments:
Download 'floor.png' (984 KB)

Preview of image 'floor.png'
floor.png


 

From: William F Pokorny
Subject: Re: Bocce - WIP
Date: 2 Jul 2024 11:25:42
Message: <66841bf6$1@news.povray.org>
On 7/1/24 11:01, Chris R wrote:
> One more, more realistic example of using the isosurface functions and a better
> example of using the Cosine colormap generation.

I like the look!

Bill P.


Post a reply to this message

From: jr
Subject: Re: Bocce - WIP
Date: 3 Jul 2024 22:50:00
Message: <web.66860d1c2d85bd69c7a7971d6cde94f1@news.povray.org>
"Chris R" <car### [at] comcastnet> wrote:
> ...
> One more, more realistic example of using the isosurface functions and a better
> example of using the Cosine colormap generation.

that is very "believable" laid carpet.

although (usually) I do not care for realistic textures, I currently have need
of a texture which resembles the look of spilled-on-the-garage-floor oil, do you
have suggestions to set me on the way ?  tia.


regards, jr.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 1 Messages >>>

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