How do I convert this image into a 3D model?

Let’s say I have some image that I’d like to somehow make into a 3D model. What I’d like to do is to convert each “blob” from the image into a solid object so that I can view the geometry from any angle I want, assign materials to the solids, and render for some nice visuals.

I’ve attached a small part of one of the images below that you can use to try

enter image description here

I tried following this type of a workflow:

  1. Use threshold in Photoshop on the image to clean it up a bit, but I don’t want to lose all the side “blobs”. So don’t set the threshold too low.
  2. Import to Illustrator and “trace image” to get it to vector format. Play around with the advanced options to get a good number of edges while keeping relatively smooth lines.
  3. Export from Illustrator as an AutoCAD drawing.
  4. Extrude all the created objects in AutoCAD to a small thickness, so that each blob has some “body” to it.
  5. Assign a material to the solids and render using desired settings.

The problem is after exporting as an AutoCAD drawing, there are many splines and hatches in AutoCAD. Some of them are not joined, some of them have overlapping sides, etc. It becomes extremely difficult to extrude efficiently. Since the actual image is much larger, I cannot individually fix every edge.

Are there any other more efficient methods or workflows for doing this? Or any suggestions for handling a large number overlapping hatches/splines in AutoCAD?

Answer

At first: Goto Inkscape for the tracing. Ai’s Live Trace is too painful for cases this difficult. I couldnt get any greyscale traces that resemble the original. Inkscape seems to be more clever. Here’s a screenshot of 4 level greyscale tracing:

enter image description here

There are only 3 different greysghades because white is the background and it’s rejected. Path simplifying = the default.

Inkscape does not export properly DXFs, but the SVGs have been reliable. Unfortunately SVG in nonexistent for my definitely non-professional CAD software. I have nothing from Autodesk.

For some reason I can import Illustrator files to my CAD. The colors are lost. So, I went to Illustrator and splitted the SVG trace to 3 different Ai files. One for black, one for mid grey and one for light grey.

The different Ai files are here dragged to the same image. The black frame is for securing the possiblity to align them properly in CAD. It was unnecessary, because they were saved from the same place.

enter image description here

My CAD or actually only a simplified low cost 3D modeller (name = MoI ver.3) imported the Ai files one at a time. I extruded them to different heights, gave different colors and hided the extrude as soon as it was ready. When all three were extruded, I released the hiding and got the following, freely rotatable and scalable scene:

enter image description here

I noticed one hitch. One small shape in the light grey file didnt extrude. The curve crossed with itself. I moved one control point a little and the problem vanished.

Program MoI makes NURBS -surfaces, but the result is exportable in several common polygon mesh formats. I checked also some free versions of proper commercial CAD software. Unfortunately nearly all useful imports and exports are disabled in free versions. The user is forced to stay inside the free version.

Photoshop alone made the following rendering in its 3D mode. Your image was considered as a depth map. It’s upside down here. Darker = higher.

enter image description here

BTW. What physical the photo actually presents? This question is only because we are curious here. I gave to it workname “Splitted_Chromosome.SVG”

Attribution
Source : Link , Question Author : cartonn , Answer Author : user287001

Leave a Comment