January 14, 2015 at 22:20 #37552MikeParticipant
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 to the next step.
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.
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 these programs tend to 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.
I hope some of you may find this useful or at least interesting.
January 27, 2015 at 06:30 #37579Peter EdmondsParticipant
Congratulations on achieving a high end conversion. One issue I can see is the conversion of your essentially point cloud data into meaningful items such as bottom panel, side panel, keel side, etc.
Your port/starboard issue could just be a lack of symmetry in the vessel as built. I’ve lifted many a hull shape (vessels as your illustration and others). A great tip here is to get the vessel levelled transversely (usually fairly easy) and longitudinally to wha you are setting as your vessel base plane. In many vessels such as that illustrated I take the line of the chine aft as being vessel horizontal – many are built that way.
The preferred alternative if you can’t level the vessel is to set up a tilted sight plane. This requires a theodolite, or a dumb dumpy level (one that doesn’t enforce a horizontal self-levelling plane on you). Fitting a plane to 3 spots is easy; best fit for multiple can be tricky and judgemental.
This process is just like setting up an optical plane for marking a paint waterline on an existing vessel.
The great attraction of working with a level vessel (or set plane) is that you don’t have to correct offsets for tilt.
Now to an alternative path, which I am still learning/developing, as a relatively new DELFTship user. This is the use of marker points. I won’t attempt to describe the whole process here. This is great for working from an offsets table, and I am exploring the importing of raw lifted offsets, and then fairing within DS. Excel is great value, with copying, to arrange offsets from what is received into individual point x y z, and sequencing these, as required for the marker points. KNUCKLE is very useful here.
One I have discovered (and value) is that a text file to input for marker points can have a variety of lines in it – transverse sections mixed with longitudinal lines such as sheer, chine etc.Lines can cross – such as a chine line, several waterlines and several buttocks – great if you are working direct from an offsets table. It then helps a great deal if you position your DS lines plan sections, waterlines, buttocks to match your marker point lines in vessel space.
A simplification I have been using is to consider stopping your surface import at the rabbet line, sheer line and similar. Once you have faired the rabbet line, you can then extrude it downwards by a nominal amount, then edit the new line point z to get the keel profile on the side of keel line. This line can then be extruded inwards by a nominal amount, and the generated points edited to 0 y to give the centre profile.
I am faced with some legacy designs I want to get into DS, plus new projects to be able to accept data from lifted offsets or existing offsets tables. Previously I used Hullform (Blue Peter Marine) for many years – affordable, and a good emulation of what we used to do with battens on the drawing board or loft floor. I have changed because I want to be able to import good faired hull surfaces int SolidWorks, my primary design tool. DS and IGES file is working here, with considerable refinement still on the way.
PS – what is the illustrated boat? Very close to a significant part pf my market.
Perth, West Aust.
January 27, 2015 at 12:04 #37592MikeParticipant
My original intent for importing the point cloud was to use it as a visual guide while I manually manipulated the control points and surfaces of my model to coincide with this data. The results were far more accurate then anything I had achieved thus far using orthographic images alone, but the process to get to that stage is too cumbersome for most and potentially prone to error creep. However using the methods I employed, the error in my point cloud y axis points was off by as little as 0.0028, something I can easily live with. I am currently working on a paper describing a workflow whereby data contained in the point cloud is used to directly model the hull surface itself.
The symmetry issue in my model was due mainly to the fact that I only had unencumbered access to the starboard side of the vessel. Because I was unable to keep the entire vessel in frame for much of the port side, no photogrammetric program that I tested was able to successfully stitch that portion of the hull together coherently.
To be honest I hadn’t considered errors in the vessels trim simply because there were so many other issues that had to be dealt with first. Correcting the digital version was and is much easier since it can be manipulated on all three axis with the click of a mouse.
I had considered using marker points in my next endeavour but I think instead I’ll try importing chine lines. If I understand the help file correctly DS will import the xyz co-ordinates of a chine line and place the controls points such that the surface falls on my co-ordinates. Since these xyz values will be extracted directly from the point cloud and represent the vessels surface it should produce a more accurate representation then I can achieve manually. As an added benefit it will automatically create the surfaces, something that one would be forced to do manually if you try using the point cloud co-ordinate points to construct control points and surfaces.
The boat I’m using in this test is a 36′ Mel Martin originally manufactured in Bellingham Washington starting in the 70’s. So far as I know there are no lines drawings or offsets available for most of the vessels used in our local fishing fleet and it’s because of this that I began experimenting with photogrammetrics as a means of bringing these hulls into DS with some degree of accuracy.
November 20, 2015 at 21:39 #38076Bryan HanselParticipant
Any update to your process?
- You must be logged in to reply to this topic.
1 week ago
Design Hydrostatic in 13.10 (328) latest update
1 week, 5 days ago
Weight and displacement seem odd
2 weeks, 3 days ago
Cross Curves of Stability (KN-Values)
2 weeks, 5 days ago
by Owen Kenny
3 weeks, 5 days ago
Part Import Bug (13.325)
by Terrance Egolf
3 weeks, 5 days ago
Saving to correct scale, DXF
by Mats Nyberg
3 weeks, 5 days ago
Serious Lagging in Hull Modeling
by Terrance Egolf
1 month ago
moving control point with arrow keys
by Jesper Kromann
1 month ago
Background Images in v.310 (324)
by Terrance Egolf
1 month, 1 week ago