This is a legacy documentation space! Please refer to V-Ray Next for Maya help for most up-to-date information.

This page contains information about exporting a mesh to a .vrmesh file format for later importing.


Page Contents



Before you can import a mesh through a proxy object, you need to save (export) the mesh file first. This can be done either from the Maya user interface, or through a MEL command.

Meshes are exported to a special .vrmesh file format. This file contains all geometric information for a mesh such as vertices and face topology as well as texture channels, face material IDs, smoothing groups, and normals. In short, everything that is needed to render the mesh is included in the file. In addition, the mesh is preprocessed and subdivided into chunks for easier access. The file also contains a simplified version of the mesh used for preview purposes in the viewports. More information about the .vrmesh file format is available in the V-Ray SDK documentation that comes with the V-Ray for Maya installation.

It is important to note that the mesh is in a "ready to render" format. No further modifications to the mesh are expected. You can't change the mesh, or animate it in any way other than animating the position/orientation of the proxy object. There is no way to recover the original mesh from a .vrmesh file (this can be done in principle, but is currently not supported). Therefore, if you plan on doing modifications to the mesh, you should keep it in a Maya file (which may be different from the file that gets rendered in the end).


Exporting a Mesh from the Maya UI

UI Path:

||Select object(s) to export|| > Create menu > V-Ray > Create proxy

||Select object(s) to export|| > V-Ray Shelf > Create VRay proxy



Path – The directory where the mesh file will be saved.

Export all selected objects in a single file – Takes all selected objects and merges them into one mesh file with the File name specified. This option also stores the transformations of the selected objects off the origin. When you import the file with a proxy object, it must be centered at the origin if you want the objects to be in the same positions relative to one another.

Export each selected object in a separate file – Creates a different file for each selected object. The name of each file is derived from the name of the corresponding Maya node. Unless the Include node transformation option is enabled, the transformation of an object is not included in its mesh file, and the corresponding proxy must have the same transformation as the original object if it is to appear in the same place. Note that you can use this option even with a single object, which will cause the object's pivot to be preserved in the exported  .vrmesh  file.

Include node transformation – This option is available only when exporting objects in separate files. It bakes the transformation of each object into the vertex positions in the resulting .vrmesh files.

File name – The name of the file, if you have selected the  Export all selected objects in a single file  option. The file will be saved in the  Path folder.

Overwrite existing vrmesh file – When enabled, V-Ray will automatically overwrite any existing vrmesh files.

Use last selected mesh as preview – When enabled, the last mesh that was selected using Shift + click will be used as a preview mesh for the proxy.

Export Animation – If the mesh is animated, enable this option to export the animation in the .vrmesh file. Note that when exporting each mesh to a separate file, only the vertex animation will be included in the file. Any animations that are part of the transformations of the original mesh will be left there.

Export velocity – Enabling this option will export velocity information for the moving objects. This makes it possible to add motion blur to the final animation. However, exporting this extra information takes longer. If you are not going to need motion blur it makes sense to disable this option.

Velocity interval start – Specifies the beginning of the range for which velocity information will be exported.

Velocity interval end  – Specifies the end of the range for which velocity information will be exported.

Use Playback Range – The range of frames in the current Maya playback range will be exported to the  .vrmesh  file.

Use Animation Range – The range of frames in the current Maya animation range will be exported to the .vrmesh  file.

Specify Range – Specifies exactly which frames are going to be exported by setting values for the Start Frame and End Frame parameters.

Faces in preview – Specifies how many faces are going to be used to show a preview of the proxy in the viewport.

Preview type – Chooses the method for generating the proxy preview:

Vertex Clustering (fast) – This method is fast and generates a fairly precise preview mesh.
Refined Clustering (quality)  – Slightly slower, but generates a more precise preview mesh.
Face Skipping (very fast)  – The method used in V-Ray versions prior to V-Ray for Maya 3.1. The fastest preview method.

Export vertex colors  – When this option is enabled, V-Ray will store information about the color sets of the exported mesh(es) into the  .vrmesh  file. Otherwise this information will be omitted in order to speed up the export process.

Ignore hidden and templated objects – Do not include geometry that is not visible or used for a template.

One voxel per mesh – Exports each separate mesh to a single voxel. This generally tends to make rendering faster if there is enough RAM, however it causes V-Ray to load the entire mesh at once, which might slow down the rendering if the dynamic memory limit is close to being reached. If you intend to use the V-Ray proxy as a geometry cache for characters or other relatively small objects, enabling this option will improve performance.

Faces per voxel – Specifies the maximum number of faces that a voxel can hold. Increase this value for meshes with a large number of faces.

Automatically create proxies – When enabled, proxy objects are created for the exported meshes. The proxies will have the correct transformations and materials derived from the original objects. If the  Export each selected object in a separate file  option is selected, the transformations of the original meshes will be used, otherwise a new transformation will be created and the original objects will be deleted.

New node name  – Specifies a name for the newly created proxy nodes when Automatically create proxies is enabled.
Make backup (experimental)  – When enabled, a .ma scene file will created in the same directory where the proxy is saved, containing a backup of the geometry objects that were exported to proxy.



Exporting a Mesh through MEL

The .vrmesh files and proxy objects can also be created through the vrayCreateProxy MEL command. The command operates on the current selection and has the following syntax, where curly braces {} denote a choice between several values separated by a pipe |, and options in brackets [] are optional:

vrayCreateProxy -exportType {1|2} -previewFaces $previewFaces -dir $path -fname $filename [-makeBackup] [-overwrite] [-vertexColorsOn] [-ignoreHiddenObjects] [-includeTransformation] [-oneVoxelPerMesh] [-facesPerVoxel $facesPerVoxel] [-createProxyNode -node $newNodeName] [-animOn -animType {0|1|2} -startFrame $startFrame -endFrame $endFrame] [-velocityOn -velocityIntervalStart $velocityIntervalStart -velocityIntervalEnd $velocityIntervalEnd] [-previewType $previewType]; 


The various options are described below:

Option Description

Specifies the type of export:

1 - export all selected objects in a single .vrmesh file.

2 - export each selected object in a separate .vrmesh file.

˗previewFacesSpecifies the number of faces in the viewport preview for the proxy object.
˗dirSpecifies the path where the .vrmesh file(s) will be created.
˗fnameSpecifies the file name when exporting to multiple .vrmesh files.
˗makeBackupCreate a backup .ma file containing just the exported objects.
˗overwriteIf specified, any existing .vrmesh files will be overwritten; otherwise, an error will be printed.
˗vertexColorsOnIf specified, vertex color sets are also exported.
˗ignoreHiddenObjectsIf specified, hidden objects are not exported.
˗createProxyNodeAfter successful export, replaces the original geometry with proxy nodes.
˗nodeThe name for the new proxy node when -createProxyNode is specified, and a single proxy is created.
˗animOnIf specified, animated .vrmesh files are created.

If -animOn is specified, this option determines the animation interval to export:

1 - playback range

2 - animation range

3 - explicit frame range specified with -startFrame and -endFrame

˗startFrameSpecifies the start animation frame when using explicit range.
˗endFrameSpecifies the end animation frame when using explicit range.

If specified, vertex velocity is also exported. This enables motion blur and smooth interpolation of the resulting animated proxies.
The time samples within a frame for computing the velocity are specified with the -velocityIntervalStart and -velocityIntervalEnd options.

˗velocityIntervalStartA value between 0.0 and 1.0 with the time position within a frame for the initial vertex positions.
˗velocityIntervalEndA value between 0.0 and 1.0 with the time position within a frame for the ending vertex positions.
-oneVoxelPerMeshIf specified, export each separate mesh to a single voxel.
-facesPerVoxelAn integer value that specifies the maximum number of faces that a voxel can hold.
-includeTransformationIf specified and exporting objects in separate files , bake the transformation of each object into the vertex positions in the resulting .vrmesh files.

The simplification method to use when generating a preview. Must be one of the following:





-pointSizeIf higher then 0.0, create a point cloud representation of the mesh. The specified value is used as a minimum size of the disk samples.