List of I/O Formats¶
load mesh parameters¶
Here are listed all the file formats that can be loaded usingthe functions pmeshlab.MeshSet.load_new_mesh() and pmeshlab.MeshSet.load_current_mesh(), with all the possible parameters that can be accepted by these functions.
-
3ds - Load 3DS format.
Parameters:
file_name : str = 'file_name.3DS'File Name: The name of the file to loadload_in_a_single_layer : bool = FalseLoad in a single layer: 3DS files may contain more than one mesh. If this parameter is set to false, all the meshes contained in the file will be merged in a single mesh.
-
apts - Load apts format.
Parameters:
file_name : str = 'file_name.apts'File Name: The name of the file to load
-
asc - Load ASC format.
Parameters:
file_name : str = 'file_name.ASC'File Name: The name of the file to loadrowtoskip : int = 0Header Row to be skipped: The number of lines that must be skipped at the beginning of the file.triangulate : bool = TrueGrid triangulation: if true it assumes that the points are arranged in a complete xy grid and it tries to perform a naive height field triangulation of the input data. Length of the lines is detected automatically by searching x jumps. If the input point cloud data is not arranged as a xy regular height field, no triangles are created.
-
bre - Load BRE format.
Parameters:
file_name : str = 'file_name.BRE'File Name: The name of the file to loadpointsonly : bool = Falseonly import points: Just import points, without triangulationunify_vertices : bool = TrueUnify Duplicated Vertices in BRE files: The BRE format is not an vertex-indexed format. Each triangle is composed by independent vertices, so, usually, duplicated vertices should be unified
-
ctm - Load CTM format.
Parameters:
file_name : str = 'file_name.CTM'File Name: The name of the file to load
-
dae - Load DAE format.
Parameters:
file_name : str = 'file_name.DAE'File Name: The name of the file to load
-
e57 - Load E57 format.
Parameters:
file_name : str = 'file_name.E57'File Name: The name of the file to load
-
es - Load ES format.
Parameters:
file_name : str = 'file_name.ES'File Name: The name of the file to loadseed : int = 1Seed for random mesh generation: write a seed for the random generation of the meshmaxrec : int = 0set the maximum recursion: the mesh is built recursively according to the productions of the grammar, so a limit is needed. If set to 0 meshlab will generate the mesh according to the maximum recursion set in the filesphereres : int = 1set maximum resolution of sphere primitives, it must be included between 1 and 4: increasing the resolution of the spheres will improve the quality of the meshmaxobj : int = 0set the maximum number of object to be rendered: you can set a limit to the maximum number of primitives rendered. If set to 0 meshlab will generate the mesh according to the input file
-
fbx - Load FBX format.
Parameters:
file_name : str = 'file_name.FBX'File Name: The name of the file to load
-
glb - Load GLB format.
Parameters:
file_name : str = 'file_name.GLB'File Name: The name of the file to loadload_in_a_single_layer : bool = FalseLoad in a single layer: GLTF files may contain more than one mesh. If this parameter is set to false, all the meshes contained in the file will be merged in a single mesh.
-
gltf - Load GLTF format.
Parameters:
file_name : str = 'file_name.GLTF'File Name: The name of the file to loadload_in_a_single_layer : bool = FalseLoad in a single layer: GLTF files may contain more than one mesh. If this parameter is set to false, all the meshes contained in the file will be merged in a single mesh.
-
obj - Load OBJ format.
Parameters:
file_name : str = 'file_name.OBJ'File Name: The name of the file to load
-
off - Load OFF format.
Parameters:
file_name : str = 'file_name.OFF'File Name: The name of the file to load
-
pdb - Load PDB format.
Parameters:
file_name : str = 'file_name.PDB'File Name: The name of the file to loadusecolors : bool = TrueUse Atoms colors: Atoms are colored according to atomic typejustpoints : bool = FalseSURFACE: Atoms as Points: Atoms are created as points, no surface is built. Overrides all subsequential surface parametersjustspheres : bool = TrueSURFACE: Atoms as Spheres: Atoms are created as intersecting spheres, no interpolation surface is built. Overrides all subsequential surface parametersinterpspheres : bool = FalseSURFACE: Atoms as Jointed Spheres: Atoms are created as spheres, joining surface is built. Overrides all subsequential surface parametersmetaballs : bool = FalseSURFACE: Atoms as Metaballs: Atoms are created as blobby interpolation surface, refer to BLINN Metaballs article. Overrides all subsequential surface parametersvoxelsize : float = 0.25Surface Resolution: is used by Jointed Spheres and Metaballblobby : float = 2Blobbyness factor: is used by Metaball
-
ply - Load PLY format.
Parameters:
file_name : str = 'file_name.PLY'File Name: The name of the file to load
-
pts - Load pts format.
Parameters:
file_name : str = 'file_name.pts'File Name: The name of the file to load
-
ptx - Load PTX format.
Parameters:
file_name : str = 'file_name.PTX'File Name: The name of the file to loadmeshindex : int = 0Index of Range Map to be Imported: PTX files may contain more than one range map. 0 is the first range map. If the number if higher than the actual mesh number, the import will failpointsonly : bool = TrueKeep only points: Import points a point cloud only, with radius and normals, no triangulation involved, isolated points and points with normals with steep angles are removed.usecolor : bool = Trueimport color: Read color from PTX, if color is not present, uses reflectance insteadflipfaces : bool = FalseLEICA: flip normal direction: LEICA PTX exporter goes counterclockwise, FARO PTX exporter goes clockwisepointcull : bool = Truedelete unsampled points: Deletes unsampled points in the grid that are normally located in [0,0,0]anglecull : bool = TrueCull faces by angle: shortangle : float = 85Angle limit for face culling: short
-
qobj - Load QOBJ format.
Parameters:
file_name : str = 'file_name.QOBJ'File Name: The name of the file to load
-
stl - Load STL format.
Parameters:
file_name : str = 'file_name.STL'File Name: The name of the file to loadunify_vertices : bool = TrueUnify Duplicated Vertices in STL files: The STL format is not an vertex-indexed format. Each triangle is composed by independent vertices, so, usually, duplicated vertices should be unified
-
tri - Load TRI format.
Parameters:
file_name : str = 'file_name.TRI'File Name: The name of the file to load
-
txt - Load TXT format.
Parameters:
file_name : str = 'file_name.TXT'File Name: The name of the file to loadrowtoskip : int = 0Header Row to be skipped: The number of lines that must be skipped at the beginning of the file. Generally, these files have one or more 'header' lines, before the point liststrformat : str = 'X Y Z' (or int = 0)Possible enum values:
Point format: Which values are specified for each point, and in which order.'X Y Z''X Y Z Reflectance''X Y Z Reflectance R G B''X Y Z Reflectance Nx Ny Nz''X Y Z Reflectance R G B Nx Ny Nz''X Y Z Reflectance Nx Ny Nz R G B''X Y Z R G B''X Y Z R G B Reflectance''X Y Z R G B Reflectance Nx Ny Nz''X Y Z R G B Nx Ny Nz Reflectance''X Y Z Nx Ny Nz''X Y Z Nx Ny Nz R G B Reflectance''X Y Z Nx Ny Nz Reflectance R G B'
separator : str = ';' (or int = 0)Possible enum values:
Separator: The separator between individual values in the point(s) description.';'',''SPACE'
rgbmode : str = '[0-255]' (or int = 0)Possible enum values:
Color format: Colors may be specified in the [0-255] or [0.0-1.0] interval.'[0-255]''[0.0-1.0]'
onerror : str = 'skip' (or int = 0)Possible enum values:
On Parsing Error: When a line is not properly parsed, it is possible to 'skip' it and continue with the following lines, or 'stop' importing at that point'skip''stop'
-
vmi - Load VMI format.
Parameters:
file_name : str = 'file_name.VMI'File Name: The name of the file to load
-
wrl - Load WRL format.
Parameters:
file_name : str = 'file_name.WRL'File Name: The name of the file to load
-
x3d - Load X3D format.
Parameters:
file_name : str = 'file_name.X3D'File Name: The name of the file to load
-
x3dv - Load X3DV format.
Parameters:
file_name : str = 'file_name.X3DV'File Name: The name of the file to load
-
xyz - Load xyz format.
Parameters:
file_name : str = 'file_name.xyz'File Name: The name of the file to load
save mesh parameters¶
Here are listed all the file formats that can be saved usingthe function pmeshlab.MeshSet.save_current_mesh(), with all the possible parameters that can be accepted by these functions.
-
3ds - Save 3DS format.
Parameters:
file_name : str = 'file_name.3DS'File Name: The name of the file to savesave_face_color : bool = TrueSave Face Color: Save Face Colorsave_face_normal : bool = TrueSave Face Normal: Save Face Normalsave_wedge_texcoord : bool = TrueSave Wedge TexCoord: Save Wedge TexCoordsave_wedge_normal : bool = TrueSave Wedge Normal: Save Wedge Normal
-
ctm - Save CTM format.
Parameters:
file_name : str = 'file_name.CTM'File Name: The name of the file to savelossless : bool = FalseLossLess compression: If true it does not apply any lossy compression technique.relativeprecisionparam : float = 0.0001Relative Coord Precision: When using a lossy compression this number control the introduced error and hence the compression factor.It is a number relative to the average edge length. (e.g. the default means that the error should be roughly 1/10000 of the average edge length)save_vertex_quality : bool = TrueSave Vertex Quality: Save Vertex Qualitysave_vertex_color : bool = TrueSave Vertex Color: Save Vertex Color
-
dae - Save DAE format.
Parameters:
file_name : str = 'file_name.DAE'File Name: The name of the file to savesave_vertex_color : bool = TrueSave Vertex Color: Save Vertex Colorsave_vertex_coord : bool = TrueSave Vertex Coord: Save Vertex Coordsave_vertex_normal : bool = TrueSave Vertex Normal: Save Vertex Normalsave_wedge_texcoord : bool = TrueSave Wedge TexCoord: Save Wedge TexCoordsave_wedge_normal : bool = TrueSave Wedge Normal: Save Wedge Normal
-
dxf - Save DXF format.
Parameters:
file_name : str = 'file_name.DXF'File Name: The name of the file to save
-
e57 - Save E57 format.
Parameters:
file_name : str = 'file_name.E57'File Name: The name of the file to savesave_vertex_quality : bool = TrueSave Vertex Quality: Save Vertex Qualitysave_vertex_color : bool = TrueSave Vertex Color: Save Vertex Colorsave_vertex_normal : bool = TrueSave Vertex Normal: Save Vertex Normal
-
idtf - Save IDTF format.
Parameters:
file_name : str = 'file_name.IDTF'File Name: The name of the file to saveposition_val : numpy.ndarray[numpy.float64[3]] = [0, 0, -1.73205]Camera Position: The position in which the camera is set. The default value is derived by the 3d mesh's bounding box.target_val : numpy.ndarray[numpy.float64[3]] = [0, 0, 0]Camera target point: The point towards the camera is seeing. The default value is derived by the 3d mesh's bounding box.fov_val : float = 60Camera's FOV Angle 0..180: Camera's FOV Angle. The values' range is between 0-180 degree. The default value is 60.compression_val : int = 500U3D quality 0..1000: U3D mesh's compression ratio. The values' range is between 0-1000 degree. The default value is 500.save_vertex_color : bool = FalseSave Vertex Color: Save Vertex Colorsave_vertex_normal : bool = FalseSave Vertex Normal: Save Vertex Normalsave_face_color : bool = FalseSave Face Color: Save Face Colorsave_wedge_texcoord : bool = TrueSave Wedge TexCoord: Save Wedge TexCoordsave_wedge_normal : bool = TrueSave Wedge Normal: Save Wedge Normal
-
json - Save JSON format.
Parameters:
file_name : str = 'file_name.JSON'File Name: The name of the file to savesave_vertex_color : bool = TrueSave Vertex Color: Save Vertex Colorsave_vertex_coord : bool = TrueSave Vertex Coord: Save Vertex Coordsave_vertex_normal : bool = TrueSave Vertex Normal: Save Vertex Normal
-
nxs - Save NXS format.
Parameters:
file_name : str = 'file_name.NXS'File Name: The name of the file to savenode_faces : int = 32768Node faces: Number of faces per patch, (min ~1000, max 32768)
This parameter controls the granularity of the multiresolution: smaller values result in smaller changes (less 'pop').Small nodes are less efficient in rendering and compression.
Meshes with very large textures and few vertices benefit from small nodes.top_node_faces : int = 4096Top node faces: Number of triangles in the top node. Controls the size of the smallest LOD. Higher values will delay the first rendering but with higher quality.tex_quality : int = 95JPEG texture quality [0-100]: jpg texture qualityram : int = 2000Ram buffer: Max ram used in MegaBytes (WARNING: just an approximation)skiplevels : int = 0Skip levels: Decimation skipped for n levels. Use for meshes with large textures and very few vertices.origin : numpy.ndarray[numpy.float64[3]] = [0, 0, 0]Origin: new origin for the modelcenter : bool = FalseCenter: Set origin in the bounding box centerpow_2_textures : bool = FalsePow 2 textures: Create textures to be power of 2deepzoom : bool = FalseDeepzoom: Save each node and texture to a separated file. Used for server which do not support http range requests (206). Will generate MANY files.adaptive : float (bounded) = 0.333 [min: 0; max: 1]Adaptive: Split nodes adaptively. Different settings might help with very uneven distribution of geometry.save_vertex_color : bool = TrueSave Vertex Color: Save Vertex Colorsave_vertex_coord : bool = TrueSave Vertex Coord: Save Vertex Coordsave_vertex_normal : bool = FalseSave Vertex Normal: Save Vertex Normalsave_wedge_texcoord : bool = TrueSave Wedge TexCoord: Save Wedge TexCoord
-
nxz - Save NXZ format.
Parameters:
file_name : str = 'file_name.NXZ'File Name: The name of the file to savenode_faces : int = 32768Node faces: Number of faces per patch, (min ~1000, max 32768)
This parameter controls the granularity of the multiresolution: smaller values result in smaller changes (less 'pop').Small nodes are less efficient in rendering and compression.
Meshes with very large textures and few vertices benefit from small nodes.top_node_faces : int = 4096Top node faces: Number of triangles in the top node. Controls the size of the smallest LOD. Higher values will delay the first rendering but with higher quality.tex_quality : int = 95JPEG texture quality [0-100]: jpg texture qualityram : int = 2000Ram buffer: Max ram used in MegaBytes (WARNING: just an approximation)skiplevels : int = 0Skip levels: Decimation skipped for n levels. Use for meshes with large textures and very few vertices.origin : numpy.ndarray[numpy.float64[3]] = [0, 0, 0]Origin: new origin for the modelcenter : bool = FalseCenter: Set origin in the bounding box centerpow_2_textures : bool = FalsePow 2 textures: Create textures to be power of 2deepzoom : bool = FalseDeepzoom: Save each node and texture to a separated file. Used for server which do not support http range requests (206). Will generate MANY files.adaptive : float (bounded) = 0.333 [min: 0; max: 1]Adaptive: Split nodes adaptively. Different settings might help with very uneven distribution of geometry.nxz_vertex_quantization : float = 0NXZ Vertex quantization: absolute side of quantization grid (uses quantization factor, instead)vertex_bits : int = 0Vertex bits: number of bits in vertex coordinates when compressing (uses quantization factor, instead)quantization_factor : float = 0.1Quantization factor: Quantization as a factor of errorluma_bits : int = 6Luma bits: Quantization of luma channelchroma_bits : int = 6Chroma bits: Quantization of chroma channelalpha_bits : int = 5Alpha bits: Quantization of alpha channelnormal_bits : int = 10Normal bits: Quantization of normalstextures_precision : float = 0.25Textures precision: Quantization of textures, precision in pixels per unitsave_vertex_color : bool = TrueSave Vertex Color: Save Vertex Colorsave_vertex_coord : bool = TrueSave Vertex Coord: Save Vertex Coordsave_vertex_normal : bool = FalseSave Vertex Normal: Save Vertex Normalsave_wedge_texcoord : bool = TrueSave Wedge TexCoord: Save Wedge TexCoord
-
obj - Save OBJ format.
Parameters:
file_name : str = 'file_name.OBJ'File Name: The name of the file to savesave_vertex_color : bool = TrueSave Vertex Color: Save Vertex Colorsave_vertex_coord : bool = TrueSave Vertex Coord: Save Vertex Coordsave_vertex_normal : bool = TrueSave Vertex Normal: Save Vertex Normalsave_face_color : bool = TrueSave Face Color: Save Face Colorsave_wedge_texcoord : bool = TrueSave Wedge TexCoord: Save Wedge TexCoordsave_wedge_normal : bool = TrueSave Wedge Normal: Save Wedge Normalsave_polygonal : bool = TrueSave Polygonal: Save Polygonal
-
off - Save OFF format.
Parameters:
file_name : str = 'file_name.OFF'File Name: The name of the file to savesave_vertex_color : bool = TrueSave Vertex Color: Save Vertex Colorsave_vertex_coord : bool = TrueSave Vertex Coord: Save Vertex Coordsave_face_color : bool = TrueSave Face Color: Save Face Colorsave_polygonal : bool = TrueSave Polygonal: Save Polygonal
-
ply - Save PLY format. Ply exporter also support saving custom attributes. You'll need to add an additional boolean parameter for each one of that you want to save, and use only non-capital letters for parameter names. These parameters have a prefix for each type of custom attribute:
__ca_vs__: Custom Attribute Vertex Scalar;__ca_vp__: Custom Attribute Vertex Point;__ca_fs__: Custom Attribute Face Scalar;__ca_fp__: Custom Attribute Face Point;
MyAttribute, you can save it in a ply file by calling:ms.save_current_mesh(file_name='myfile.ply', __ca_vs__myattribute=True)You can check the parameters available on a mesh by calling the MeshSet methodMeshSet.filter_parameter_values, with first parameter'ply'.Parameters:
file_name : str = 'file_name.PLY'File Name: The name of the file to savebinary : bool = TrueBinary encoding: Save the mesh using a binary encoding. If false the mesh is saved in a plain, readable ascii format.save_vertex_quality : bool = TrueSave Vertex Quality: Save Vertex Qualitysave_vertex_flag : bool = FalseSave Vertex Flag: Save Vertex Flagsave_vertex_color : bool = TrueSave Vertex Color: Save Vertex Colorsave_vertex_coord : bool = TrueSave Vertex Coord: Save Vertex Coordsave_vertex_normal : bool = FalseSave Vertex Normal: Save Vertex Normalsave_vertex_radius : bool = TrueSave Vertex Radius: Save Vertex Radiussave_face_quality : bool = TrueSave Face Quality: Save Face Qualitysave_face_flag : bool = FalseSave Face Flag: Save Face Flagsave_face_color : bool = TrueSave Face Color: Save Face Colorsave_wedge_color : bool = TrueSave Wedge Color: Save Wedge Colorsave_wedge_texcoord : bool = TrueSave Wedge TexCoord: Save Wedge TexCoordsave_wedge_normal : bool = TrueSave Wedge Normal: Save Wedge Normal
-
stl - Save STL format.
Parameters:
file_name : str = 'file_name.STL'File Name: The name of the file to savebinary : bool = TrueBinary encoding: Save the mesh using a binary encoding. If false the mesh is saved in a plain, readable ascii format.colormode : bool = TrueMaterialise Color Encoding: Save the color using a binary encoding according to the Materialise's Magic style (e.g. RGB coding instead of BGR coding).save_face_color : bool = TrueSave Face Color: Save Face Color
-
u3d - Save U3D format.
Parameters:
file_name : str = 'file_name.U3D'File Name: The name of the file to saveposition_val : numpy.ndarray[numpy.float64[3]] = [0, 0, -1.73205]Camera Position: The position in which the camera is set. The default value is derived by the 3d mesh's bounding box.target_val : numpy.ndarray[numpy.float64[3]] = [0, 0, 0]Camera target point: The point towards the camera is seeing. The default value is derived by the 3d mesh's bounding box.fov_val : float = 60Camera's FOV Angle 0..180: Camera's FOV Angle. The values' range is between 0-180 degree. The default value is 60.compression_val : int = 500U3D quality 0..1000: U3D mesh's compression ratio. The values' range is between 0-1000 degree. The default value is 500.save_vertex_color : bool = FalseSave Vertex Color: Save Vertex Colorsave_face_color : bool = FalseSave Face Color: Save Face Colorsave_wedge_texcoord : bool = TrueSave Wedge TexCoord: Save Wedge TexCoord
-
wrl - Save WRL format.
Parameters:
file_name : str = 'file_name.WRL'File Name: The name of the file to savesave_vertex_color : bool = TrueSave Vertex Color: Save Vertex Colorsave_wedge_color : bool = TrueSave Wedge Color: Save Wedge Colorsave_wedge_texcoord : bool = TrueSave Wedge TexCoord: Save Wedge TexCoord
-
x3d - Save X3D format.
Parameters:
file_name : str = 'file_name.X3D'File Name: The name of the file to savesave_vertex_color : bool = TrueSave Vertex Color: Save Vertex Colorsave_vertex_coord : bool = TrueSave Vertex Coord: Save Vertex Coordsave_vertex_normal : bool = TrueSave Vertex Normal: Save Vertex Normalsave_face_color : bool = FalseSave Face Color: Save Face Colorsave_face_normal : bool = FalseSave Face Normal: Save Face Normalsave_wedge_color : bool = FalseSave Wedge Color: Save Wedge Colorsave_wedge_texcoord : bool = FalseSave Wedge TexCoord: Save Wedge TexCoordsave_wedge_normal : bool = FalseSave Wedge Normal: Save Wedge Normal
-
xyz - Save xyz format.
Parameters:
file_name : str = 'file_name.xyz'File Name: The name of the file to savesave_vertex_normal : bool = TrueSave Vertex Normal: Save Vertex Normal
load raster parameters¶
Here are listed all the raster file formats that can be loaded usingthe functions pmeshlab.MeshSet.load_new_raster().
-
BMP - Load BMP format.
Parameters:
file_name : str = 'file_name.BMP'File Name: The name of the file to load
-
JPEG - Load JPEG format.
Parameters:
file_name : str = 'file_name.JPEG'File Name: The name of the file to load
-
JPG - Load JPG format.
Parameters:
file_name : str = 'file_name.JPG'File Name: The name of the file to load
-
PNG - Load PNG format.
Parameters:
file_name : str = 'file_name.PNG'File Name: The name of the file to load
-
TGA - Load TGA format.
Parameters:
file_name : str = 'file_name.TGA'File Name: The name of the file to load
-
TIF - Load TIF format.
Parameters:
file_name : str = 'file_name.TIF'File Name: The name of the file to load
-
TIFF - Load TIFF format.
Parameters:
file_name : str = 'file_name.TIFF'File Name: The name of the file to load
-
XBM - Load XBM format.
Parameters:
file_name : str = 'file_name.XBM'File Name: The name of the file to load
-
XPM - Load XPM format.
Parameters:
file_name : str = 'file_name.XPM'File Name: The name of the file to load