Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

alpha channel ?

A topic by eric berg created Jul 21, 2020 Views: 55 Replies: 4
Viewing posts 1 to 5

Forgive me if this is in there somewhere.

Looking for overlaying an alpha channel onto the 3d height map so I can cut on contour or side .    I want to follow the height map.  offset down in Z to trace it or side contour cut to 0 if i were cutting it out.


Hi Eric,

 There's two options, I just tried to reply explaining them but this site hasn't been working very well on my end lately so I'm just testing being able to reply right now. Testing 123...


Ok, all systems go.

So the first option involves using the medial-axis operation. You could load the image as a raster-layer and then use the expand/contract function in raster-edit mode to beef it up (disable the "Expand Vertically" toggle on there to keep everything at the same height). Then invert the layer and generate your medial-axis carve off of that. You might need to raise the background Z height of the layer to the top of the canvas, if the canvas is larger than the raster-layer, otherwise the edges  of the layer will have cutpaths generated off them as well. This method requires manipulating the medial-axis operation via the cutter's geometry. You could just tell it to generate with V-bit geometry but actually use a different bit, like a ball-nose cutter or flat endmill.

Alternatively, you could trace the raster-layer to a paths-layer with a bit of a contouring offset so that the inner/outer paths generated are spaced a bit, and it will also resolve any little gaps there might be in the input image. Then you can use the Shapes From Paths with the paths-layer selected, or individual paths in the paths-layer selected while in path editing mode, to generate a flat shape, basically extruding the paths. You can profile off of these using the profiling operation then.

Here's an example project I just made for you to check out:

Profiling Example Project


I think what might be useful for this sort of thing would be a medial-axis carving option that lets the user just manually set a fixed max-depth where the cutpaths don't vary in depth based on the width of the form and the cutter shape - like in the case with V-carving/B-carving. Instead, the cutter follows the medial-axis as with V/B-carving but just treats it like the profiling operation, where the user can toggle between varying cut Z to retain the shape of the form being carved, or if they just want a cutter to follow the medial-axis and specify a maximum radius/distance from the edges of a shape to allow it to travel - which currently is determined by the radius of the cutter itself. Hrmm, just thinking out loud. It would effectively allow the medial-axis carving operation to function like a profiling-along-centerline of the canvas' shapes and forms.

Yes, create a path layer on center overlay to the height map,   operation to cut on center of overlay at height map on center by a depth of x