©BBB3viz

Table of Contents

This page provides information on the OBJ GEO PLY to .vrmesh converter.

Overview


Ply2vrmesh is a command-line utility that can be used to convert .ply, .obj, .geo, .bgeo, .hclassic, .bhclassic, .bin and .abc files to .vrmesh files for rendering by V-Ray through a VRayProxy

 

 

 

Installation


The ply2vrmesh converter can be opened from the following location:

Start Menu > Programs > V-Ray for 3ds Max > Tools > OBJ GEO PLY to .vrmesh converter for Windows 10 and earlier.

Start Menu > All apps > V-Ray for 3ds Max > OBJ GEO PLY to .vrmesh converter for Windows 11.

 

Start the ply2vrmesh executable from:

C:\Program Files\Chaos Group\V-Ray\3ds Max 20xx\bin for V-Ray for 3ds Max 2021 or earlier.

C:\ProgramData\Autodesk\ApplicationPlugins\VRay3dsMax202x\bin for 3ds Max 2022 or later.


 

Usage


Using the following command, converts the given .ply or .obj file and writes it to the given .vrmesh file. Note that you must specify the file extension; it is not added automatically.

> ply2vrmesh <inputFile> <outputFile> [options]


Arguments


inputFile – Specifies the .ply .obj .bin .geo (.hclassic) or .bgeo (.bhclassic) .abc .prt or .vrscene input file name. The string may include wildcards.

outputFile – Specifies .vrmesh file output name (extension must be specified). This string may not include wildcards. If this is not specified, then the output is a file with the same name but with the .vrmesh extension. If multiple input files are specified and <outputFile> is missing, then each input file will be written to a separate .vrmesh file. If multiple input files are specified and <outputFile> is also specified, all input files are sorted in lexical order and concatenated into one animated .vrmesh file.


Options


-verboseLevel – An integer value to determine the verbosity of the output. (0 - no output; 1 - errors only; 2 - errors and warnings; 3 - errors, warnings, and informational messages; 4 - all output). The default is 3.

-append – Appends the information as a new frame to the .vrmesh file.

-smoothNormals – Generates smooth vertex normals. Only valid for .obj and .geo files; always enabled for .bin files.

-smoothAngle – A floating point number that specifies the angle (in degrees) used to distinguish if the normals should be smoothed or not. If present, it automatically enables the -smoothNormals flag.

-flipNormals – Reverses the face/vertex normals. Only valid for .obj, .geo, .bin, and .abc files.

-flipVertexNormals – Reverses the vertex normals. Only valid for .obj, .geo, .bin and .abc files.

-flipFaceNormals – Reverses the face normals. Only valid for .obj, .geo, .bin, and .abc files.

-flipYZ – Swap y/z axes. Needed for some programs, i.e., Poser, ZBrush. Valid for .ply, .obj, .geo, and .bin files.

-flipYPosZ – Same as -flipYZ but does not reverse the sign of the z coordinate.

-flipXPosZ – Same as -flipYPosZ but swaps x/z axes.

-mapChannel <chanIndex> – Stores the UVW coordinates to the specified mapping channel (default is 1). Only valid for .obj and .geo files. When exporting a mesh that will be used in Maya, currently, this must be set to 0, or the textures on the mesh will not render properly.

-disableColorSetPacking – Only valid for .geo and .bgeo files; disables the packing of float1 and float2 attributes in vertex color sets.

-materialIDs – Only valid for .geo and .bgeo files; assigns material IDs based on the primitive groups in the file.

-materialIDs_splitGroups – Only valid for .geo and .bgeo files; assigns material IDs based on the primitive groups. These groups are split into different voxels/meshes and appear in visibility lists.

-sortMaterialIDs – Only valid for .geo and .bgeo files; sorts the list of material IDs by the group name. Otherwise, they are in the same order as they appear in the .geo/.bgeo file.

-fps <fpsValue> – A floating-point number that specifies the frames per second at which a .geo or .bin file is exported so that vertex velocities can be scaled accordingly. The default is 24.0.

-previewFaces <numFaces> – Specifies the maximum number of faces in the .vrmesh preview information. The default is 9973 faces.

-previewType <type> – Specifies the method used to generate a preview.

clustering – Works very fast but is less accurate.
edge_collapse – Slower, but produces the best results.
combined – Fast, produces slightly better results than clustering.
face_sampling – Copies triangles from the original (very fast, but leaves a disconnected mesh).

-facesPerVoxel <numFaces> – Specifies the maximum number of faces per voxel in the resulting .vrmesh file. The default is 10000 faces.

-previewHairs <numHairs> – Specifies the maximum number of hairs in the .vrmesh preview information. The default is 500 hairs.

-segmentsPerVoxel <numSegments> – Specifies maximum segments per voxel in the resulting .vrmesh file. The default is 64000 hairs.

-hairWidthMultiplier <multiplier> – Specifies the multiplier to scale hair widths in the resulting .vrmesh file. The default is 1.0.

-previewParticles <numParticles> – Specifies the maximum number of particles in the .vrmesh preview information. The default is 20000 particles.

-particlesPerVoxel <numParticles> – Specifies maximum particles per voxel in the resulting .vrmesh file. The default is 64000 particles.

-particleWidthMultiplier <multiplier> – Specifies the multiplier to scale particles in the resulting .vrmesh file. The default is 1.0.

-mergeVoxels – Merge objects before voxelization to reduce overlapping voxels

-velocityAttrName <name> – Specifies the name of the point attribute that should be used to generate the velocity channel. By default, the v attribute is used.

-pointSize – If specified, turns on point cloud generation and specifies the smallest size of the points. The default is 0.0 (point cloud generation is disabled).

-velocityOffset <offset> – Specifies that the starting position should be offset by a fraction of the velocity channel, e.g., -0.25. Only valid for .geo, .bgeo, and .bin files.

-mergeFiles – Merges all input files into one .vrmesh file.

Input files are specified using wildcard.
Output file (with .vrmesh extension) must be specified.

-mergeShaders – When merging files using -mergeFiles, this option merges all shaders with the same name into one shader. When merging .obj files, the first found .mtl file in the directory is parsed to get the ordering of the materials.

Alembic subdivision specific

-subdivideAllMeshes – Subdivides all alembic polygonal meshes, not only subdivision objects.

-subdivisionLevel – Alembic subdivision level.

-subdivideUVs <value> – Specifies the subdivision of the mapping channels. Value 0 to skip map channel subdivision and 1 to apply it.

-preserveGeomBorders – Skips the subdivision for all geometry borders.

-preserveMapBordersMode <mode> – Preserves map borders mode.

Mode "none" to subdivide all map borders.
Mode "internal" to preserve internal borders.
Mode "all" to preserve all map borders.

*.vrscene specific

-vrsceneList – Shows a list of available Nodes in the .vrscene file.

-vrsceneNodeName <name> – Node name inside the .vrscene file.

Must be specified!

-vrsceneApplyTm – Applies Node transform matrix to the mesh.

-vrsceneVelocity – Generates velocity channel (used for motion blur).

-vrsceneFrames start-end – Exports animation range.

-vrsceneWholeSceneGenerates a proxy for all vrscene's geometric objects.

Generic

-info – Shows information about the specified .vrmesh file.

-perObject – Prints additional information for each object in the file. Requires the -info flag.

-frame <frameIndex> – Exports a particular frame from the specified file. Combined with -info option, it shows information about the specified frame from the .vrmesh file. Indices are 0-based. If this option is not specified, information is printed for each frame in the file.

-oneFramePerFile – Exports each frame in a separate file.

-padding <padding> – Frame padding number between 1 and 10. Default is 4.

These options can also be viewed from the command prompt by running the ply2vrmesh program without any parameters to see the description of these options.

Notes


  • The converter works with most of the popular .ply formats, both ASCII and binary, big-endian, or little-endian.
  • In addition to the geometric data (faces and vertices), the converter recognizes some of the most common additional channels such as diffuse surface color. Vertex colors are recognized if they are specified as "red", "green", and "blue" or "diffuse_red", "diffuse_green", and "diffuse_blue" vertex properties.
  • Surface colors can be visualized by applying a Vertex Color texture in the diffuse slot of the corresponding V-Ray Proxy object(s).
Was this helpful?