Importing a 3D model into DelftShip

Discussion in 'Software' started by midnitmike, Jan 13, 2015.

  1. midnitmike
    Joined: Apr 2012
    Posts: 257
    Likes: 20, Points: 0, Legacy Rep: 167
    Location: Haines and Juneau

    midnitmike Senior Member

    Importing a 3d Model into DelftShip

    For as long as I've been using Delftship it has always been my hope that one day I would be able to import an accurate replica of an existing hull and then use that 3D information as the basis for my work in DelftShip. But, given the limitations imposed by the file Import and Export choices available in all of the necessary software this seemed an almost impossible task. Today after much experimentation I think I can finally offer a reasonable solution to this problem. I would like to mention that all of the software used in this process is free, and the results so far are surprisingly accurate. Please be aware that this writing is only meant as an overview of the steps I took and is not meant to be a detailed description of every piece of software.

    The first step is to capture an accurate 3D rendering of the hull you're interested in. This is done using a digital camera and Photogrammetrics, my software of choice here is 123D Catch. I've looked at all the other alternatives available today and in my experience none of them are as fast and easy to use, nor do they produce the same consistent results. 123D Catch limits you to just 70 photos of your subject, but I've found that 30 or 40 good photographs will produce better results then the 200+ I've tried in other programs. Once you have obtained a suitable .obj model from 123d Catch we can move on.

    There are three main aspects of this model that need to be corrected before we import into DelftShip and they are the coordinate system (the x,y,z axis) the point of origin (0.0.0) and the scale. Although 123D catch has the ability to define both the World Coordinates and the Point of Origin getting these functions to work properly requires some serious preplanning before your photo shoot. This may not always be an option out in the field so I'm going to use another free Autodesk program to correct these attributes.

    123D Design leaves a lot to be desired if you're looking for a CAD program, but the one thing it does fairly well, and that no other program I've tried so far seems capable of doing is setting the coordinates of your model. Import your .obj file into 123D Design and use the Translate function (move and rotate) to correctly orient your models origin and coordinate system. You may have to experiment a bit here by exporting your model and bringing it into DelftShip to verify it's placement and then adjust accordingly. Another attribute of your model that also needs adjusting is the scale and we can accomplish that here as well. Again use the Translate function and this time choose Scale to increase or decrease the size of your model. Note that a Uniform Scaling of your model will also change it's point of origin, so you'll have to adjust that after a Scale modification. We'll change formats here and Export our model as an .stl file which has the unfortunate affect of discarding the texture associated with the .obj file. It hardly matters though because we'll lose that in the final step of this rather arduous process anyway.

    The next thing we need to do is verify the measurements of our model and the best way I found to do this is using a program called 3D-Tool.

    3D-Tool like so many of the programs I've experimented with during this project has limited functionality but at the same time performs a single task better then any other program and has therefore become an indispensable tool. It's sole purpose here is to allow us to measure our model and create multiple and persistent distance measurements on screen that can be used in our calculations for determining the correct scale of our model. It will neither save nor export a version of our model we will simply use the information gained here to verify and correct the scaling results produced by 123D Design. Once you have a model that you're satisfied with or wish to import into DelftShip to verify your work we'll move on to the next step in this conversion process.

    MeshLab 1.3.3 is the last real tool we'll need to complete the transformation of our original .obj file into what amounts to a point cloud. Our mesh vertices will hereafter be transformed into coordinates and displayed in DelftShip as such. Any unnecessary information should be discarded at this point if you haven't already done so along the way. We'll import the .stl file generated by 123D Design into MeshLab and allow it to perform it's Post-Open Processing of Unifying Duplicate Vertices. Export your model by going to File_ Export Mesh As and then choose XYZ Point Cloud. Save your file with the .xyz file extension and we're almost done.

    Open this .xyz file using Notepad and save it as a .txt file. (you might be able to rename the .xyz to .txt I haven't tried that yet)

    We're finally ready to Import into DelftShip! Go to Import and under 3D Surface or Mesh choose Coordinates and select the .txt file you saved from NotePad. It will take a while before DelftShip finishes importing all those coordinates so give it a few minutes to accomplish the task. Simplifying your model either by choosing a lower quality mesh construction initially in 123D Catch or by decimating the mesh to decrease the number of vertices will pay dividends here. What you end up with are thousands or possibly tens of thousands of coordinate points that describe the 3D model extracted from your photogrammetric endeavours. To remove this coordinate point cloud from your DS model go to the Tools tab and select Unused Points.

    And there you have it! We've gone from a real world object, in my case it was a 36' Mel Martin, to a 3D model and finally an accurate point cloud that far surpasses any Orthographic background images I've ever been able to produce. This model was so good that I found the background images to be more of a distraction then anything else and deleted them.

    There are some refinements that I'm considering since my model doesn't appear to be perfectly symmetrical port to starboard. This is may be due to non uniform lighting of the boat during my photo shoot and how photogrammetric programs tend misinterpret that information. One possible solution might be to slice the mesh and then mirror the best side in an effort to more accurately replicate the hull. An alternative to that could be to use just half the model which would eliminate these inconsistencies and at the same time reduce the point cloud. In order to do this I'll have to mark the center line of the hull before I shoot it so that I have some reference points in my model before I perform the slice.

    I hope some of you find this useful or at least interesting.

    Mike
     

    Attached Files:

    3 people like this.
  2. farjoe
    Joined: Oct 2003
    Posts: 159
    Likes: 1, Points: 18, Legacy Rep: 26
    Location: med

    farjoe Senior Member

    Hi Mike,

    I tried to install 123D Catch to see how it works. Although the program seems to install correctly, nothing happens when I double click on the icon.

    I am using Windows 7. Any suggestions?

    Regards
     
  3. midnitmike
    Joined: Apr 2012
    Posts: 257
    Likes: 20, Points: 0, Legacy Rep: 167
    Location: Haines and Juneau

    midnitmike Senior Member

    123D Catch

    Hi farjoe,
    There's no way for me to tell why 123D Catch doesn't open on your computer. The hardware requirements are fairly reasonable for this piece of software, so I have little reason to believe that your computer won't run it properly. The only word of advice I can give you is to try updating your video drivers to see if that helps. They also have an online version but it appears to be having server problems, so for now it's not an option.

    You could also try running a compatibility test and let Win7 make the necessary adjustments or try running it as an Administrator to see if that works.

    Other then that the only advice I can offer is to go to
    http://www.123dapp.com/catch#download
    and make sure you select the PC version and try another install.

    Mike
     
  4. quequen
    Joined: Jul 2009
    Posts: 369
    Likes: 15, Points: 28, Legacy Rep: 199
    Location: argentina

    quequen Senior Member

    midnitmake, thanks, very good explanation!:)
     
  5. farjoe
    Joined: Oct 2003
    Posts: 159
    Likes: 1, Points: 18, Legacy Rep: 26
    Location: med

    farjoe Senior Member

    My initial search led me to a download site outside Autodesk and a 60M file called 123Dcatch.msi was downloaded. It installed flawlessly but did nothing. The link you delivered led me to site within Autodesk from where I downloaded a 90M file with the same name. This file installed and ran, but it seems to be the cloud version only. As you said this give continuous problem and is in fact unusable.

    Therefore the trick seems to be to find a standalone working version of this software.
     
  6. midnitmike
    Joined: Apr 2012
    Posts: 257
    Likes: 20, Points: 0, Legacy Rep: 167
    Location: Haines and Juneau

    midnitmike Senior Member

    farjoe,
    The 123DCatch.msi I have is 91,488KB in size and like most of the photogrammetric software out there uses cloud based computing to process the images. Stand alone versions are available from other software companies, but the hardware requirements to run them are pretty steep. I've tried using some point cloud generating software locally, but it ran for 13 hours continiously on my laptop before I finally canceled the operation realizing that it had only made it part way through it's computations.

    Because the demands are so high the only reasonable alternative for most people is to avail themselves of cloud computing for the initial stages of processing. Once thats done download the files and modify them locally using either the software I mentioned above or your own favorites.

    Mike
     
  7. DCockey
    Joined: Oct 2009
    Posts: 4,673
    Likes: 301, Points: 83, Legacy Rep: 1485
    Location: Midcoast Maine

    DCockey Senior Member

    I use PhotoScan for photogrammetry processing which runs on my desktop and laptop. Both less than $1500. I typically use 200 to 800 photos for a boat.

    A report on using PhotoScan and Rhino for documenting boats is available at https://vesseldoc.wikispaces.com/
     

  8. midnitmike
    Joined: Apr 2012
    Posts: 257
    Likes: 20, Points: 0, Legacy Rep: 167
    Location: Haines and Juneau

    midnitmike Senior Member

    Thank you,
    That was a wonderful article that I read with great interest.

    Mike
     
Loading...
Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.