discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Progress Report: CGAL vs Manifold

GB
Glenn Butcher
Fri, Jul 18, 2025 8:09 PM

Most of the BOSL examples are regular patterns, with the exception of
the random "roughness" .

Stone textures follow a random pattern in both their surface roughness
and the breaking/hewing of larger material into blocks. The "coherent
noise" math and library allows both to be incorporated into a
heightmap.  I also included an "edge-taper" operation in the output
phase to follow the stone patterns I'm working with on this structure,
the railroad depot at Antonito, Colorado.  The stone is actually lava,
quarried from the fields to the west of town.

Here's some instructive reading on libnoise, the library I used

https://libnoise.sourceforge.net/

And, here's a link to the github repo for noisetool, the command-line
program I wrote around the library:

https://github.com/butcherg/noisetool

The library is organized to allow specification of a network of
operations to make the required noise pattern.  Here's the network for
the pattern I used to make the stone textures in the render:

This is specified in a text file fed to noisetool.

Since the stone wall is a somewhat random placement, I used a
black-and-white image of the random pattern with another command-line
tool I wrote, contours.  This program reads such an image and spits out
an array of polygons representing the stones. Not that hard to write, I
used the opencv library for its functions that do precisely that.  You
can regard that program here:

https://github.com/butcherg/contours

See, a bit of a sub-hobby...  :D

Glenn

On 7/18/2025 10:05 AM, Jon Bondy wrote:

The BOSL2 Library has an extensive texturing feature already in place...

https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#function-texture

Jon

On 7/18/2025 11:41 AM, Glenn Butcher via Discuss wrote:

Regarding texture: That turned into a sub-hobby.  I used a "coherent
noise" library, aptly named libnoise, to make a program to generate
texture data.  Since I was writing the program, I made an output
option a row-columm text file ingestible by OpenSCAD's surface()
operator.   The texture definition is a network of libnoise
operators, probably needs a separate thread to discuss. I did the
stones in the render in two steps: 1) a script to make the separate
stones as .stl files, 2) a script to load them and add the wall
foundation, doors, windows, and corbels.

Regarding rendering: Just a visceral reaction on my part.  The
preview render of the snapshot doesn't navigate as smoothly as the
Manifold render, and preview takes an ungodly long time when I
initially open the script.  Has got me thinking about just
command-line rendering, just to keep from waiting for the preview
render.

On 7/18/2025 9:03 AM, Steve Lelievre via Discuss wrote:

Hi Glenn,

An off-topic reply: I'm quite impressed by your model and
particularly the uneven texturing used to simulate the faces of the
blocks used for the walls - just like chiselled granite. How did you
achieve that texturing? It just so happens that I'm currently
looking for a way to roughen smooth surfaces.

On 2025-07-18 7:09 a.m., Glenn Butcher via Discuss wrote:

I'd say just scrap both preview and CGAL.

Just a casual reaction: Based on execution times alone, I'd probably
agree. But I like preview because of $preview, which lets me have
multipart models assembled in preview and broken apart for rendering
in preparation to3d printing. And, I regularly use the % modifier to
add guides or diagnostic shapes during development of models. So I'd
still like to have the preview functionality even if the underlying
mechanisms were changed.

Cheers, Steve


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Most of the BOSL examples are regular patterns, with the exception of the random "roughness" . Stone textures follow a random pattern in both their surface roughness and the breaking/hewing of larger material into blocks. The "coherent noise" math and library allows both to be incorporated into a heightmap.  I also included an "edge-taper" operation in the output phase to follow the stone patterns I'm working with on this structure, the railroad depot at Antonito, Colorado.  The stone is actually lava, quarried from the fields to the west of town. Here's some instructive reading on libnoise, the library I used https://libnoise.sourceforge.net/ And, here's a link to the github repo for noisetool, the command-line program I wrote around the library: https://github.com/butcherg/noisetool The library is organized to allow specification of a network of operations to make the required noise pattern.  Here's the network for the pattern I used to make the stone textures in the render: This is specified in a text file fed to noisetool. Since the stone wall is a somewhat random placement, I used a black-and-white image of the random pattern with another command-line tool I wrote, contours.  This program reads such an image and spits out an array of polygons representing the stones. Not that hard to write, I used the opencv library for its functions that do precisely that.  You can regard that program here: https://github.com/butcherg/contours See, a bit of a sub-hobby...  :D Glenn On 7/18/2025 10:05 AM, Jon Bondy wrote: > The BOSL2 Library has an extensive texturing feature already in place... > > https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#function-texture > > Jon > > On 7/18/2025 11:41 AM, Glenn Butcher via Discuss wrote: >> Regarding texture: That turned into a sub-hobby.  I used a "coherent >> noise" library, aptly named libnoise, to make a program to generate >> texture data.  Since I was writing the program, I made an output >> option a row-columm text file ingestible by OpenSCAD's surface() >> operator.   The texture definition is a network of libnoise >> operators, probably needs a separate thread to discuss. I did the >> stones in the render in two steps: 1) a script to make the separate >> stones as .stl files, 2) a script to load them and add the wall >> foundation, doors, windows, and corbels. >> >> Regarding rendering: Just a visceral reaction on my part.  The >> preview render of the snapshot doesn't navigate as smoothly as the >> Manifold render, and preview takes an ungodly long time when I >> initially open the script.  Has got me thinking about just >> command-line rendering, just to keep from waiting for the preview >> render. >> >> On 7/18/2025 9:03 AM, Steve Lelievre via Discuss wrote: >>> Hi Glenn, >>> >>> An off-topic reply: I'm quite impressed by your model and >>> particularly the uneven texturing used to simulate the faces of the >>> blocks used for the walls - just like chiselled granite. How did you >>> achieve that texturing? It just so happens that I'm currently >>> looking for a way to roughen smooth surfaces. >>> >>> On 2025-07-18 7:09 a.m., Glenn Butcher via Discuss wrote: >>>> I'd say just scrap both preview and CGAL. >>> >>> Just a casual reaction: Based on execution times alone, I'd probably >>> agree. But I like preview because of $preview, which lets me have >>> multipart models assembled in preview and broken apart for rendering >>> in preparation to3d printing. And, I regularly use the % modifier to >>> add guides or diagnostic shapes during development of models. So I'd >>> still like to have the preview functionality even if the underlying >>> mechanisms were changed. >>> >>> Cheers, Steve >>> >>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >
JD
John David
Fri, Jul 18, 2025 8:46 PM

@Glenn Butcher glenn.butcher@gmail.com
, that is a cool model.  How did you generate the brick texture?

EBo --

On Fri, Jul 18, 2025 at 4:09 PM Glenn Butcher via Discuss <
discuss@lists.openscad.org> wrote:

Most of the BOSL examples are regular patterns, with the exception of the
random "roughness" .

Stone textures follow a random pattern in both their surface roughness and
the breaking/hewing of larger material into blocks.  The "coherent noise"
math and library allows both to be incorporated into a heightmap.  I also
included an "edge-taper" operation in the output phase to follow the stone
patterns I'm working with on this structure, the railroad depot at
Antonito, Colorado.  The stone is actually lava, quarried from the fields
to the west of town.

Here's some instructive reading on libnoise, the library I used

https://libnoise.sourceforge.net/

And, here's a link to the github repo for noisetool, the command-line
program I wrote around the library:

https://github.com/butcherg/noisetool

The library is organized to allow specification of a network of operations
to make the required noise pattern.  Here's the network for the pattern I
used to make the stone textures in the render:

This is specified in a text file fed to noisetool.

Since the stone wall is a somewhat random placement, I used a
black-and-white image of the random pattern with another command-line tool
I wrote, contours.  This program reads such an image and spits out an array
of polygons representing the stones.  Not that hard to write, I used the
opencv library for its functions that do precisely that.  You can regard
that program here:

https://github.com/butcherg/contours

See, a bit of a sub-hobby...  :D

Glenn

On 7/18/2025 10:05 AM, Jon Bondy wrote:

The BOSL2 Library has an extensive texturing feature already in place...

https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#function-texture

Jon

On 7/18/2025 11:41 AM, Glenn Butcher via Discuss wrote:

Regarding texture: That turned into a sub-hobby.  I used a "coherent
noise" library, aptly named libnoise, to make a program to generate texture
data.  Since I was writing the program, I made an output option a
row-columm text file ingestible by OpenSCAD's surface() operator.  The
texture definition is a network of libnoise operators, probably needs a
separate thread to discuss. I did the stones in the render in two steps: 1)
a script to make the separate stones as .stl files, 2) a script to load
them and add the wall foundation, doors, windows, and corbels.

Regarding rendering: Just a visceral reaction on my part.  The preview
render of the snapshot doesn't navigate as smoothly as the Manifold render,
and preview takes an ungodly long time when I initially open the script.
Has got me thinking about just command-line rendering, just to keep from
waiting for the preview render.

On 7/18/2025 9:03 AM, Steve Lelievre via Discuss wrote:

Hi Glenn,

An off-topic reply: I'm quite impressed by your model and particularly the
uneven texturing used to simulate the faces of the blocks used for the
walls - just like chiselled granite. How did you achieve that texturing? It
just so happens that I'm currently looking for a way to roughen smooth
surfaces.

On 2025-07-18 7:09 a.m., Glenn Butcher via Discuss wrote:

I'd say just scrap both preview and CGAL.

Just a casual reaction: Based on execution times alone, I'd probably
agree. But I like preview because of $preview, which lets me have multipart
models assembled in preview and broken apart for rendering in preparation
to3d printing. And, I regularly use the % modifier to add guides or
diagnostic shapes during development of models. So I'd still like to have
the preview functionality even if the underlying mechanisms were changed.

Cheers, Steve


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

@Glenn Butcher <glenn.butcher@gmail.com> , that is a cool model. How did you generate the brick texture? EBo -- On Fri, Jul 18, 2025 at 4:09 PM Glenn Butcher via Discuss < discuss@lists.openscad.org> wrote: > Most of the BOSL examples are regular patterns, with the exception of the > random "roughness" . > > Stone textures follow a random pattern in both their surface roughness and > the breaking/hewing of larger material into blocks. The "coherent noise" > math and library allows both to be incorporated into a heightmap. I also > included an "edge-taper" operation in the output phase to follow the stone > patterns I'm working with on this structure, the railroad depot at > Antonito, Colorado. The stone is actually lava, quarried from the fields > to the west of town. > > Here's some instructive reading on libnoise, the library I used > > https://libnoise.sourceforge.net/ > > And, here's a link to the github repo for noisetool, the command-line > program I wrote around the library: > > https://github.com/butcherg/noisetool > > The library is organized to allow specification of a network of operations > to make the required noise pattern. Here's the network for the pattern I > used to make the stone textures in the render: > > > > This is specified in a text file fed to noisetool. > > Since the stone wall is a somewhat random placement, I used a > black-and-white image of the random pattern with another command-line tool > I wrote, contours. This program reads such an image and spits out an array > of polygons representing the stones. Not that hard to write, I used the > opencv library for its functions that do precisely that. You can regard > that program here: > > https://github.com/butcherg/contours > > See, a bit of a sub-hobby... :D > > Glenn > > > > > On 7/18/2025 10:05 AM, Jon Bondy wrote: > > The BOSL2 Library has an extensive texturing feature already in place... > > https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#function-texture > > Jon > > On 7/18/2025 11:41 AM, Glenn Butcher via Discuss wrote: > > Regarding texture: That turned into a sub-hobby. I used a "coherent > noise" library, aptly named libnoise, to make a program to generate texture > data. Since I was writing the program, I made an output option a > row-columm text file ingestible by OpenSCAD's surface() operator. The > texture definition is a network of libnoise operators, probably needs a > separate thread to discuss. I did the stones in the render in two steps: 1) > a script to make the separate stones as .stl files, 2) a script to load > them and add the wall foundation, doors, windows, and corbels. > > Regarding rendering: Just a visceral reaction on my part. The preview > render of the snapshot doesn't navigate as smoothly as the Manifold render, > and preview takes an ungodly long time when I initially open the script. > Has got me thinking about just command-line rendering, just to keep from > waiting for the preview render. > > On 7/18/2025 9:03 AM, Steve Lelievre via Discuss wrote: > > Hi Glenn, > > An off-topic reply: I'm quite impressed by your model and particularly the > uneven texturing used to simulate the faces of the blocks used for the > walls - just like chiselled granite. How did you achieve that texturing? It > just so happens that I'm currently looking for a way to roughen smooth > surfaces. > > On 2025-07-18 7:09 a.m., Glenn Butcher via Discuss wrote: > > I'd say just scrap both preview and CGAL. > > > Just a casual reaction: Based on execution times alone, I'd probably > agree. But I like preview because of $preview, which lets me have multipart > models assembled in preview and broken apart for rendering in preparation > to3d printing. And, I regularly use the % modifier to add guides or > diagnostic shapes during development of models. So I'd still like to have > the preview functionality even if the underlying mechanisms were changed. > > Cheers, Steve > > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
GB
Glenn Butcher
Fri, Jul 18, 2025 8:49 PM

I'd forgotten I wrote a description of it in my blog:

https://glenn.pulpitrock.net/blog/posts/2025-04-10_textures_for_openscad_with_noisetool/

That's what happens with the stuff I do late at night, I forget what I
did...  :D

Glenn

On 7/18/2025 2:46 PM, John David wrote:

@Glenn Butcher mailto:glenn.butcher@gmail.com
, that is a cool model.  How did you generate the brick texture?

  EBo --

On Fri, Jul 18, 2025 at 4:09 PM Glenn Butcher via Discuss
discuss@lists.openscad.org wrote:

 Most of the BOSL examples are regular patterns, with the exception
 of the random "roughness" .

 Stone textures follow a random pattern in both their surface
 roughness and the breaking/hewing of larger material into blocks. 
 The "coherent noise" math and library allows both to be
 incorporated into a heightmap. I also included an "edge-taper"
 operation in the output phase to follow the stone patterns I'm
 working with on this structure, the railroad depot at Antonito,
 Colorado. The stone is actually lava, quarried from the fields to
 the west of town.

 Here's some instructive reading on libnoise, the library I used

 https://libnoise.sourceforge.net/

 And, here's a link to the github repo for noisetool, the
 command-line program I wrote around the library:

 https://github.com/butcherg/noisetool

 The library is organized to allow specification of a network of
 operations to make the required noise pattern. Here's the network
 for the pattern I used to make the stone textures in the render:



 This is specified in a text file fed to noisetool.

 Since the stone wall is a somewhat random placement, I used a
 black-and-white image of the random pattern with another
 command-line tool I wrote, contours.  This program reads such an
 image and spits out an array of polygons representing the stones. 
 Not that hard to write, I used the opencv library for its
 functions that do precisely that.  You can regard that program here:

 https://github.com/butcherg/contours

 See, a bit of a sub-hobby...  :D

 Glenn




 On 7/18/2025 10:05 AM, Jon Bondy wrote:
 The BOSL2 Library has an extensive texturing feature already in
 place...

 https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#function-texture

 Jon

 On 7/18/2025 11:41 AM, Glenn Butcher via Discuss wrote:
 Regarding texture: That turned into a sub-hobby.  I used a
 "coherent noise" library, aptly named libnoise, to make a
 program to generate texture data.  Since I was writing the
 program, I made an output option a row-columm text file
 ingestible by OpenSCAD's surface() operator.   The texture
 definition is a network of libnoise operators, probably needs a
 separate thread to discuss. I did the stones in the render in
 two steps: 1) a script to make the separate stones as .stl
 files, 2) a script to load them and add the wall foundation,
 doors, windows, and corbels.

 Regarding rendering: Just a visceral reaction on my part.  The
 preview render of the snapshot doesn't navigate as smoothly as
 the Manifold render, and preview takes an ungodly long time when
 I initially open the script.  Has got me thinking about just
 command-line rendering, just to keep from waiting for the
 preview render.

 On 7/18/2025 9:03 AM, Steve Lelievre via Discuss wrote:
 Hi Glenn,

 An off-topic reply: I'm quite impressed by your model and
 particularly the uneven texturing used to simulate the faces of
 the blocks used for the walls - just like chiselled granite.
 How did you achieve that texturing? It just so happens that I'm
 currently looking for a way to roughen smooth surfaces.

 On 2025-07-18 7:09 a.m., Glenn Butcher via Discuss wrote:
 I'd say just scrap both preview and CGAL.
 Just a casual reaction: Based on execution times alone, I'd
 probably agree. But I like preview because of $preview, which
 lets me have multipart models assembled in preview and broken
 apart for rendering in preparation to3d printing. And, I
 regularly use the % modifier to add guides or diagnostic shapes
 during development of models. So I'd still like to have the
 preview functionality even if the underlying mechanisms were
 changed.

 Cheers, Steve



 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org
 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org
 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org
I'd forgotten I wrote a description of it in my blog: https://glenn.pulpitrock.net/blog/posts/2025-04-10_textures_for_openscad_with_noisetool/ That's what happens with the stuff I do late at night, I forget what I did...  :D Glenn On 7/18/2025 2:46 PM, John David wrote: > @Glenn Butcher <mailto:glenn.butcher@gmail.com> > , that is a cool model.  How did you generate the brick texture? > >   EBo -- > > On Fri, Jul 18, 2025 at 4:09 PM Glenn Butcher via Discuss > <discuss@lists.openscad.org> wrote: > > Most of the BOSL examples are regular patterns, with the exception > of the random "roughness" . > > Stone textures follow a random pattern in both their surface > roughness and the breaking/hewing of larger material into blocks.  > The "coherent noise" math and library allows both to be > incorporated into a heightmap. I also included an "edge-taper" > operation in the output phase to follow the stone patterns I'm > working with on this structure, the railroad depot at Antonito, > Colorado. The stone is actually lava, quarried from the fields to > the west of town. > > Here's some instructive reading on libnoise, the library I used > > https://libnoise.sourceforge.net/ > > And, here's a link to the github repo for noisetool, the > command-line program I wrote around the library: > > https://github.com/butcherg/noisetool > > The library is organized to allow specification of a network of > operations to make the required noise pattern. Here's the network > for the pattern I used to make the stone textures in the render: > > > > This is specified in a text file fed to noisetool. > > Since the stone wall is a somewhat random placement, I used a > black-and-white image of the random pattern with another > command-line tool I wrote, contours.  This program reads such an > image and spits out an array of polygons representing the stones.  > Not that hard to write, I used the opencv library for its > functions that do precisely that.  You can regard that program here: > > https://github.com/butcherg/contours > > See, a bit of a sub-hobby...  :D > > Glenn > > > > > On 7/18/2025 10:05 AM, Jon Bondy wrote: >> The BOSL2 Library has an extensive texturing feature already in >> place... >> >> https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#function-texture >> >> Jon >> >> On 7/18/2025 11:41 AM, Glenn Butcher via Discuss wrote: >>> Regarding texture: That turned into a sub-hobby.  I used a >>> "coherent noise" library, aptly named libnoise, to make a >>> program to generate texture data.  Since I was writing the >>> program, I made an output option a row-columm text file >>> ingestible by OpenSCAD's surface() operator.   The texture >>> definition is a network of libnoise operators, probably needs a >>> separate thread to discuss. I did the stones in the render in >>> two steps: 1) a script to make the separate stones as .stl >>> files, 2) a script to load them and add the wall foundation, >>> doors, windows, and corbels. >>> >>> Regarding rendering: Just a visceral reaction on my part.  The >>> preview render of the snapshot doesn't navigate as smoothly as >>> the Manifold render, and preview takes an ungodly long time when >>> I initially open the script.  Has got me thinking about just >>> command-line rendering, just to keep from waiting for the >>> preview render. >>> >>> On 7/18/2025 9:03 AM, Steve Lelievre via Discuss wrote: >>>> Hi Glenn, >>>> >>>> An off-topic reply: I'm quite impressed by your model and >>>> particularly the uneven texturing used to simulate the faces of >>>> the blocks used for the walls - just like chiselled granite. >>>> How did you achieve that texturing? It just so happens that I'm >>>> currently looking for a way to roughen smooth surfaces. >>>> >>>> On 2025-07-18 7:09 a.m., Glenn Butcher via Discuss wrote: >>>>> I'd say just scrap both preview and CGAL. >>>> >>>> Just a casual reaction: Based on execution times alone, I'd >>>> probably agree. But I like preview because of $preview, which >>>> lets me have multipart models assembled in preview and broken >>>> apart for rendering in preparation to3d printing. And, I >>>> regularly use the % modifier to add guides or diagnostic shapes >>>> during development of models. So I'd still like to have the >>>> preview functionality even if the underlying mechanisms were >>>> changed. >>>> >>>> Cheers, Steve >>>> >>>> >>>> >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JD
John David
Sat, Jul 19, 2025 12:16 AM

Thank you, @Glenn Butcher glenn.butcher@gmail.com, I'll have to play with
this later.  Just like I need another project on my infinite "Hmmm....
ain't that cool" list ;-)  Thanks!

On Fri, Jul 18, 2025 at 4:50 PM Glenn Butcher via Discuss <
discuss@lists.openscad.org> wrote:

I'd forgotten I wrote a description of it in my blog:

https://glenn.pulpitrock.net/blog/posts/2025-04-10_textures_for_openscad_with_noisetool/

That's what happens with the stuff I do late at night, I forget what I
did...  :D

Glenn
On 7/18/2025 2:46 PM, John David wrote:

@Glenn Butcher glenn.butcher@gmail.com
, that is a cool model.  How did you generate the brick texture?

EBo --

On Fri, Jul 18, 2025 at 4:09 PM Glenn Butcher via Discuss <
discuss@lists.openscad.org> wrote:

Most of the BOSL examples are regular patterns, with the exception of the
random "roughness" .

Stone textures follow a random pattern in both their surface roughness
and the breaking/hewing of larger material into blocks.  The "coherent
noise" math and library allows both to be incorporated into a heightmap.  I
also included an "edge-taper" operation in the output phase to follow the
stone patterns I'm working with on this structure, the railroad depot at
Antonito, Colorado.  The stone is actually lava, quarried from the fields
to the west of town.

Here's some instructive reading on libnoise, the library I used

https://libnoise.sourceforge.net/

And, here's a link to the github repo for noisetool, the command-line
program I wrote around the library:

https://github.com/butcherg/noisetool

The library is organized to allow specification of a network of
operations to make the required noise pattern.  Here's the network for the
pattern I used to make the stone textures in the render:

This is specified in a text file fed to noisetool.

Since the stone wall is a somewhat random placement, I used a
black-and-white image of the random pattern with another command-line tool
I wrote, contours.  This program reads such an image and spits out an array
of polygons representing the stones.  Not that hard to write, I used the
opencv library for its functions that do precisely that.  You can regard
that program here:

https://github.com/butcherg/contours

See, a bit of a sub-hobby...  :D

Glenn

On 7/18/2025 10:05 AM, Jon Bondy wrote:

The BOSL2 Library has an extensive texturing feature already in place...

https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#function-texture

Jon

On 7/18/2025 11:41 AM, Glenn Butcher via Discuss wrote:

Regarding texture: That turned into a sub-hobby.  I used a "coherent
noise" library, aptly named libnoise, to make a program to generate texture
data.  Since I was writing the program, I made an output option a
row-columm text file ingestible by OpenSCAD's surface() operator.  The
texture definition is a network of libnoise operators, probably needs a
separate thread to discuss. I did the stones in the render in two steps: 1)
a script to make the separate stones as .stl files, 2) a script to load
them and add the wall foundation, doors, windows, and corbels.

Regarding rendering: Just a visceral reaction on my part.  The preview
render of the snapshot doesn't navigate as smoothly as the Manifold render,
and preview takes an ungodly long time when I initially open the script.
Has got me thinking about just command-line rendering, just to keep from
waiting for the preview render.

On 7/18/2025 9:03 AM, Steve Lelievre via Discuss wrote:

Hi Glenn,

An off-topic reply: I'm quite impressed by your model and particularly
the uneven texturing used to simulate the faces of the blocks used for the
walls - just like chiselled granite. How did you achieve that texturing? It
just so happens that I'm currently looking for a way to roughen smooth
surfaces.

On 2025-07-18 7:09 a.m., Glenn Butcher via Discuss wrote:

I'd say just scrap both preview and CGAL.

Just a casual reaction: Based on execution times alone, I'd probably
agree. But I like preview because of $preview, which lets me have multipart
models assembled in preview and broken apart for rendering in preparation
to3d printing. And, I regularly use the % modifier to add guides or
diagnostic shapes during development of models. So I'd still like to have
the preview functionality even if the underlying mechanisms were changed.

Cheers, Steve


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Thank you, @Glenn Butcher <glenn.butcher@gmail.com>, I'll have to play with this later. Just like I need *another* project on my infinite "Hmmm.... ain't that cool" list ;-) Thanks! On Fri, Jul 18, 2025 at 4:50 PM Glenn Butcher via Discuss < discuss@lists.openscad.org> wrote: > I'd forgotten I wrote a description of it in my blog: > > > https://glenn.pulpitrock.net/blog/posts/2025-04-10_textures_for_openscad_with_noisetool/ > > That's what happens with the stuff I do late at night, I forget what I > did... :D > > Glenn > On 7/18/2025 2:46 PM, John David wrote: > > @Glenn Butcher <glenn.butcher@gmail.com> > , that is a cool model. How did you generate the brick texture? > > EBo -- > > On Fri, Jul 18, 2025 at 4:09 PM Glenn Butcher via Discuss < > discuss@lists.openscad.org> wrote: > >> Most of the BOSL examples are regular patterns, with the exception of the >> random "roughness" . >> >> Stone textures follow a random pattern in both their surface roughness >> and the breaking/hewing of larger material into blocks. The "coherent >> noise" math and library allows both to be incorporated into a heightmap. I >> also included an "edge-taper" operation in the output phase to follow the >> stone patterns I'm working with on this structure, the railroad depot at >> Antonito, Colorado. The stone is actually lava, quarried from the fields >> to the west of town. >> >> Here's some instructive reading on libnoise, the library I used >> >> https://libnoise.sourceforge.net/ >> >> And, here's a link to the github repo for noisetool, the command-line >> program I wrote around the library: >> >> https://github.com/butcherg/noisetool >> >> The library is organized to allow specification of a network of >> operations to make the required noise pattern. Here's the network for the >> pattern I used to make the stone textures in the render: >> >> >> >> This is specified in a text file fed to noisetool. >> >> Since the stone wall is a somewhat random placement, I used a >> black-and-white image of the random pattern with another command-line tool >> I wrote, contours. This program reads such an image and spits out an array >> of polygons representing the stones. Not that hard to write, I used the >> opencv library for its functions that do precisely that. You can regard >> that program here: >> >> https://github.com/butcherg/contours >> >> See, a bit of a sub-hobby... :D >> >> Glenn >> >> >> >> >> On 7/18/2025 10:05 AM, Jon Bondy wrote: >> >> The BOSL2 Library has an extensive texturing feature already in place... >> >> https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#function-texture >> >> Jon >> >> On 7/18/2025 11:41 AM, Glenn Butcher via Discuss wrote: >> >> Regarding texture: That turned into a sub-hobby. I used a "coherent >> noise" library, aptly named libnoise, to make a program to generate texture >> data. Since I was writing the program, I made an output option a >> row-columm text file ingestible by OpenSCAD's surface() operator. The >> texture definition is a network of libnoise operators, probably needs a >> separate thread to discuss. I did the stones in the render in two steps: 1) >> a script to make the separate stones as .stl files, 2) a script to load >> them and add the wall foundation, doors, windows, and corbels. >> >> Regarding rendering: Just a visceral reaction on my part. The preview >> render of the snapshot doesn't navigate as smoothly as the Manifold render, >> and preview takes an ungodly long time when I initially open the script. >> Has got me thinking about just command-line rendering, just to keep from >> waiting for the preview render. >> >> On 7/18/2025 9:03 AM, Steve Lelievre via Discuss wrote: >> >> Hi Glenn, >> >> An off-topic reply: I'm quite impressed by your model and particularly >> the uneven texturing used to simulate the faces of the blocks used for the >> walls - just like chiselled granite. How did you achieve that texturing? It >> just so happens that I'm currently looking for a way to roughen smooth >> surfaces. >> >> On 2025-07-18 7:09 a.m., Glenn Butcher via Discuss wrote: >> >> I'd say just scrap both preview and CGAL. >> >> >> Just a casual reaction: Based on execution times alone, I'd probably >> agree. But I like preview because of $preview, which lets me have multipart >> models assembled in preview and broken apart for rendering in preparation >> to3d printing. And, I regularly use the % modifier to add guides or >> diagnostic shapes during development of models. So I'd still like to have >> the preview functionality even if the underlying mechanisms were changed. >> >> Cheers, Steve >> >> >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Roger Whiteley
Sat, Jul 19, 2025 1:48 PM

Complicated maybe, but what a wonderful result. Lots of clever tips in the scripts to learn from.

Thanks.
Roger. Sent from my iPhone 6

On 18 Jul 2025, at 21:49, Glenn Butcher <glenn.butcher@gmail.com> wrote:

 I'd forgotten I wrote a description of it in my blog:

https://glenn.pulpitrock.net/blog/posts/2025-04-10_textures_for_openscad_with_noisetool/

That's what happens with the stuff I do late at night, I forget what I did... :D

Glenn

On 7/18/2025 2:46 PM, John David wrote:

@Glenn Butcher, that is a cool model. How did you generate the brick texture?

EBo --

On Fri, Jul 18, 2025 at 4:09 PM Glenn Butcher via Discuss <discuss@lists.openscad.org> wrote:

Most of the BOSL examples are regular patterns, with the exception of the random "roughness" .

Stone textures follow a random pattern in both their surface roughness and the breaking/hewing of larger material into blocks. The "coherent noise" math and library allows both to be incorporated into a heightmap. I also included an "edge-taper" operation in the output phase to follow the stone patterns I'm working with on this structure, the railroad depot at Antonito, Colorado. The stone is actually lava, quarried from the fields to the west of town.

Here's some instructive reading on libnoise, the library I used

https://libnoise.sourceforge.net/

And, here's a link to the github repo for noisetool, the command-line program I wrote around the library:

https://github.com/butcherg/noisetool

The library is organized to allow specification of a network of operations to make the required noise pattern. Here's the network for the pattern I used to make the stone textures in the render:

ridgedstone1.png

This is specified in a text file fed to noisetool.

Since the stone wall is a somewhat random placement, I used a black-and-white image of the random pattern with another command-line tool I wrote, contours. This program reads such an image and spits out an array of polygons representing the stones. Not that hard to write, I used the opencv library for its functions that do precisely that. You can regard that program here:

https://github.com/butcherg/contours

See, a bit of a sub-hobby... :D

Glenn

On 7/18/2025 10:05 AM, Jon Bondy wrote:

The BOSL2 Library has an extensive texturing feature already in place...

https://github.com/BelfrySCAD/BOSL2/wiki/skin.scad#function-texture

Jon

On 7/18/2025 11:41 AM, Glenn Butcher via Discuss wrote:

Regarding texture: That turned into a sub-hobby. I used a "coherent noise" library, aptly named libnoise, to make a program to generate texture data. Since I was writing the program, I made an output option a row-columm text file ingestible by OpenSCAD's surface() operator. The texture definition is a network of libnoise operators, probably needs a separate thread to discuss. I did the stones in the render in two steps: 1) a script to make the separate stones as .stl files, 2) a script to load them and add the wall foundation, doors, windows, and corbels.

Regarding rendering: Just a visceral reaction on my part. The preview render of the snapshot doesn't navigate as smoothly as the Manifold render, and preview takes an ungodly long time when I initially open the script. Has got me thinking about just command-line rendering, just to keep from waiting for the preview render.

On 7/18/2025 9:03 AM, Steve Lelievre via Discuss wrote:

Hi Glenn,

An off-topic reply: I'm quite impressed by your model and particularly the uneven texturing used to simulate the faces of the blocks used for the walls - just like chiselled granite. How did you achieve that texturing? It just so happens that I'm currently looking for a way to roughen smooth surfaces.

On 2025-07-18 7:09 a.m., Glenn Butcher via Discuss wrote:

I'd say just scrap both preview and CGAL.

Just a casual reaction: Based on execution times alone, I'd probably agree. But I like preview because of $preview, which lets me have multipart models assembled in preview and broken apart for rendering in preparation to3d printing. And, I regularly use the % modifier to add guides or diagnostic shapes during development of models. So I'd still like to have the preview functionality even if the underlying mechanisms were changed.

Cheers, Steve

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

GB
Glenn Butcher
Sun, Jul 20, 2025 4:56 PM

Design/Automatic Reload and Preview: Geesh, I looked through the the
Preferences for doing such, didn't think it'd actually Be In The Menu...
:D  Thanks!

Preview is a bit faster for simple models, but that advantage disappears
quickly and rapidly turns into a burden as the model becomes more
complex.  So, it really is a wash for sub-sec renders, but for longer
ones it becomes onerous.

On 7/18/2025 10:40 AM, Jordan Brown wrote:

If you don't like your model previewing on load... turn off
Design/Automatic Reload and Preview.

I think that for most models preview is still a bit faster than Manifold.

Preview has # and %.

Manifold color/transparency handling isn't quite all there yet. (Not
to say that preview's doesn't have problems.)

I understand the use case for $preview for two alternate forms, but do
note that having a top-level boolean and using the Customizer gives
you almost the same thing.

Design/Automatic Reload and Preview: Geesh, I looked through the the Preferences for doing such, didn't think it'd actually Be In The Menu... :D  Thanks! Preview is a bit faster for simple models, but that advantage disappears quickly and rapidly turns into a burden as the model becomes more complex.  So, it really is a wash for sub-sec renders, but for longer ones it becomes onerous. On 7/18/2025 10:40 AM, Jordan Brown wrote: > > If you don't like your model previewing on load... turn off > Design/Automatic Reload and Preview. > > I think that for most models preview is still a bit faster than Manifold. > > Preview has # and %. > > Manifold color/transparency handling isn't quite all there yet. (Not > to say that preview's doesn't have problems.) > > > I understand the use case for $preview for two alternate forms, but do > note that having a top-level boolean and using the Customizer gives > you almost the same thing. >
JB
Jordan Brown
Sun, Jul 20, 2025 9:00 PM

On 7/20/2025 9:56 AM, Glenn Butcher via Discuss wrote:

Design/Automatic Reload and Preview: Geesh, I looked through the the
Preferences for doing such, didn't think it'd actually Be In The
Menu... :D  Thanks!

Yeah, there is an interesting UI question there.  Maybe everything
should be in preferences, and might be duplicated in menus.

Preview is a bit faster for simple models, but that advantage
disappears quickly and rapidly turns into a burden as the model
becomes more complex.  So, it really is a wash for sub-sec renders,
but for longer ones it becomes onerous.

For my most complex models (~300K facets) preview still wins, but it's
365ms vs 965ms.

So enough difference that trying to watch an animation inside OpenSCAD
might care, but ordinary work probably wouldn't.

On 7/20/2025 9:56 AM, Glenn Butcher via Discuss wrote: > > Design/Automatic Reload and Preview: Geesh, I looked through the the > Preferences for doing such, didn't think it'd actually Be In The > Menu... :D  Thanks! > Yeah, there is an interesting UI question there.  Maybe *everything* should be in preferences, and might be duplicated in menus. > Preview is a bit faster for simple models, but that advantage > disappears quickly and rapidly turns into a burden as the model > becomes more complex.  So, it really is a wash for sub-sec renders, > but for longer ones it becomes onerous. > For my most complex models (~300K facets) preview still wins, but it's 365ms vs 965ms. So enough difference that trying to watch an animation inside OpenSCAD might care, but ordinary work probably wouldn't.
NH
nop head
Sun, Jul 20, 2025 9:36 PM

My previews are all responsive because I code to be quick.

On Sun, 20 Jul 2025, 22:00 Jordan Brown via Discuss, <
discuss@lists.openscad.org> wrote:

On 7/20/2025 9:56 AM, Glenn Butcher via Discuss wrote:

Design/Automatic Reload and Preview: Geesh, I looked through the the
Preferences for doing such, didn't think it'd actually Be In The Menu...
:D  Thanks!

Yeah, there is an interesting UI question there.  Maybe everything
should be in preferences, and might be duplicated in menus.

Preview is a bit faster for simple models, but that advantage disappears
quickly and rapidly turns into a burden as the model becomes more complex.
So, it really is a wash for sub-sec renders, but for longer ones it becomes
onerous.

For my most complex models (~300K facets) preview still wins, but it's
365ms vs 965ms.

So enough difference that trying to watch an animation inside OpenSCAD
might care, but ordinary work probably wouldn't.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

My previews are all responsive because I code to be quick. On Sun, 20 Jul 2025, 22:00 Jordan Brown via Discuss, < discuss@lists.openscad.org> wrote: > On 7/20/2025 9:56 AM, Glenn Butcher via Discuss wrote: > > Design/Automatic Reload and Preview: Geesh, I looked through the the > Preferences for doing such, didn't think it'd actually Be In The Menu... > :D Thanks! > > > Yeah, there is an interesting UI question there. Maybe *everything* > should be in preferences, and might be duplicated in menus. > > Preview is a bit faster for simple models, but that advantage disappears > quickly and rapidly turns into a burden as the model becomes more complex. > So, it really is a wash for sub-sec renders, but for longer ones it becomes > onerous. > > > For my most complex models (~300K facets) preview still wins, but it's > 365ms vs 965ms. > > So enough difference that trying to watch an animation inside OpenSCAD > might care, but ordinary work probably wouldn't. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
GB
Glenn Butcher
Mon, Jul 21, 2025 12:24 PM

That's nice, happy for you.  I code to get things done.

On 7/20/2025 3:36 PM, nop head via Discuss wrote:

My previews are all responsive because I code to be quick.

That's nice, happy for you.  I code to get things done. On 7/20/2025 3:36 PM, nop head via Discuss wrote: > My previews are all responsive because I code to be quick. >
I
Ivo
Mon, Jul 21, 2025 4:22 PM

1ESWSW,EES114,,S

On Mon, 21 Jul 2025, 14:25 Glenn Butcher via Discuss, <
discuss@lists.openscad.org> wrote:

That's nice, happy for you.  I code to get things done.

On 7/20/2025 3:36 PM, nop head via Discuss wrote:

My previews are all responsive because I code to be quick.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

1ESWSW,EES114,,S On Mon, 21 Jul 2025, 14:25 Glenn Butcher via Discuss, < discuss@lists.openscad.org> wrote: > That's nice, happy for you. I code to get things done. > > On 7/20/2025 3:36 PM, nop head via Discuss wrote: > > My previews are all responsive because I code to be quick. > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >