MESHLABSERVER(1)

πŸ“¦ version 2020.09, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ‘‘ MESHLABSERVER πŸ‘‘ β€” the open source batch mesh processing system

okay bestie, listen. this is meshlabserver, from the General Commands Manual (section 1, she's a classic πŸ’…). she's the batch-mode little sister of the interactive app, and she is so good at her job. let's get into it.


✨ SYNOPSIS ✨

meshlabserver [-d output]
meshlabserver [-l logfile] [-p projectfile] [-w outputprojectfile [-x]]
              [-i meshfile] ... [-o outfile [-l opt_layer]
              [-m opt_mask]] [-s scriptfile]

πŸ¦‹ DESCRIPTION πŸ¦‹

meshlabserver lets you do batch-processing with all the functionality that lives inside the interactive meshlab(1) application. like, no clicking required, she just goes. ✨

the arguments are as follows, and yes we're doing all of them, no skipping:

  • -d output β€” dumps a list of ALL the filtering functions into a text file. every single one. she's thorough like that πŸ’…
  • -l logfile β€” the log of the filters gets written out to a file. receipts, basically 🧾
  • -p projectfile β€” the meshlab project ( .mlp ) you want loaded.
  • -w outputprojectfile [-x] β€” outputs a meshlab project (.mlp) to be saved. here's the tea though: if the -x flag is specified, any 3D model file(s) meshfile.ext contained in the input project will be OVERWRITTEN 😭. otherwise β€” for an input filename of meshfile.ext β€” the model gets saved in the same directory as the input mesh, as a new file called meshfile_out.ext. and ALL the mesh attributes will be exported in the saved files. all of them. periodt.
  • -i file β€” the mesh that has to be loaded.
  • -o outfile [-l opt_layer] [-m opt_mask] β€” the name of the file where to write the current layer of the project.
    • -l opt_layer β€” save the specified layer to the chosen filename. valid values for opt_layer can be:
      • A number in the range [0, last_layer_in_the_project] β€” to indicate the desired layer by its index.
      • 'c' β€” indicate the CURRENT layer in the project.
      • 'x' β€” indicate the LAST layer in the project.
    • -m opt_mask β€” the listed mesh attributes will be saved in the output file. the parameter opt_mask can be a space-separated list of the following attributes:
      • 'vc' β€” vertex colors
      • 'vf' β€” vertex flags
      • 'vq' β€” vertex quality
      • 'vn' β€” vertex normals
      • 'vt' β€” vertex texture coords
      • 'vr' β€” vertex radius
      • 'fc' β€” face colors
      • 'ff' β€” face flags
      • 'fq' β€” face quality
      • 'fn' β€” face normals
      • 'wc' β€” wedge colors
      • 'wn' β€” wedge normals
      • 'wt' β€” wedge texture coords
      • 'mp' β€” polygonal mesh info
      • 'sa' β€” save in ascii format
  • -s scriptfile β€” the script to be applied. it must be in the xml format saved by MeshLab. no freestyling, she needs the real format.

πŸ“ NOTES πŸ“

there can be multiple meshes loaded, and the order they're listed in matters, because filters that use meshes as parameters choose the mesh based on the order. so like, the lineup is the whole vibe. don't shuffle it πŸ™ˆ

the format of the output mesh is guessed by the used extension. she just knows. iykyk.


🚦 EXIT STATUS 🚦

the meshlabserver utility exits 0 on success, and >0 if an error occurs.


🌸 EXAMPLES 🌸

1. apply the script contained in the file meshclean.mlx to the mesh contained in input.obj. save the per-vertex-color, the per-face-quality, and the per-wedge-texture attributes contained in the current layer into output.ply.

$ meshlabserver -i input.obj -o output.ply -m vc fq wt -s meshclean.mlx

2. apply the script contained in the file meshclean.mlx to the mesh contained in input.obj. save the per-vertex-color, the per-face-quality and the per-wedge-texture attributes contained in the layer 2 (if it exists!) into output.ply. save the last layer of the project to output_last with the default geometric attributes.

$ meshlabserver -i input.obj -o output.ply -l 2 -m vc fq wt -o output_last.ply -l l -s meshclean.mlx
yes bestie, copy that -l l exactly as written. character for character. we don't editorialize, we just type πŸ‘‘

3. apply the script contained in the file meshclean.mlx to the mesh composed of input0.obj and input1.ply. make input1.ply the current mesh of the project (i.e. the mesh to which the filters operating on a single model will be applied). generate a new output project outproj.mlp containing references to input0.obj and input1.ply. the files input0.obj and input1.ply will be overwritten. a log will be written to logfile.txt.

$ meshlabserver -l logfile.txt -p proj.mlp -i input.obj -w outproj.mlp -s meshclean.mlx

πŸ‘€ SEE ALSO πŸ‘€


πŸ’œ AUTHOR πŸ’œ

Paolo Cignoni - Visual Computing Lab - ISTI - CNR


and that's the whole page, bestie 🫢 she was written by the Debian crew, March 05, 2020, and she's filed under MESHLABSERVER(1) β€” go forth and batch-process, you absolute icon β­πŸ’–

πŸ“¦ where this page comes from