discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

stonewall: rock textures from heightmaps

GB
Glenn Butcher
Fri, Oct 31, 2025 3:53 PM

I'm building a scale model of a railroad station with stone walls. 
Using heightmaps for stone textures, found out two things: 1) massaging
the heightmap  to represent a stone is not trivial, and 2) heightmaps
generate meshes that start to bog down render processing.  Cutting to
the chase, I wrote a program to generate stone walls, unimaginatively
called stonewall.  It's a command-line program that takes in
black-and-white pictures representing wall profiles, black background
and white stones, like this:

and generate a .3mf or .stl file that looks like this:

It's a kludgy program that uses OpenCV, libnoise, and Manifold libraries
to do the heavy lifting, where OpenCV FindContours extracts polygons
from the input image, libnoise generates a stone texture for each
polygon, and Manifold and some code I wrote use the contour to shape the
heightmap and generate the mesh. A particular feature is that it will
bevel the heightmap to the edges of the contour, representing how stones
are sometimes shaped for incorporation into a wall.

I posted the code and a Windows release .zip as a repository at my
github account:

https://github.com/butcherg/stonewall

The .zip file contains stonewall.exe, the above wall.png, a libnoise
network definition, and shell scripts (bash and Windows CMD) to run
stonewall with the appropriate parameters.

Oh, warning, compiling stonewall is a mess. libnoise, for instance,
isn't in any of the distro package repositories I inspected, so you'll
have to use the -DBUILD_LIBNOISE=...  cmake logic.  For the Windows
build, I had to manually add symbolic links and move one .a file around
to get it to link.

stonewall's simplify parameter is of particular interest. So-called
'naive' heightmap mesh algorithms take the row-column height data and
build mesh triangles between their implied coordinates; two triangles in
each such sector is minimum, but four provide more definition.  Either
way, that adds a LOT of triangles to the render. Being a
bear-of-little-brain, that's what I implemented in stonewall.  Just a
few days ago, looking at the Manifold documentation I found the
Simplify() method for the Manifold class, hmm, wondered what that would
do to mess up my textures.  To my delight, I found that small input
precisions significantly reduced the number of triangles in a heightmap
mesh without degrading the definition, at least for my target
application of 3D resin printing.  Correspondingly, it reduced render
times from tens of seconds to a couple of seconds max for the largest
wall of my model.  OpenSCAD might consider adding this as a parameter to
surface(), enabled when Manifold is the back-end renderer.

Anyway, for what it's worth...

Glenn Butcher

I'm building a scale model of a railroad station with stone walls.  Using heightmaps for stone textures, found out two things: 1) massaging the heightmap  to represent a stone is not trivial, and 2) heightmaps generate meshes that start to bog down render processing.  Cutting to the chase, I wrote a program to generate stone walls, unimaginatively called stonewall.  It's a command-line program that takes in black-and-white pictures representing wall profiles, black background and white stones, like this: and generate a .3mf or .stl file that looks like this: It's a kludgy program that uses OpenCV, libnoise, and Manifold libraries to do the heavy lifting, where OpenCV FindContours extracts polygons from the input image, libnoise generates a stone texture for each polygon, and Manifold and some code I wrote use the contour to shape the heightmap and generate the mesh. A particular feature is that it will bevel the heightmap to the edges of the contour, representing how stones are sometimes shaped for incorporation into a wall. I posted the code and a Windows release .zip as a repository at my github account: https://github.com/butcherg/stonewall The .zip file contains stonewall.exe, the above wall.png, a libnoise network definition, and shell scripts (bash and Windows CMD) to run stonewall with the appropriate parameters. Oh, warning, compiling stonewall is a mess. libnoise, for instance, isn't in any of the distro package repositories I inspected, so you'll have to use the -DBUILD_LIBNOISE=...  cmake logic.  For the Windows build, I had to manually add symbolic links and move one .a file around to get it to link. stonewall's simplify parameter is of particular interest. So-called 'naive' heightmap mesh algorithms take the row-column height data and build mesh triangles between their implied coordinates; two triangles in each such sector is minimum, but four provide more definition.  Either way, that adds a LOT of triangles to the render. Being a bear-of-little-brain, that's what I implemented in stonewall.  Just a few days ago, looking at the Manifold documentation I found the Simplify() method for the Manifold class, hmm, wondered what that would do to mess up my textures.  To my delight, I found that small input precisions significantly reduced the number of triangles in a heightmap mesh without degrading the definition, at least for my target application of 3D resin printing.  Correspondingly, it reduced render times from tens of seconds to a couple of seconds max for the largest wall of my model.  OpenSCAD might consider adding this as a parameter to surface(), enabled when Manifold is the back-end renderer. Anyway, for what it's worth... Glenn Butcher
JB
Jon Bondy
Fri, Oct 31, 2025 5:00 PM

Glenn:

Your efforts show a lot of determination!

Each time I ponder your project, I think about BOSL2's textured_tile()
facility, and I wonder whether you can use this

https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-textured_tile

Jon

On 10/31/2025 11:53 AM, Glenn Butcher via Discuss wrote:

I'm building a scale model of a railroad station with stone walls. 
Using heightmaps for stone textures, found out two things: 1)
massaging the heightmap  to represent a stone is not trivial, and 2)
heightmaps generate meshes that start to bog down render processing. 
Cutting to the chase, I wrote a program to generate stone walls,
unimaginatively called stonewall.  It's a command-line program that
takes in black-and-white pictures representing wall profiles, black
background and white stones, like this:

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

Glenn: Your efforts show a lot of determination! Each time I ponder your project, I think about BOSL2's textured_tile() facility, and I wonder whether you can use this https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-textured_tile Jon On 10/31/2025 11:53 AM, Glenn Butcher via Discuss wrote: > > I'm building a scale model of a railroad station with stone walls.  > Using heightmaps for stone textures, found out two things: 1) > massaging the heightmap  to represent a stone is not trivial, and 2) > heightmaps generate meshes that start to bog down render processing.  > Cutting to the chase, I wrote a program to generate stone walls, > unimaginatively called stonewall.  It's a command-line program that > takes in black-and-white pictures representing wall profiles, black > background and white stones, like this: > > -- This email has been checked for viruses by AVG antivirus software. www.avg.com
AM
Adrian Mariano
Fri, Oct 31, 2025 5:09 PM

If you’re willing to have the texture repeat you can certainly use BOSL2’s
texture features. Note that you can texture many things including
extrusions, sweeps, and even general vnfs.  Not just tiles.

I’m not sure there would be any advantage to textured_tile if you want a
non repeating texture.

On Fri, Oct 31, 2025 at 13:00 Jon Bondy via Discuss <
discuss@lists.openscad.org> wrote:

Glenn:

Your efforts show a lot of determination!

Each time I ponder your project, I think about BOSL2's textured_tile()
facility, and I wonder whether you can use this

https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-textured_tile

Jon

On 10/31/2025 11:53 AM, Glenn Butcher via Discuss wrote:

I'm building a scale model of a railroad station with stone walls.
Using heightmaps for stone textures, found out two things: 1)
massaging the heightmap  to represent a stone is not trivial, and 2)
heightmaps generate meshes that start to bog down render processing.
Cutting to the chase, I wrote a program to generate stone walls,
unimaginatively called stonewall.  It's a command-line program that
takes in black-and-white pictures representing wall profiles, black
background and white stones, like this:

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com


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

If you’re willing to have the texture repeat you can certainly use BOSL2’s texture features. Note that you can texture many things including extrusions, sweeps, and even general vnfs. Not just tiles. I’m not sure there would be any advantage to textured_tile if you want a non repeating texture. On Fri, Oct 31, 2025 at 13:00 Jon Bondy via Discuss < discuss@lists.openscad.org> wrote: > Glenn: > > Your efforts show a lot of determination! > > Each time I ponder your project, I think about BOSL2's textured_tile() > facility, and I wonder whether you can use this > > > https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-textured_tile > > Jon > > > On 10/31/2025 11:53 AM, Glenn Butcher via Discuss wrote: > > > > I'm building a scale model of a railroad station with stone walls. > > Using heightmaps for stone textures, found out two things: 1) > > massaging the heightmap to represent a stone is not trivial, and 2) > > heightmaps generate meshes that start to bog down render processing. > > Cutting to the chase, I wrote a program to generate stone walls, > > unimaginatively called stonewall. It's a command-line program that > > takes in black-and-white pictures representing wall profiles, black > > background and white stones, like this: > > > > > > -- > This email has been checked for viruses by AVG antivirus software. > www.avg.com > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
JB
Jon Bondy
Fri, Oct 31, 2025 5:15 PM

Is there any way to generate a texture using a random number generator?

On 10/31/2025 1:09 PM, Adrian Mariano via Discuss wrote:

If you’re willing to have the texture repeat you can certainly use
BOSL2’s texture features. Note that you can texture many things
including extrusions, sweeps, and even general vnfs.  Not just tiles.

I’m not sure there would be any advantage to textured_tile if you want
a non repeating texture.

On Fri, Oct 31, 2025 at 13:00 Jon Bondy via Discuss
discuss@lists.openscad.org wrote:

 Glenn:

 Your efforts show a lot of determination!

 Each time I ponder your project, I think about BOSL2's
 textured_tile()
 facility, and I wonder whether you can use this

 https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-textured_tile
 <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_BelfrySCAD_BOSL2_wiki_shapes3d.scad-23functionmodule-2Dtextured-5Ftile&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=IrAaeBsPVSsaLALMcA_KjrFMZrJjXRmcj-zqCZnF8lk&e=>

 Jon


 On 10/31/2025 11:53 AM, Glenn Butcher via Discuss wrote:

I'm building a scale model of a railroad station with stone walls.
Using heightmaps for stone textures, found out two things: 1)
massaging the heightmap  to represent a stone is not trivial,

 and 2)

heightmaps generate meshes that start to bog down render

 processing.

Cutting to the chase, I wrote a program to generate stone walls,
unimaginatively called stonewall.  It's a command-line program that
takes in black-and-white pictures representing wall profiles, black
background and white stones, like this:

 -- 
 This email has been checked for viruses by AVG antivirus software.
 www.avg.com
 <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=eJ7i-SOv9Jci4jRPEekKv5t-ruuaiAYIHp2EFzV3Njo&e=>
 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org

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

Is there any way to generate a texture using a random number generator? On 10/31/2025 1:09 PM, Adrian Mariano via Discuss wrote: > If you’re willing to have the texture repeat you can certainly use > BOSL2’s texture features. Note that you can texture many things > including extrusions, sweeps, and even general vnfs.  Not just tiles. > > I’m not sure there would be any advantage to textured_tile if you want > a non repeating texture. > > On Fri, Oct 31, 2025 at 13:00 Jon Bondy via Discuss > <discuss@lists.openscad.org> wrote: > > Glenn: > > Your efforts show a lot of determination! > > Each time I ponder your project, I think about BOSL2's > textured_tile() > facility, and I wonder whether you can use this > > https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-textured_tile > <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_BelfrySCAD_BOSL2_wiki_shapes3d.scad-23functionmodule-2Dtextured-5Ftile&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=IrAaeBsPVSsaLALMcA_KjrFMZrJjXRmcj-zqCZnF8lk&e=> > > Jon > > > On 10/31/2025 11:53 AM, Glenn Butcher via Discuss wrote: > > > > I'm building a scale model of a railroad station with stone walls. > > Using heightmaps for stone textures, found out two things: 1) > > massaging the heightmap  to represent a stone is not trivial, > and 2) > > heightmaps generate meshes that start to bog down render > processing. > > Cutting to the chase, I wrote a program to generate stone walls, > > unimaginatively called stonewall.  It's a command-line program that > > takes in black-and-white pictures representing wall profiles, black > > background and white stones, like this: > > > > > > -- > This email has been checked for viruses by AVG antivirus software. > www.avg.com > <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=eJ7i-SOv9Jci4jRPEekKv5t-ruuaiAYIHp2EFzV3Njo&e=> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
GB
Glenn Butcher
Fri, Oct 31, 2025 5:53 PM

That's what libnoise does, using math of a category called 'coherent noise' . Google 'perlin noise'...

stonewall reads network definitions digestible by libnoise; each time you run Stonewall with a particular noise definition,  you get a different pattern,  with the same general shape.

On October 31, 2025 11:15:40 AM MDT, Jon Bondy via Discuss discuss@lists.openscad.org wrote:

Is there any way to generate a texture using a random number generator?

On 10/31/2025 1:09 PM, Adrian Mariano via Discuss wrote:

If you’re willing to have the texture repeat you can certainly use BOSL2’s texture features. Note that you can texture many things including extrusions, sweeps, and even general vnfs.  Not just tiles.

I’m not sure there would be any advantage to textured_tile if you want a non repeating texture.

On Fri, Oct 31, 2025 at 13:00 Jon Bondy via Discuss discuss@lists.openscad.org wrote:

 Glenn:

 Your efforts show a lot of determination!

 Each time I ponder your project, I think about BOSL2's
 textured_tile()
 facility, and I wonder whether you can use this

 https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-textured_tile
 <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_BelfrySCAD_BOSL2_wiki_shapes3d.scad-23functionmodule-2Dtextured-5Ftile&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=IrAaeBsPVSsaLALMcA_KjrFMZrJjXRmcj-zqCZnF8lk&e=>

 Jon


 On 10/31/2025 11:53 AM, Glenn Butcher via Discuss wrote:

I'm building a scale model of a railroad station with stone walls.
Using heightmaps for stone textures, found out two things: 1)
massaging the heightmap  to represent a stone is not trivial,

 and 2)

heightmaps generate meshes that start to bog down render

 processing.

Cutting to the chase, I wrote a program to generate stone walls,
unimaginatively called stonewall.  It's a command-line program that
takes in black-and-white pictures representing wall profiles, black
background and white stones, like this:

 --     This email has been checked for viruses by AVG antivirus software.
 www.avg.com
 <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=eJ7i-SOv9Jci4jRPEekKv5t-ruuaiAYIHp2EFzV3Njo&e=>
 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org

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

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

That's what libnoise does, using math of a category called 'coherent noise' . Google 'perlin noise'... stonewall reads network definitions digestible by libnoise; each time you run Stonewall with a particular noise definition, you get a different pattern, with the same general shape. On October 31, 2025 11:15:40 AM MDT, Jon Bondy via Discuss <discuss@lists.openscad.org> wrote: >Is there any way to generate a texture using a random number generator? > >On 10/31/2025 1:09 PM, Adrian Mariano via Discuss wrote: >> If you’re willing to have the texture repeat you can certainly use BOSL2’s texture features. Note that you can texture many things including extrusions, sweeps, and even general vnfs.  Not just tiles. >> >> I’m not sure there would be any advantage to textured_tile if you want a non repeating texture. >> >> On Fri, Oct 31, 2025 at 13:00 Jon Bondy via Discuss <discuss@lists.openscad.org> wrote: >> >> Glenn: >> >> Your efforts show a lot of determination! >> >> Each time I ponder your project, I think about BOSL2's >> textured_tile() >> facility, and I wonder whether you can use this >> >> https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-textured_tile >> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_BelfrySCAD_BOSL2_wiki_shapes3d.scad-23functionmodule-2Dtextured-5Ftile&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=IrAaeBsPVSsaLALMcA_KjrFMZrJjXRmcj-zqCZnF8lk&e=> >> >> Jon >> >> >> On 10/31/2025 11:53 AM, Glenn Butcher via Discuss wrote: >> > >> > I'm building a scale model of a railroad station with stone walls. >> > Using heightmaps for stone textures, found out two things: 1) >> > massaging the heightmap  to represent a stone is not trivial, >> and 2) >> > heightmaps generate meshes that start to bog down render >> processing. >> > Cutting to the chase, I wrote a program to generate stone walls, >> > unimaginatively called stonewall.  It's a command-line program that >> > takes in black-and-white pictures representing wall profiles, black >> > background and white stones, like this: >> > >> > >> >> -- This email has been checked for viruses by AVG antivirus software. >> www.avg.com >> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=eJ7i-SOv9Jci4jRPEekKv5t-ruuaiAYIHp2EFzV3Njo&e=> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email todiscuss-leave@lists.openscad.org -- Sent from my Android device with K-9 Mail. Please excuse my brevity.
JB
Jon Bondy
Fri, Oct 31, 2025 6:28 PM

I wonder if something like this could be incorporated in BOSL2

On 10/31/2025 1:53 PM, Glenn Butcher via Discuss wrote:

That's what libnoise does, using math of a category called 'coherent
noise' . Google 'perlin noise'...

stonewall reads network definitions digestible by libnoise; each time
you run Stonewall with a particular noise definition,  you get a
different pattern,  with the same general shape.

On October 31, 2025 11:15:40 AM MDT, Jon Bondy via Discuss
discuss@lists.openscad.org wrote:

 Is there any way to generate a texture using a random number
 generator?

 On 10/31/2025 1:09 PM, Adrian Mariano via Discuss wrote:
 If you’re willing to have the texture repeat you can certainly
 use BOSL2’s texture features. Note that you can texture many
 things including extrusions, sweeps, and even general vnfs.  Not
 just tiles.

 I’m not sure there would be any advantage to textured_tile if you
 want a non repeating texture.

 On Fri, Oct 31, 2025 at 13:00 Jon Bondy via Discuss
 <discuss@lists.openscad.org> wrote:

     Glenn:

     Your efforts show a lot of determination!

     Each time I ponder your project, I think about BOSL2's
     textured_tile()
     facility, and I wonder whether you can use this

     https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-textured_tile
     <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_BelfrySCAD_BOSL2_wiki_shapes3d.scad-23functionmodule-2Dtextured-5Ftile&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=IrAaeBsPVSsaLALMcA_KjrFMZrJjXRmcj-zqCZnF8lk&e=>

     Jon


     On 10/31/2025 11:53 AM, Glenn Butcher via Discuss wrote:

I'm building a scale model of a railroad station with stone

     walls.

Using heightmaps for stone textures, found out two things: 1)
massaging the heightmap  to represent a stone is not

     trivial, and 2)

heightmaps generate meshes that start to bog down render

     processing.

Cutting to the chase, I wrote a program to generate stone

     walls,

unimaginatively called stonewall.  It's a command-line

     program that

takes in black-and-white pictures representing wall

     profiles, black

background and white stones, like this:

     -- 
     This email has been checked for viruses by AVG antivirus
     software.
     www.avg.com
     <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=eJ7i-SOv9Jci4jRPEekKv5t-ruuaiAYIHp2EFzV3Njo&e=>
     _______________________________________________
     OpenSCAD mailing list
     To unsubscribe send an email to discuss-leave@lists.openscad.org


 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email todiscuss-leave@lists.openscad.org
 <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=qa9EvmY2kclwVvpmph0Fwcx8r6KnwhhTwJyuddmXg-jH7c8Fccq5_hya42u8QJfg&s=Xa-k_sfaANPYvh21Pl4Zb4b-e7u8wCrbtzXadrYNKoo&e=>
 	Virus-free.www.avg.com
 <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=qa9EvmY2kclwVvpmph0Fwcx8r6KnwhhTwJyuddmXg-jH7c8Fccq5_hya42u8QJfg&s=Xa-k_sfaANPYvh21Pl4Zb4b-e7u8wCrbtzXadrYNKoo&e=>


 <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.


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

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

I wonder if something like this could be incorporated in BOSL2 On 10/31/2025 1:53 PM, Glenn Butcher via Discuss wrote: > That's what libnoise does, using math of a category called 'coherent > noise' . Google 'perlin noise'... > > stonewall reads network definitions digestible by libnoise; each time > you run Stonewall with a particular noise definition,  you get a > different pattern,  with the same general shape. > > > On October 31, 2025 11:15:40 AM MDT, Jon Bondy via Discuss > <discuss@lists.openscad.org> wrote: > > Is there any way to generate a texture using a random number > generator? > > On 10/31/2025 1:09 PM, Adrian Mariano via Discuss wrote: >> If you’re willing to have the texture repeat you can certainly >> use BOSL2’s texture features. Note that you can texture many >> things including extrusions, sweeps, and even general vnfs.  Not >> just tiles. >> >> I’m not sure there would be any advantage to textured_tile if you >> want a non repeating texture. >> >> On Fri, Oct 31, 2025 at 13:00 Jon Bondy via Discuss >> <discuss@lists.openscad.org> wrote: >> >> Glenn: >> >> Your efforts show a lot of determination! >> >> Each time I ponder your project, I think about BOSL2's >> textured_tile() >> facility, and I wonder whether you can use this >> >> https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-textured_tile >> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_BelfrySCAD_BOSL2_wiki_shapes3d.scad-23functionmodule-2Dtextured-5Ftile&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=IrAaeBsPVSsaLALMcA_KjrFMZrJjXRmcj-zqCZnF8lk&e=> >> >> Jon >> >> >> On 10/31/2025 11:53 AM, Glenn Butcher via Discuss wrote: >> > >> > I'm building a scale model of a railroad station with stone >> walls. >> > Using heightmaps for stone textures, found out two things: 1) >> > massaging the heightmap  to represent a stone is not >> trivial, and 2) >> > heightmaps generate meshes that start to bog down render >> processing. >> > Cutting to the chase, I wrote a program to generate stone >> walls, >> > unimaginatively called stonewall.  It's a command-line >> program that >> > takes in black-and-white pictures representing wall >> profiles, black >> > background and white stones, like this: >> > >> > >> >> -- >> This email has been checked for viruses by AVG antivirus >> software. >> www.avg.com >> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=eJ7i-SOv9Jci4jRPEekKv5t-ruuaiAYIHp2EFzV3Njo&e=> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email todiscuss-leave@lists.openscad.org > > <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=qa9EvmY2kclwVvpmph0Fwcx8r6KnwhhTwJyuddmXg-jH7c8Fccq5_hya42u8QJfg&s=Xa-k_sfaANPYvh21Pl4Zb4b-e7u8wCrbtzXadrYNKoo&e=> > Virus-free.www.avg.com > <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=qa9EvmY2kclwVvpmph0Fwcx8r6KnwhhTwJyuddmXg-jH7c8Fccq5_hya42u8QJfg&s=Xa-k_sfaANPYvh21Pl4Zb4b-e7u8wCrbtzXadrYNKoo&e=> > > > <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org -- This email has been checked for viruses by AVG antivirus software. www.avg.com
AM
Adrian Mariano
Sat, Nov 1, 2025 4:13 AM

Well, dotSCAD implements Perlin noise in OpenSCAD.  Alex has also been
working on a new implementation that would appear in BOSL2, but it's not
his primary project right now.  I don't know how it would differ from the
dotSCAD implementation.

On Fri, Oct 31, 2025 at 2:28 PM Jon Bondy via Discuss <
discuss@lists.openscad.org> wrote:

I wonder if something like this could be incorporated in BOSL2

On 10/31/2025 1:53 PM, Glenn Butcher via Discuss wrote:

That's what libnoise does, using math of a category called 'coherent
noise' . Google 'perlin noise'...

stonewall reads network definitions digestible by libnoise; each time you
run Stonewall with a particular noise definition,  you get a different
pattern,  with the same general shape.

On October 31, 2025 11:15:40 AM MDT, Jon Bondy via Discuss
discuss@lists.openscad.org discuss@lists.openscad.org wrote:

Is there any way to generate a texture using a random number generator?
On 10/31/2025 1:09 PM, Adrian Mariano via Discuss wrote:

If you’re willing to have the texture repeat you can certainly use
BOSL2’s texture features. Note that you can texture many things including
extrusions, sweeps, and even general vnfs.  Not just tiles.

I’m not sure there would be any advantage to textured_tile if you want a
non repeating texture.

On Fri, Oct 31, 2025 at 13:00 Jon Bondy via Discuss <
discuss@lists.openscad.org> wrote:

I'm building a scale model of a railroad station with stone walls.
Using heightmaps for stone textures, found out two things: 1)
massaging the heightmap  to represent a stone is not trivial, and 2)
heightmaps generate meshes that start to bog down render processing.
Cutting to the chase, I wrote a program to generate stone walls,
unimaginatively called stonewall.  It's a command-line program that
takes in black-and-white pictures representing wall profiles, black
background and white stones, like this:


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

https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=qa9EvmY2kclwVvpmph0Fwcx8r6KnwhhTwJyuddmXg-jH7c8Fccq5_hya42u8QJfg&s=Xa-k_sfaANPYvh21Pl4Zb4b-e7u8wCrbtzXadrYNKoo&e=
Virus-free.www.avg.com
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=qa9EvmY2kclwVvpmph0Fwcx8r6KnwhhTwJyuddmXg-jH7c8Fccq5_hya42u8QJfg&s=Xa-k_sfaANPYvh21Pl4Zb4b-e7u8wCrbtzXadrYNKoo&e=
<#m_3531037112327070142_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.


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

Well, dotSCAD implements Perlin noise in OpenSCAD. Alex has also been working on a new implementation that would appear in BOSL2, but it's not his primary project right now. I don't know how it would differ from the dotSCAD implementation. On Fri, Oct 31, 2025 at 2:28 PM Jon Bondy via Discuss < discuss@lists.openscad.org> wrote: > I wonder if something like this could be incorporated in BOSL2 > > > On 10/31/2025 1:53 PM, Glenn Butcher via Discuss wrote: > > That's what libnoise does, using math of a category called 'coherent > noise' . Google 'perlin noise'... > > stonewall reads network definitions digestible by libnoise; each time you > run Stonewall with a particular noise definition, you get a different > pattern, with the same general shape. > > > On October 31, 2025 11:15:40 AM MDT, Jon Bondy via Discuss > <discuss@lists.openscad.org> <discuss@lists.openscad.org> wrote: > >> Is there any way to generate a texture using a random number generator? >> On 10/31/2025 1:09 PM, Adrian Mariano via Discuss wrote: >> >> If you’re willing to have the texture repeat you can certainly use >> BOSL2’s texture features. Note that you can texture many things including >> extrusions, sweeps, and even general vnfs. Not just tiles. >> >> I’m not sure there would be any advantage to textured_tile if you want a >> non repeating texture. >> >> On Fri, Oct 31, 2025 at 13:00 Jon Bondy via Discuss < >> discuss@lists.openscad.org> wrote: >> >>> Glenn: >>> >>> Your efforts show a lot of determination! >>> >>> Each time I ponder your project, I think about BOSL2's textured_tile() >>> facility, and I wonder whether you can use this >>> >>> >>> https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-textured_tile >>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_BelfrySCAD_BOSL2_wiki_shapes3d.scad-23functionmodule-2Dtextured-5Ftile&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=IrAaeBsPVSsaLALMcA_KjrFMZrJjXRmcj-zqCZnF8lk&e=> >>> >>> Jon >>> >>> >>> On 10/31/2025 11:53 AM, Glenn Butcher via Discuss wrote: >>> > >>> > I'm building a scale model of a railroad station with stone walls. >>> > Using heightmaps for stone textures, found out two things: 1) >>> > massaging the heightmap to represent a stone is not trivial, and 2) >>> > heightmaps generate meshes that start to bog down render processing. >>> > Cutting to the chase, I wrote a program to generate stone walls, >>> > unimaginatively called stonewall. It's a command-line program that >>> > takes in black-and-white pictures representing wall profiles, black >>> > background and white stones, like this: >>> > >>> > >>> >>> -- >>> This email has been checked for viruses by AVG antivirus software. >>> www.avg.com >>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=eJ7i-SOv9Jci4jRPEekKv5t-ruuaiAYIHp2EFzV3Njo&e=> >>> _______________________________________________ >>> 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 >> >> >> >> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=qa9EvmY2kclwVvpmph0Fwcx8r6KnwhhTwJyuddmXg-jH7c8Fccq5_hya42u8QJfg&s=Xa-k_sfaANPYvh21Pl4Zb4b-e7u8wCrbtzXadrYNKoo&e=> >> Virus-free.www.avg.com >> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=qa9EvmY2kclwVvpmph0Fwcx8r6KnwhhTwJyuddmXg-jH7c8Fccq5_hya42u8QJfg&s=Xa-k_sfaANPYvh21Pl4Zb4b-e7u8wCrbtzXadrYNKoo&e=> >> <#m_3531037112327070142_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >> > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > > _______________________________________________ > 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
Sat, Nov 1, 2025 1:37 PM

libnoise is worth a study.  The API presents noise sources and various
operators as nodes, so the user declares nodes then connects their
sources and sinks to make a network.  I wrote a command line tool that
shells the C++ calls with a definition file, and stonewall uses that
parser internally to accept definition files and construct the
corresponding libnoise network.  The network I used in my example looks
like this (graph generated from noisetool dot-compatible output):

https://libnoise.sourceforge.net/ (fork with CMake build files:
https://github.com/eXpl0it3r/libnoise)

https://github.com/butcherg/noisetool

On 10/31/2025 10:13 PM, Adrian Mariano via Discuss wrote:

Well, dotSCAD implements Perlin noise in OpenSCAD. Alex has also been
working on a new implementation that would appear in BOSL2, but it's
not his primary project right now.  I don't know how it would differ
from the dotSCAD implementation.

On Fri, Oct 31, 2025 at 2:28 PM Jon Bondy via Discuss
discuss@lists.openscad.org wrote:

 I wonder if something like this could be incorporated in BOSL2


 On 10/31/2025 1:53 PM, Glenn Butcher via Discuss wrote:
 That's what libnoise does, using math of a category called
 'coherent noise' . Google 'perlin noise'...

 stonewall reads network definitions digestible by libnoise; each
 time you run Stonewall with a particular noise definition,  you
 get a different pattern,  with the same general shape.


 On October 31, 2025 11:15:40 AM MDT, Jon Bondy via Discuss
 <discuss@lists.openscad.org> <mailto:discuss@lists.openscad.org>
 wrote:

     Is there any way to generate a texture using a random number
     generator?

     On 10/31/2025 1:09 PM, Adrian Mariano via Discuss wrote:
     If you’re willing to have the texture repeat you can
     certainly use BOSL2’s texture features. Note that you can
     texture many things including extrusions, sweeps, and even
     general vnfs.  Not just tiles.

     I’m not sure there would be any advantage to textured_tile
     if you want a non repeating texture.

     On Fri, Oct 31, 2025 at 13:00 Jon Bondy via Discuss
     <discuss@lists.openscad.org> wrote:

         Glenn:

         Your efforts show a lot of determination!

         Each time I ponder your project, I think about BOSL2's
         textured_tile()
         facility, and I wonder whether you can use this

         https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-textured_tile
         <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_BelfrySCAD_BOSL2_wiki_shapes3d.scad-23functionmodule-2Dtextured-5Ftile&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=IrAaeBsPVSsaLALMcA_KjrFMZrJjXRmcj-zqCZnF8lk&e=>

         Jon


         On 10/31/2025 11:53 AM, Glenn Butcher via Discuss wrote:

I'm building a scale model of a railroad station with

         stone walls.

Using heightmaps for stone textures, found out two

         things: 1)

massaging the heightmap  to represent a stone is not

         trivial, and 2)

heightmaps generate meshes that start to bog down

         render processing.

Cutting to the chase, I wrote a program to generate

         stone walls,

unimaginatively called stonewall.  It's a command-line

         program that

takes in black-and-white pictures representing wall

         profiles, black

background and white stones, like this:

         -- 
         This email has been checked for viruses by AVG antivirus
         software.
         www.avg.com
         <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=eJ7i-SOv9Jci4jRPEekKv5t-ruuaiAYIHp2EFzV3Njo&e=>
         _______________________________________________
         OpenSCAD mailing list
         To unsubscribe send an email to
         discuss-leave@lists.openscad.org


     _______________________________________________
     OpenSCAD mailing list
     To unsubscribe send an email todiscuss-leave@lists.openscad.org
     <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=qa9EvmY2kclwVvpmph0Fwcx8r6KnwhhTwJyuddmXg-jH7c8Fccq5_hya42u8QJfg&s=Xa-k_sfaANPYvh21Pl4Zb4b-e7u8wCrbtzXadrYNKoo&e=>
     	Virus-free.www.avg.com
     <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=qa9EvmY2kclwVvpmph0Fwcx8r6KnwhhTwJyuddmXg-jH7c8Fccq5_hya42u8QJfg&s=Xa-k_sfaANPYvh21Pl4Zb4b-e7u8wCrbtzXadrYNKoo&e=>


     <#m_3531037112327070142_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

 -- 
 Sent from my Android device with K-9 Mail. Please excuse my brevity.

 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email todiscuss-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 todiscuss-leave@lists.openscad.org

libnoise is worth a study.  The API presents noise sources and various operators as nodes, so the user declares nodes then connects their sources and sinks to make a network.  I wrote a command line tool that shells the C++ calls with a definition file, and stonewall uses that parser internally to accept definition files and construct the corresponding libnoise network.  The network I used in my example looks like this (graph generated from noisetool dot-compatible output): https://libnoise.sourceforge.net/ (fork with CMake build files: https://github.com/eXpl0it3r/libnoise) https://github.com/butcherg/noisetool On 10/31/2025 10:13 PM, Adrian Mariano via Discuss wrote: > Well, dotSCAD implements Perlin noise in OpenSCAD. Alex has also been > working on a new implementation that would appear in BOSL2, but it's > not his primary project right now.  I don't know how it would differ > from the dotSCAD implementation. > > On Fri, Oct 31, 2025 at 2:28 PM Jon Bondy via Discuss > <discuss@lists.openscad.org> wrote: > > I wonder if something like this could be incorporated in BOSL2 > > > On 10/31/2025 1:53 PM, Glenn Butcher via Discuss wrote: >> That's what libnoise does, using math of a category called >> 'coherent noise' . Google 'perlin noise'... >> >> stonewall reads network definitions digestible by libnoise; each >> time you run Stonewall with a particular noise definition,  you >> get a different pattern,  with the same general shape. >> >> >> On October 31, 2025 11:15:40 AM MDT, Jon Bondy via Discuss >> <discuss@lists.openscad.org> <mailto:discuss@lists.openscad.org> >> wrote: >> >> Is there any way to generate a texture using a random number >> generator? >> >> On 10/31/2025 1:09 PM, Adrian Mariano via Discuss wrote: >>> If you’re willing to have the texture repeat you can >>> certainly use BOSL2’s texture features. Note that you can >>> texture many things including extrusions, sweeps, and even >>> general vnfs.  Not just tiles. >>> >>> I’m not sure there would be any advantage to textured_tile >>> if you want a non repeating texture. >>> >>> On Fri, Oct 31, 2025 at 13:00 Jon Bondy via Discuss >>> <discuss@lists.openscad.org> wrote: >>> >>> Glenn: >>> >>> Your efforts show a lot of determination! >>> >>> Each time I ponder your project, I think about BOSL2's >>> textured_tile() >>> facility, and I wonder whether you can use this >>> >>> https://github.com/BelfrySCAD/BOSL2/wiki/shapes3d.scad#functionmodule-textured_tile >>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_BelfrySCAD_BOSL2_wiki_shapes3d.scad-23functionmodule-2Dtextured-5Ftile&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=IrAaeBsPVSsaLALMcA_KjrFMZrJjXRmcj-zqCZnF8lk&e=> >>> >>> Jon >>> >>> >>> On 10/31/2025 11:53 AM, Glenn Butcher via Discuss wrote: >>> > >>> > I'm building a scale model of a railroad station with >>> stone walls. >>> > Using heightmaps for stone textures, found out two >>> things: 1) >>> > massaging the heightmap  to represent a stone is not >>> trivial, and 2) >>> > heightmaps generate meshes that start to bog down >>> render processing. >>> > Cutting to the chase, I wrote a program to generate >>> stone walls, >>> > unimaginatively called stonewall.  It's a command-line >>> program that >>> > takes in black-and-white pictures representing wall >>> profiles, black >>> > background and white stones, like this: >>> > >>> > >>> >>> -- >>> This email has been checked for viruses by AVG antivirus >>> software. >>> www.avg.com >>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=94c640gSdnO_26wm-ls8wTVgbvhcuHMHvF3xSn_AVX3HxNiVRpTVwedXkiQIcrBs&s=eJ7i-SOv9Jci4jRPEekKv5t-ruuaiAYIHp2EFzV3Njo&e=> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to >>> discuss-leave@lists.openscad.org >>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email todiscuss-leave@lists.openscad.org >> >> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=qa9EvmY2kclwVvpmph0Fwcx8r6KnwhhTwJyuddmXg-jH7c8Fccq5_hya42u8QJfg&s=Xa-k_sfaANPYvh21Pl4Zb4b-e7u8wCrbtzXadrYNKoo&e=> >> Virus-free.www.avg.com >> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=qa9EvmY2kclwVvpmph0Fwcx8r6KnwhhTwJyuddmXg-jH7c8Fccq5_hya42u8QJfg&s=Xa-k_sfaANPYvh21Pl4Zb4b-e7u8wCrbtzXadrYNKoo&e=> >> >> >> <#m_3531037112327070142_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >> >> -- >> Sent from my Android device with K-9 Mail. Please excuse my brevity. >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email todiscuss-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 todiscuss-leave@lists.openscad.org