Square Enix © Goodbye Kansas

Table of Contents

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

Overview



Before you can import a mesh through a proxy object, you need to save (export) the mesh to file first. This can be done either from the Maya user interface, or through the vrayCreateProxy 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 with some limitations). 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).


UI Path: ||Select object(s) to export|| > V-Ray Shelf > Create V-Ray Proxy


||Select object(s) to export|| > Create menuV-Ray > Create V-Ray Proxy



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





Exporting a Mesh from Maya


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 load the file in a V-Ray 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 separate 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.

 You can use the Export each selected object in a separate file option even with a single object to preserve the object's pivot 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.

Export full node path names –Enables storing of the full scene path of the object(s) when writing the .vrmesh file. This is useful to display the proxy hierarchy when loaded in Maya as VRayProxy.

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 – When enabled, exports velocity information for the moving objects. This allows rendering motion blur in 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. This is the fastest method, but produces the least accurate preview mesh.

Export vertex colors  – When enabled, V-Ray stores information about the color sets of the exported mesh(es) into the .vrmesh  file. Otherwise this information is skipped to speed up the export.

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

Optimize For Instancing – 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 scatter many instances of the V-Ray Proxy in your scene, then it is recommended to enable the Optimize For Instancing option to improve performance.

Faces per voxel – Specifies the maximum number of faces that a voxel can hold when Optimize For Instancing is disabled for export. Increase this value for meshes with a large number of faces. This option is controlled using a slider but it also allows users to enter a custom value into the field. Lowering that value below 1000 faces per voxel is not recommended, as that causes an excessive use of RAM. The Script Editor displays an error when exporting to warn users of this.

Automatically create proxies – When enabled, proxy objects are created with the exported meshes automatically loaded. 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.

Use the new VRayProxy node – When enabled, uses the new VRayProxy node.

New node name  – Specifies a Maya node name for the newly created proxy nodes when Automatically create proxies is enabled.

Make backup – 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.


Was this helpful?