View Single Post
Old 01-26-2018, 11:22 PM   #8
RogerBW
 
RogerBW's Avatar
 
Join Date: Sep 2008
Location: near London, UK
Default Re: Interest in 3d printable track pieces for 'classic'?

Quote:
Originally Posted by Melkhior View Post
I'm cheating a bit to get the banking, and the process I use limits how high I can go. The track, grid, borders and the sort-of-grassy texture is a 2D image used as a height-map. So to get the banking, I simply lighten part of the image to "raise" the track. It works well, but the greyscale range of a PNG is only 0-255, so you can get accuracy OR range, but not both... but a 1/4" or 1/2" (as shown) raise works fine for a 2" wide track, I think. For a 4" wide track, getting enough height starts limiting the accuracy of the height-map.

A *very* unfortunate side-effect of that process is that OpenSCAD ends up eating memory like crazy. Creating the STL for that part requires 20+ gigabytes of memory...
A couple of points here:

(1) PNG can actually support 16-bit greyscale values. However, many tools won't write this.

(2) Yes, in effect each pixel becomes a separate object within OpenSCAD, so achieving a decent resolution gets very expensive very quickly.

Still, for this sort of task in OpenSCAD heightmaps are probably still your best bet. While I use OpenSCAD for almost all my modelling for print, in a case like this I'd be distinctly tempted to go to Blender (perhaps working off a base built in OpenSCAD) and its random perturbation modifiers.
RogerBW is offline   Reply With Quote