Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The V-Ray SDK is installed with the "Workstation" installation type and is normally installed in the folder "C:\Program Files\Chaos Group\V-Ray\3ds Max NNNN" where NNNN is the version of 3ds Max (20142020, 20132021, etc.).


Folder Structure

...

The V-Ray SDK includes the following folders:

...

\samples – Includes the source code for some of the plugins that ship with V-Ray (e.g. the VRayDomeCamera plugin), as well as some additional samples (e.g. VRayBlinnMtl)


Compiling the Samples

...

The sample projects come with a CMake project that can be used to generate Microsoft Visual Studio 2017 solutions or Ninja projects.

A matching 3ds Max SDK is needed to build the example projects. The setup needs the CMake variable 3DSMAX_SDK_ROOT set to point to the 3ds Max SDK root.

UI Text Box
typeinfo

V-Ray solutions have some options that are conditionally defined in few stages of the CMake configuration process. Because of this when using the CMake GUI one may have perform the configure step few times so all the options are set-up.

To get started with the samples for 3ds Max 2022:

  1. Open command prompt in the samples directory, e.g. C:\Program Files\Chaos Group\V-Ray\3ds Max 2022\samples
  2. Execute CMake, e.g. cmake -B"C:\build\VRay3dsMax2022Samples" -H"." -G"Visual Studio 15 2017" -A"x64" -T"v141" -D"3DSMAX_SDK_ROOT=D:\conan\pack\Max2022SDK"

If no errors occurred, the solutions should be in the output directory specified by "-B".

 

Expand
titleIf you are using V-Ray Next and older versions of 3ds Max, click here to see how to compile samples.

The project files for the samples are in .dsp file format and

...

need to be converted for newer versions of

...

Visual Studio

...

.

To build the samples for 3ds Max 2013 and later, follow these steps

...

:

  1. Open the respective Visual Studio version that you need for the particular 3ds Max version (Visual Studio 2010 for 3ds Max 2013 and 3ds Max 2014, Visual Studio 2012 for 3ds Max 2015);
  2. Click File > Open > Project/solution... and select the .dsp file for the project that you want to compile;
  3. Visual Studio

...

  1. asks whether you want to upgrade the project; click OK and let Visual Studio do the conversion;
  2. Right-click on the project in the Solution Explorer and select Properties;
  3. Click

...

  1. the

...

  1. Configuration Manager...

...

  1. button;
  2. Click

...

  1. the

...

  1. Active solution configuration

...

  1. drop-down and select <New...>;
  2. Type a name for the new configuration, i.e. "max 2013 release";
  3. Set the

...

  1. Copy settings from

...

  1. drop-down to the

...

  1. Max Release Official

...

  1. configuration

...

  1. ;

    UI Text Box
    typenote

    It is important to base the new configuration on the

...

  1. Max Release Official

...

  1. one; other configurations

...

  1. do not compile properly.

  2. Make sure the check-box

...

  1. Create new project configurations

...

  1. is enabled;

  2. Click OK to create the new configuration

...

  1. ;
  2. Click on the

...

  1. Active solution platform

...

  1. drop-down and select <New...>;
  2. Select the

...

  1. x64

...

  1. platform;
  2. In the

...

  1. Copy settings from

...

  1. drop-down, select

...

  1. Win32

...

  1. ;
  2. Make sure that

...

  1. Create new project platforms

...

  1. option is selected;
  2. Click OK to add the new platform;
  3. In the

...

  1. General

...

  1. section of the configuration properties, set the

...

  1. Character Set

...

  1. property to

...

  1. Use Unicode Character Set

...

  1. (for 3ds Max 2012 and earlier, leave this to

...

  1. Use Multi-Byte Character Set

...

  1. );
  2. In the C/C++ section of the configuration, in the

...

  1. Addition Include Directories

...

  1. property, replace the occurrences of k:\3dsmax\maxsdk2013 with the path to your installation of the 3ds Max SDK

...

  1. ;
  2. In the Linker section of the configuration, in the

...

  1. Additional Library Directories

...

  1. property, replace k:\3dsmax\max2014\Lib\x64 with the path to the library files from your installation of the 3ds Max SDK.

You should now be able to build the project successfully.