Export multiple meshes as separate output files (.PLY and .OBJ)
A processing system for 3D triangular meshes
Brought to you by:
cignoni,
granzuglia
I have 32 meshes that I have edited inside meshlab and I need them exported to separate vertex-colored .PLY files. Is automation like this possible in the current version of meshlab?
I am able to do it manually, but I have to do this at least 10 times the coming days, so it would be nice if it could be automated.
Thanks for this life-saving piece of software!
mStuff
If you don't need operations contained inside the Edit menu but just the
ones inside the Filters menu you can use MeshLabServer. I suggest you to
use the last version contained in MeshLab 1.3.4 beta. Unfortunately it
has been just released for Windows 64bits.
http://sourceforge.net/projects/meshlab/files/meshlab-devel/MeshLabDevel_v134BETA/MeshLabDevel_v134BETA_64bit_2014_05_28.exe/download
Here
http://www.andrewhazelden.com/blog/2012/04/automate-your-meshlab-workflow-with-mlx-filter-scripts/
you can find a tutorial referred to a previous meshlabserver version.
Please, note that the commandline syntax has been slightly changed.
Here the new one
meshlabserver [logargs] [args]
where logargs can be:
-d filename dump on a text file a list of all the
filtering functions
-l filename log of the filters is ouput on a file
where args can be:
-p filename meshlab project (.mlp) to be loaded
-w filename [-v] output meshlab project (.mlp) to be saved.
If -v flag is specified a 3D model meshfile.ext
contained in the input project will be
overwritten,
otherwise it will be saved in the same
directory of
input mesh as a new file called
meshfile_out.ext.
All the mesh attributes will be exported in the
saved files
-i filename mesh that has to be loaded
-o filename [-m <opt>] the name of the file where to write the
current mesh
of the MeshLab document.
If -m is specified the specified mesh
attributes will
be saved in the output file. the param
<opt> 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,
fc -> face colors, ff -> face flags,
fq -> face quality, fn-> face normals,
wc -> wedge colors, wn-> wedge normals,
wt -> wedge texture coords
-s filename the script to be applied
to the
mesh contained into 'input.obj'. The vertex coordinates and the
per-vertex-color, the per-face-quality and the per-wedge-normal
attributes will be saved into the output.ply file
meshclean.mlx'
the script file meshclean.mlx will be applied to the document
composed by input0.obj and input1.ply meshes.
The mesh input1.ply will become the current mesh of the document
(e.g. the mesh to which the filters operating on a single
model will
be applied). A new output project outproj.mlp file will be
generated
(containing references to the input0.obj an input1.ply).
The files input0.obj and input1.ply will be overwritten.
outproj.mlp -s meshclean.mlx'
the mesh file input.obj will be added to the meshes referred
by the
loaded meshlab project file proj.mlp. The mesh input.obj
will become
the current mesh of the document, the script file
meshclean.mlx will
be applied to the meshes contained into the resulting document.
the project file outproj.mlp will be generated
A 3D model meshfile.ext contained in the input project
proj.mlp will
be saved in a new file called meshfile_out.ext
(if you want to overwrite the original files use the -v flag
after
the outproject filename) all the attributes of the meshes
will be
saved into the output files; the log info will be saved into the
file logfile.txt.
matters because
filters that use meshes as parameters choose the mesh based on the
order.
The format of the output mesh is guessed by the used extension.
Script is optional and must be in the xml format saved by MeshLab.
Il 27/05/2014 21:30, mStuff ha scritto: