This page contains information about exporting a mesh to a .vrmesh file format for later importing.
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 the vrayCreateProxy command. For more information about the vrayCreateProxy command, refer to the Scripting and Programming page.
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).
||Select object(s) to export|| > Create menu > V-Ray > Create proxy
||Select object(s) to export|| > V-Ray Shelf > Create VRay proxy
Exporting a Mesh from the Maya UI
Path – The directory where the mesh file is 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 causes the object's pivot to be preserved in the exported .vrmesh file.
File name – The name of the file, if you have selected the Export all selected objects in a single file option. The file is saved in the Path folder.
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.
Overwrite existing vrmesh file – When enabled, V-Ray automatically overwrites any existing .vrmesh files.
Use last selected mesh as preview – When enabled, the last mesh that was selected using Shift + click is 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 is included in the file. Any animations that are part of the transformations of the original mesh are left there.
Export velocity – Enabling this option exports 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 is exported.
Velocity interval end – Specifies the end of the range for which velocity information is exported.
Use Playback Range – The range of frames in the current Maya playback range is exported to the .vrmesh file.
Use Animation Range – The range of frames in the current Maya animation range is 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.
Export Point Cloud – When enabled, adds a point cloud representation of the mesh separated into different levels of detail. The various levels of detail can be used by proxies for saving memory when rendering distant objects.
Lowest Level Point Size – Determines the size of point cloud disks at the most detailed level. If this value is small, point clouds rendered at the lowest level appear closer to original mesh but use more memory.
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 stores information about the color sets of the exported mesh(es) into the .vrmesh file. Otherwise this information is omitted in order to speed up the export process.
Ignore hidden and templated objects – Does 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 improves 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 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 are used, otherwise a new transformation is created and the original objects are 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 is created in the same directory where the proxy is saved, containing a backup of the geometry objects that were exported to proxy.