1

I am searching for a way to convert some advanced 2d shapes given in PNG format to 3D models, basically "extruding" the image to certain dimension given lets say in millimeters. Search a bit trying to maybe find a solution using meshes but it doesn't seem that I am getting closer. NOT asking for a complete solution, a direction to start heading to would be really nice though, cause i am a bit stack and do not know where/how to start.

Sample image: https://i.stack.imgur.com/iHcwB.jpg

M.Kats
  • 29
  • 6
  • 1
    you need to try and separate your bitmap into sections that you can use to create shapes and use them to build your 3D object possible steps: Reduce image so it only shows, for example, all red Pixels --> Use some math magic to calculate vectors going around the extracted pixels--> create a shape based on these vectors --> extrude them in 3D – Denis Schaf Mar 19 '19 at 13:43
  • 1
    check out this link as an interesting source http://www.aforgenet.com/articles/shape_checker/ or this https://stackoverflow.com/questions/29782124/how-to-extract-front-shape-in-an-image-in-c-sharp – Denis Schaf Mar 19 '19 at 13:48
  • 1
    if you hope to have a real foto of for example a traffic scene and have the software automatically detect a traffic light and turn it into a 3D object don't even consider going on with your idea – Denis Schaf Mar 19 '19 at 13:53
  • 1
    I would think it could be done though you cannot just throw an image at code and have it do that with everything in the world. You'd need a front-end analysis piece that asks : is it a flower? Is it an animal? Is it amphibious? That way you have a "general" model of what areas move "out" and for how far. So a stem of a rose is only 1-2 mm while the rose itself can be many mm. – SASS_Shooter Mar 19 '19 at 14:03
  • Thank you all very much for your help! @DenisSchaf Nothing like that, its just some non rectangular shapes without any background. For example, some connected lines draw in illustrator exported without the background. – M.Kats Mar 19 '19 at 14:54
  • Also Added an image in case it helps to understand what shapes i will be working with. – M.Kats Mar 19 '19 at 15:08
  • Seeing your image now I recommend using emguCV to extract the lines and calculate them into a vector from there try finding your way tho paths/shapes and go on with your research. emguCV is a wrapper for OpenCV. check out this link to get started https://stackoverflow.com/questions/29156091/opencv-edge-border-detection-based-on-color – Denis Schaf Mar 20 '19 at 06:41
  • also if you only want to draw lines and get them in 3D it might make more sense to start with a vector file instead of a bitmap – Denis Schaf Mar 20 '19 at 06:42

0 Answers0