Difference between revisions of "Height Mapped Polyhedra in OpenScad (Q52572)"

From Library of Open Source Hardware
Jump to navigation Jump to search
(Reconciliation Edit)
 
(‎Added [en] label: Height Mapped Polyhedra in OpenScad)
 
label / enlabel / en
 +
Height Mapped Polyhedra in OpenScad

Latest revision as of 19:53, 25 February 2022

No description defined
Language Label Description Also known as
English
Height Mapped Polyhedra in OpenScad
No description defined

    Statements

    thingiverse.com
    0 references
    WilliamAAdams
    0 references
    1.0.0
    0 references
    0 references
    www.thingiverse.com
    0 references
    en
    0 references
    I want to do height mapping in OpenScad. The easiest way to do it is to generate little cubes for each offset. That's a good start, but I wanted more. What I really want is the ability to layout a polyhedron mesh use a height map to alter the vertices of that mesh. This thing is just the latest incarnation of the library. With it, you can do the following: display_mesh_height([32,32], [2,2], heightmap=checker_image); That is, specify a size in millimeters for the mesh [32,32], then a resolution [2,2], and the height map, our checker image. The work is actually located in the test_mesh.scad file. It will do the height, but not do the color. That will come next. Another thing that I'm doing in this incarnation of the library is separating out this thing called glsl.scad Basically, recognizing that there's a lot of stuff that I'm doing that mirrors what I would be doing in 3D graphics. A lot of this stuff is like vertex and shader programming, so I figured I'd model it in the same way. It also makes it easier to go from here (OpenScad) to rendering in something like the iPad. Blog entry: http://williamaadams.wordpress.com/2011/09/25/openscad-texture-mapping-2/ GitHub: https://github.com/Wiladams/OpenScadModels/tree/master/Libraries It's a paltry entry, but a nice way to do height maps. It takes up less resources to display the mesh than to display a bunch of cubes. UPDATE: OK, I got unlazy, and actually included the proper mesh renderer, so you can in fact make solid things from your bump maps.
    0 references
    auto
    0 references
    https://spdx.org/licenses/CC0-1.0
    0 references