Add a logo to object via a .TGA import and extrude #17
-
Hi, I am experimenting with the code. It is going well. Complements about the code and open-sourcing it! I want to add a logo to a part by importing a logo.tga file and extruding it. I can import the TGA with:
Now I am struggling with transforming the .tga file to a voxel field and maybe extruding the logo. Best, Thijs |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The ShapeKernel has a surface modulation function that takes an image as an input, this is the easiest way to do it (we don't have embossing on the Voxel level directly). Maybe @josefinelissner can show us an example :) Lin |
Beta Was this translation helpful? Give feedback.
-
Hi Thijs! Images can be used as 2D-SurfaceModulation objects and inputed into any base shape that can do SurfaceModulations. I am attaching a example code that showcases how to use this base shape: Here is the output of Step 1, which is the simples case. Note that there is a mapping function which correlates pixel grayscale value (normalized between 0 and 1) to an "emboss" height. A different function (e.g. Option 2) will allow you to invert the image emboss. ![]() As a Step 2 you can add a transformation to the BaseLogoBox (just like any other base shape) that allows you to e.g. transform this plate into a cylindrical coordinate space. ![]() The trafo function can also be used to flip the image relative to your base shape coordinate system or to do some more elaborate / conformal geometries. If you toggle Option 2 in the trafo function you will also have an example of how to make the "emboss" overhang conformal for 3D-printing. Note that the embossed structure does not depart perfectly perpendicular from the cylinder, but at a printable angle. Hope this give you some background and initial direction. |
Beta Was this translation helpful? Give feedback.
Hi Thijs!
Images can be used as 2D-SurfaceModulation objects and inputed into any base shape that can do SurfaceModulations.
However, there is a base shape called "BaseLogoBox" that is specifically designed for the use as a Logo plate. It's internal meshing strategy will copy the pixel resolution of your image.
I am attaching a example code that showcases how to use this base shape:
Ex_LogoShowCase.txt
Here is the output of Step 1, which is the simples case.
Note that there is a mapping function which correlates pixel grayscale value (normalized between 0 and 1) to an "emboss" height. A different function (e.g. Option 2) will allow you to invert the image emboss.
As a Step 2 you can add…