Custom shape based on png image


I am trying to create custom shaped mesh in based on image on the top which is png with transparent part (so that the shape is not square or rectangle but something custom). What is the best way to do this?

Many thanks,

What I have is this:

And I would like to have (because image on the top has transparent background) is the start-shape object, like 3D star.


This a bit tricky. You would have to sample the color texture in the vertex shader and then compute based on the sampled alpha value a vertex displacement (e.g. along the z-axis). There is no build-in support for this use case.