Please, when using this tool, cite the following reference:
Meshlab: an open-source mesh processing tool. P. Cignoni, M. Callieri, M. Corsini, M. Dellepiane, F. Ganovelli, G. Ranzuglia Proceedings of the 2008 Eurographics Italian Chapter Conference, ISBN: 978-3-905673-68-5, pp. 129-136, DOI: 10.2312/LocalChapterEvents/ItalChap/ItalianChapConf2008/129-136
さて,操作マニュアルを調べてみた。 MeshLAB Tutorial ここには,はじめに,Cloud Compare: Point cloud and mesh editor,MeshLab Point cloud and mesh editor,とあって,ネット上では,meshファイル対応と流布されているが,点群のPLYファイルが重視されている。 MeshLab Documentation November 13, 2017 | Author: Lucy Sharp | Category: N/Aこれは,2017年発行でPDFの形でダウンロードできる。ほとんど図が無くて覚え書きのような印象である。
追記 Jan. 27, 2023: School of Design, Faculty of Liberal Arts and SciencesのMeshLab: Point Cloud to Mesh の情報はpoint cloudをmeshに変換するためのMeshLab使用の注意点を学生に示したものである。一般に3Dスキャナーで得られたpoint cloudの点数は膨大のため,その前に軽量化せよという。iPhone 12 Pro LiDARを使うボクには全くあてはまらない。ただ,MeshLabがそういう使い方のためでもあると理解できたのである。File > Import mesh,のコマンドは,そういう訳で,point cloudを当然含んでいることになる。そして,そのあと,mesh出力が可能なのである。point cloudファイルはここでは.ascなので,三段階の処理が必要になる。ぼくの場合の3Dスキャン結果の出力データはplyファイルなので,この必要は無いと思うが,図2のOBJファイル表示を見ていると,メッシュファイルであっても,faceの裏表が不揃いなので,plyファイルについてもこの三段階の作業は必要かも知れないと思う。そこで,一応,上記サイトの情報を次にコピペしておく。上記サイトには図も掲載されている。
Once it has imported successfully then you need to do three operations:
1. Compute Normals: (メッシュの三角形面faceを作成するために必要な法線の作成) Filters > Normals, Curvatures and Orientation > Compute Normals for Point Sets – Accept the default settings by pressing Apply. Wait
2. Optimise your point cloud: (これはpoint cloudの膨大なpoint数を縮減するための操作でぼくの場合は不要か) Reduce the density of the point cloud by choosing Filters > Point Set > Point Cloud Simplification
このPoint Cloud Simplificationのパネルについて, In the “Number of Samples” field pick somewhere between 100,000 (quicker, less detailed) and 1,000,000 (slower, bigger but more detailed). Click Apply. Wait. You will now see two versions of your point cloud scan – the original and the reduced version. この画面の説明として,You can switch them on and off (like Photoshop layers) in the right hand panel. Also you can drag the point size lower to get a clearer view of your scan.
3. Convert the optimised point cloud to a mesh: (点群をメッシュに) Click to turn off the original point cloud, leaving just the optimised version on and selected. Then Choose Filters > Remeshing, Simplification and Reconstruction > Surface Reconstruction: Ball Pivoting Accept the defaults and select Apply. Wait – potentially for a while. After the process is complete you will then be able to view your mesh – if it is too poor quality you could try again by optimising the original point cloud with a higher sample count. When you are happy with the result export the mesh using FILE > EXPORT MESH AS and choose an appropriate file type – OBJ would be suitable for bringing into Rhino, Blender, 3DS etc NOTE: when you bring your mesh into your 3d application there may be “back to front” sections; in Rhino these will show up as darker patches. To unify these normal, issue the command UnifyMeshNormals and select everything. This will flip all back to front faces in the same way.
Hiya, I tried to import and obj model (sleeveless top) in meshlab, however it gives this error: “Error details: some materials definitions were not found, a default white material is used where no materials are available”. The model imports correctly but like the error says there is no material, it’s just blank. All my material files are there, I even tried to copy over all the files into the same folder as the .obj file. Does anyone know what might be causing this? Thanks.
Try this, it worked for all my .obj with the same error. Seems that Meshlab doesn’t allow spaces in the name of the files. Rename texture, .mtl file, .obj file without spaces. Open with wordpad o notepad .mtl file and .obj file and at the beginning change the name of the texture and of the .mtl file. Open .obj with meshalb again!
さて,そういう訳で,iPhone 12 Pro LiDARで得た3D point cloudやmeshでみっともない欠落などがあった場合,自然界のものなので,そもそも簡単に補修できるものではない。欠落部分が研究の観点から重要な場合,アプリなんかでは,補修できない。現場に行って,3Dスキャンして取得するしかない。と考えると,point cloudやmeshの穴や破れが補修の対象になるのはかなり特殊な目的に限定される。この例が体積や表面積の計算であった。まあ,ぼくが何を求めているのか,都度確認をしないと行けない。
メーンメニューのすぐ下には,図6のように,ショートカットアイコン群が並ぶ。アイコン群16(Draw XYZ axes in world coordinates)をタップすると,XYZ軸が現れる。XYZはそれぞれRGB三原色の軸が使われており,右手座標系(デカルト座標系)になっているのがわかる。ただ,重力軸はZ軸の筈であるが,Y軸になっている。この点,注意が必要だ。 Nos. 10〜14の五個のアイコンは,左から,Bounding Box(境界ボックス),Points(点群),Wireframe(立体の辺だけから成るような線の集合で表現されるもの),Vert(vertices 多面体の頂点),そしてFace(多面体の面)が並ぶ。objを読み込んだ際には,この5アイコンのうち,右端のFaceだけが選ばれた状態であり,図7のように見える。押されたFaceをタップして解除すると,全画像が見えなくなる。
ところが,CloudCompareで Edit > Mesh > Measure volume,で,体積計算すると,consoleに,”The above volume might be invalid (mesh has holes),となっていて,改善が見られない。表面積の方はそういうエラーメッセージは出ない。両数値とも悪い数値では無いが。 MeshLabでの,Filters > Selection > Select Border,を使ったチェックが役に立っていないのである。ワイアーフレーム表示をして明らかな穴を埋める方法については,後に実行したいと思うが,今のこの問題をどうするかで,である。 穴埋め関係の情報は,MeshLab Simple Mesh Editing に整理されている。Close Holesに関連して,max size to be closedのデフォルトが30になっているが,このmax sizeの意味が理解できない。このサイトでは, Close Small Holes Holes which are “small” with respect to the mesh size, possibly almost planar… Simple filter: Remeshing, simplification and reconstruction->Close Holes Parameters: max size to be closed (in terms of perimeter lenght) とある。ここでmax sizeは穴の周囲長としている。が,現物をスキャンした者からすると,単位としてメートルを考えてしまう。段ボール箱などで穴が30mという最大値そのものに意味が無いので,実際に作業をしてみるしかない。
そこで,まずは次のサイトを参考にした。MeshLab でメッシュの穴埋めを行なう。 1 ツールバー右端の検索場で「close」を入力すると,検索結果に「Close Holes」が見え,それを選ぶと,図12のように,Close Holesのパネルが見えるので,Max size to be closed: 30などデフォールトのまま, Applyする。そうすると,図13のようなFilter Failureが現れる。ここには,filter requires edge manifoldeness,と出ている。
図12 Close Holes
図13 Filter Failure in Close Holes
2 逆引きMeshLab の,Filter (スキャンデータをきれいにする),には,穴埋め欄の説明に, Filters > [Remeshing simplification and Reconstruction] > [Close Holoes] Manifoldのエラーが出る場合は事前に、Filters > Cleaning and Repairing > Remove faces from Non Manifold Edges,などを実施,とある。図14のように,現在のMeshLabではより改良されている。 Filters > Cleaning and Repairing > Repair non Manifold Edges
図14 Repair non Manifold Eges
図15 Repair non Manifold Edges
図15には,Repair non Manifold Edges,のパネルが現れている。選択肢が二つあるが,デフォルトのRemove Facesのまま,Apply。
3 図17右下のconsoleには,Repair non Manifold Edges,が成功したことが示されている。”Successfully removed 15 non-manifold faces”である。 そして,再び,図16のように,Close Holesを実行したのであるが,図17右下のconsoleには,”Closed 12 holes and added 20 new faces”,とある。なお,Close Holesは, Filters > Remeshing, Simplification and Reconstruction > Close Holes,で実行される。
このポスティングを作成して気付いたことであるが,段落のはじめにインデントを入力しても,Updateボタンを押したら無効になる。How to Indent Paragraphs in WordPress にはこの手法が書かれているが,”In order to set indent for a paragraph, you need to preface the text with this HTML tag: <p style=”padding-left: XXXpx;”>, where, of course, you will swap the placeholder XXX with the number of pixels. You will, of course, need to close the tag, too, by ending the paragraph with: </p>.”とあって凄く面倒なので,ソフトリターンや段落毎のインデントは諦めることにしよう。どうもこれがぼくがClassic Editorから離脱した原因だったようだ。
図3を挿入するには,図3の左上の赤枠内の左手のボタン”Add Media”をクリックする必要がある。その後,指示に従って,スクリーンショットをPhotoshopで編集した結果を入れているフォルダーにアクセスして,uploadすると ,画面が現れる。その一部を図4に示している。図4の右ペーンでcaptionを入力して,右下のボタン”Insert into post”をクリックすると,このポスティングのように,この図4が挿入される。
まずは長いロープを切らずに使うのに,縮め結び sheepshank があるが,これは上記 Animated Notchでは,The Sheepshank Knot should be avoided! とある。日本語のサイトでも強い引きには耐えられないというような記述がある。”The Alpine Butterfly Loop is the best replacement for a Sheepshank. It’s a knot used to take up the slack on a line or isolate a worn section of a rope. This knot can be used to shorten a length of rope too.”
図3左手上図の支え杭にロープを固定するのであるが,そのノットとして,sheet bend 一重繋ぎを選んだ(二種のロープを繋ぐ場合,太い方は青色のロープに対応する)。このノットは,ヨットの帆を繋ぐために使われてきたものである。なお,sheetは帆船の一部のロープを言う。図4の7コマの図は,Animated Knots が提供する Sheet Bend: Joins two ropes of unequal, or similar, size から拝借し,テキストや線を追加したものである。図4の右下のものは,Pinterestに掲載されていたもので,図中の3,5,6は7コマに付した番号と対応している。
May 17の調査では紙を忘れてiPhoneの録音機能を使ったが,問題があって,駄目だった。 アップルのボイスメモを押してすぐにしゃべると,最初の音声が録音されていなかった。 なぜか,ずーとオンのままで,聞くに耐えない。 録音の時刻が自動に記録されると思ったが誤りだった。タイムスタンプが無い。いいソフトを探そう。
とはいえ,Scaniverseが無料である点を調べてみた。Scaniverse is joining Nianticで見ると,今後さらに開発されてゆくことは確かなようである。現在,かつて有料だったScaniverse Proが無料で公開されているようだ。ぼくのように元々無料で使ってインストールしている場合,いわば自動的にProに替わっているらしい。今日も使いながら,使用環境に制限を感じたので,あらたに有料化されて制限を撤廃してもらいたいものだ。
以下,Scaniverseで取得した段ボール三箱と神武天皇遙拝所碑という二つの直方体を主とするオブジェクトの面積と体積をCloudCompareで求める作業に入る。段ボール三箱のスキャン結果を次のムーヴィー3に掲載し,計算結果を図36に示す。なお,神武天皇遙拝所碑の体積はすでに,図8に示している。 図36には,サンペレグリノ炭酸水の箱を三箱並べている。スケールでサイズを測ると同じ段ボール箱ながら束ねると単に合計サイズにはならない。500mLビンが36本入っているこの箱を正位置にして,短辺と長辺を比べると,長辺は短辺の正しく2倍になっているので,短辺を一つの単位とすると,図36の側面は12面からなっている。体積と面積に共通の上面の面積は実測値 (3x短辺) x (2x短辺) = 61.5 cm x 41.5 cmとなっている。図36では短辺のみからなる辺は5辺あるがいずれも21cmであった。以上の観点と計測結果から,図36で示した体積と面積の結果を得ることができた。
set top viewにして少し回転して,上段のツールのハサミアイコンをクリックして,segmentationを実施した。 図39左ペーン上部のDB Treeに見られるように,remainingは選択せずsegmentedだけを表示している。図39に見られるremainingクラウドは削除して,segmentedのクラウドを含むメーンファイルを選択して,保存した。
Empty cellsに対して,leave emptyとすると,Volume 0.025, Matching cells 16.3%となり,この作業を経てもクラウドの穴は完全には修復されていない。赤字で,At least one of the cloud is sparse ! You should fuill the empty cells.が出ている。
表3修正済みは,メッシュファイルを使った段ボール三箱の体積と面積の計算結果を表2修正済みに追加したものである。段ボール三箱も神武碑も,メッシュファイルでは,体積面積共に,実測値に近い。なお,メッシュの体積については,いずれも次のエラーメッセージが現れている。The above volume might be invalid (mesh has holes).
点群PLYファイルの体積と表面積は余りに実測値とかけ離れている。この原因として考えられるのは,元々の点群クラウドの欠損である。 とはいえ,ここで確かめなければならないのは,石碑の形態を代表する幾つかのポイントの(X, Y, Z)座標をpoint list pickingで調べて,個々の代表点から幾何学的な3Dモデルを求めて,実測モデルと一致するかどうかを確かめる必要がある。これこそ,体積や表面積を論じる以前に重要である。