This documentation index as well as all files accompanying it is copyright (C) 2000-2011 by Chaos Group Ltd. All rights reserved. No part of the V-Ray SDK documentation can be reproduced without explicit permission from Chaos Group Ltd.
V-Ray and the V-Ray logo are registered trademarks of Chaos Software Ltd. in Bulgaria and other countries. Microsoft, Windows, Windows NT and Visual Studio are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Autodesk, 3D Studio, 3D Studio MAX, 3D Studio VIZ, 3ds Max and Discreet are either registered trademarks or trademarks of Autodesk, Inc./Autodesk Canada Inc. in the USA and/or other countries. Apple, Mac and Mac OS are trademarks of Apple Inc., registered in the U.S. and other countries. Linux is a registered trademark of Linus Torvalds in the U.S. and other countries. All other brand names, product names, or trademarks belong to their respective holders.
Compilation with the V-Ray SDK
V-Ray plugins supplied with the SDK
Please read the V-Ray SDK license agreement carefully. You can find the agreement here.
The V-Ray SDK includes the C++ header and library files necessary for using the V-Ray raytracing API. It allows:
The V-Ray SDK is currently supported on the following platforms. Note that depending on the specific distribution the binary files for some of the platforms may be missing.
The V-Ray SDK is organized in several folders; not all folders may be installed depending on which product you installed the V-Ray SDK with (e.g. if you installed the SDK with V-Ray for 3ds Max, only the files for the relevant 3ds Max version will be installed).
Binary files /bin The .dlls needed for compiling projects with the V-Ray SDK; this is also the default output folder for most of the SDK samples. The sub-folders correspond to binary files for different platforms and run-time library versions. Library files /lib The .lib files for compiling projects that use the V-Ray SDK. The sub-folders correspond to library files for different platforms and run-time library versions. Include files /include The header files you need to include in your projects. Documentation /docs The SDK documentation. Documentation of the V-Ray SDK classes. Samples /samples/3dsmax_plugins Samples of 3ds Max plugins that use the V-Ray SDK. /samples/maya_plugins Samples of Maya plugins that use the V-Ray SDK. /samples/vray_plugins Samples of plugins for use with the standalone version of V-Ray. /samples/vray_samples Samples of applications using the V-Ray SDK to implement renderers, as well as general usage of the V-Ray SDK. Temporary files /build Work folder for temporary files (for example .obj files) when building the SDK samples. Output folder for 3ds Max plugins /plugins Output folder for some of the 3ds Max samples.
V-Ray shading and lighting system
In order to use the V-Ray API you will need a valid V-Ray license and correct set up of the V-Ray license server (VRLServer). For 3ds Max plugins, this is automatically done by the V-Ray connection for 3ds Max. If you want to use the V-Ray DLL in a separate application, you will need to set the license manually:
1. Decide where you will run the V-Ray license server application. You can run it either locally on your machine, or on a machine somewhere in your LAN.
2. Run the file VRLServer.exe. If a valid license is not found, the license server will put up a message and will print a license request. Copy the license request in an email and send it to vray@chaosgroup.com.
3. We will send you a license key, which you need to copy to the approprite field in the VRLServer dialog.
4. Restart the V-Ray license server. If everything is ok, the VRLServer will show up as an icon in the Task Bar.
5. You need to have the V-Ray license server running whenever you want to use the V-Ray DLL. You can put a shortcut to this file in the Start menu > Programs > Startup folder so that it starts automatically.
5. On your local machine (where you will be using the V-Ray DLL), run the file setvrlserver.exe and pass the name or ip of the machine where you run the VRLServer. For example, if you have set up the VRLServer to run on your local machine, type at the command line:
> setvrlserver localhost
or
> setvrlserver 127.0.0.1
The V-Ray binary and library files are available in several modifications, depending on the target platform and run-time library version. Use the versions that correspond to the actual developer environment that you have. E.g. for applications built using the Microsoft Visual Studio 6 environment, use the .dll and .lib files from the \vc6 folders; if you use the Microsoft Visual Studio .NET 2002 environment, use the .dll and .lib from the \vc7 folders and so on.
Some of the V-Ray DLLs, libraries and executable files may be compiled with the Intel C++ compiler (version 7.1 or higher). If you use a different compiler, you may need to link manually to some of the libraries used by the Intel compiler (libmmd.lib, for example). Those libraries and the respective dlls are provided with the V-Ray SDK.
If you use Microsoft Visual Studio 6, you will also need the Microsoft Platform SDK. This is available for download from http://www.microsoft.com. The Platform SDK is part of Microsoft Visual Studio .NET, so if you have that, you don't need to download it.
In order to compile the samples for 3ds Max, you will need the 3ds Max SDK. You will also need to modify the example projects to reflect the location of the 3ds Max SDK include and library files.
Note: Most of the utility libraries (e.g. putils, vutils etc) for the projects follow a common naming convention based on their compilation options. Each .lib file may have one or more of the following suffixes, appended with an underscore ('_') character to the library name:
Suffix Meaning s The library is intended to be linked statically into the projects using it. If missing, the library is dynamically linked as a DLL. t The library is compiled against the static version of the run-time libraries. If missing, the library is compiled against the DLL verison of the run-time libraries. d The library is compiled against the debug version of the run-time libraries. If missing, the library is compiled against the release verison of the run-time libraries. Typically these libraries are also compiled without optimizations. r The library is compiled with run-time type information (RTTI). Libraries for Visual Studio 2005 and later are always compiled with RTTI.
For example, if a library is named vutils_s.lib, this means that it is intended to be included statically into the executables linked against it and is compiled against the release DLL version of the run-time libraries.
The sample files provided with the V-Ray SDK are typically relevant to the product with which the SDK is installed (e.g. V-Ray for 3ds Max includes sample plugins for V-Ray that work inside 3ds Max). Since the plugins may depend on other SDKs (e.g. the 3ds Max SDK), you will typically need to modify the supplied projects to use the correct include and library paths for those SDKs. Additional modification of the projects with respect to temporary build folders and output paths may also be required.
The projects are intentionally supplied as *.dsw/*.dsp files as those files can be opened with any of the newer Microsoft® Visual Studio® versions and can be used to generate .mak files for command-line building.
3ds Max plugin samples
The 3ds Max plugin samples are collected in one workspace, 3dsmax_plugins.dsw. They have several build configurations. The Official configurations build the final files as supplied with the official V-Ray builds. The Debug configurations are used for testing purposes only and it is not guaranteed that they compile at all, or that their compilation options are consistent.
Maya plugin samples
The Maya samples demonstrate how to use the SDK for the V-Ray for Maya translator. More information is available here.
V-Ray plugin samples
A large number of the V-Ray plugins supplied with the SDK (materials, lights, textures etc) have their source codes included with the SDK. The projects are compiled in one work-space, vray_plugins.dsw.The Release configurations build the files as supplied with the SDK. The Debug configurations are for testing purposes and it is not guaranteed that they compile at all, or that their compilation options are consistent.
Softimage bridge plugin samples
The Softimage samples demonstrate how to use the Bridge SDK for the V-Ray for Softimage translator. More information is available here.
V-Ray plugins supplied with the SDK
In addition to the V-Ray rendering engine itself, the SDK contains many V-Ray plugins that implement various rendering features (materials, textures, geometric objects, lights etc). Although it is not necessary to use these plugins, they make development for V-Ray a lot easier. It is strongly recommended to use these supplied plugins as much as possible.
The pre-compiled V-Ray plugins are located in the \plugins folder inside any of the \bin folders. Note that each module (.dll or .so) may contain more than one plugin. To see the full list of available plugins, use the plgparams.exe command which can be found in the \bin folders as well, in the same location as vray.exe. For example:
> plgparams -list
To see a short description of each plugin along with its parameters, type its name after the plgparams command, for example:
> plgparams BitmapBuffer
Parameters for plugin 'BitmapBuffer'
file: string = ""
filter_type: integer = 1, 0 - no filtering; 1 - mip-map filtering; 2 - summed area table filtering
filter_blur: float = 1
gamma: float = 1
maya_compatible: bool = false
frame_sequence: bool = false
frame_number: integer = 0
frame_offset: integer = 0
The command displays a short description of the plugin (if any), all its parameters with their default values and short descriptions (if any).