In brief
- The SDK can be used to create V-Ray scenes or load them from .vrscene files.
- Rendering starts in the background on a separate thread when you call start().
- Interactive mode is intended for previews and testing settings; Production mode is for producing the final image.
- The documentation does not specify a particular software version for the SDK implementation.
V-Ray Application SDK (App SDK) lets third-party applications start and control the V-Ray engine. Chaos’s App SDK documentation covers converting a scene in memory into V-Ray plugins or loading it from a .vrscene file, starting a render and retrieving the result as an image. This guide walks through the SDK’s basic workflow for teams developing render integrations for architecture and visualization tools. The documentation does not specify a particular V-Ray or App SDK version, so these steps apply to the documented App SDK interface.
1. Prepare the SDK runtime environment
The core component of App SDK is the VRayRenderer class. It brings together tasks such as loading a scene, starting a render and accessing the image. Before you begin, the application must be able to locate the library files.
Set the
VRAY_SDKenvironment variable to specify the SDK location. If you’re using the Python binding, the SDK’spythonfolder must be included in Python’s module search paths; the documentation givesPYTHONPATHas an example.The documentation shows the
setenv.batscript for Windows and thesource setenv.shcommand for Linux and macOS. These scripts set both environment variables.When
VRAY_SDKis defined, the binding looks for the VRaySDKLibrary binary and its dependencies inVRAY_SDK/bin. If the product’s folder structure does not include/bin, you can use theVRAY_APPSDK_BINvariable instead; in that case, binaries are searched for in the specified folder.If environment variables are not available in your setup, you can set the library search path at runtime. The documentation gives
vray.setSDKLibraryPath(bin_folder)for Python and theVRayInitconstructor for C++ as examples.
This preparation is particularly important for integrations embedded in another piece of software or running independently: before rendering starts, the SDK binding must be able to find the V-Ray libraries and required dependencies. Consult the documentation for the relevant language binding for details on its initialization method.
2. Load a scene and render
The basic workflow consists of creating a VRayRenderer, preparing a scene or loading one from a file, starting the render, retrieving the image and releasing resources. A scene can be built in memory by setting V-Ray plugin parameters, or loaded from a .vrscene file. The example below shows how to load a file and save a PNG using Python:
import vray
with vray.VRayRenderer() as renderer:
renderer.load('./intro.vrscene')
renderer.start()
renderer.waitForRenderEnd(6000)
image = renderer.getImage()
image.save('intro.png')start() runs asynchronously: the V-Ray engine continues rendering on a separate thread, so the main application flow is not entirely tied up by the render. getImage() can retrieve the current image data not only after processing is complete, but also while the render is in progress. This lets the application display an intermediate image or save it to a file using one of the supported compression formats. The documentation uses waitForRenderEnd() to wait for the render to finish; the unit of the parameter in the examples is not explained in the source, so no time unit should be assumed here.
When the application is done, the renderer should be closed and its allocated memory resources released. The Python context manager example handles the renderer’s lifecycle; for other language bindings, use the corresponding close operation in the relevant API.
3. Choose a mode for previews or final renders
App SDK offers two primary render modes. Interactive is designed for quickly previewing an image and seeing progress while testing content or scene settings. Production is for producing the intended final image after the scene has been carefully configured; it can take longer for the full image to be ready.
| Setting | Recommended value | Effect |
|---|---|---|
| Render mode | Interactive for previews and testing | Provides fast feedback as image quality improves progressively. |
| Render mode | Production for the final image | Produces the final image from a configured scene. |
| Render type | CPU or GPU | The CPU option uses processor resources; the GPU option uses the graphics card’s computing power. |
The documentation describes Interactive (CPU) as the default for the VRayRenderer class. For GPU rendering, CUDA and OptiX are listed for NVIDIA, while Metal and MetalRT are listed for Apple. This does not mean every render type is available on every computer: check whether the workstation and SDK installation support the selected option.
You can set the mode through the renderMode property of the VRayRenderer object. According to the documentation, you do not need to recreate or reload the scene to change modes between renders. This makes it possible to work in Interactive during design and switch to Production for the final stage within the same integration workflow.
4. Integrate status and error monitoring
The SDK emits events while rendering runs in the background. A status-change event can notify the application of transitions such as a render starting, finishing or stopping because of an error. The final image is ready when the status is IDLE_DONE; intermediate images can also be retrieved while processing continues.
The log-message event provides text and a severity level. The documentation lists the levels as info, warning, error and debug. The application can forward these messages to its own diagnostics workflow to make issues during scene loading and rendering visible.
Event callbacks run on a separate thread from the render thread. This design aims to prevent a slow callback from affecting render time, but slow user callbacks can delay other callbacks. Also, after the asynchronous start(), do not make changes to the scene or renderer until the renderer leaves the PREPARING state; the documentation notes that changes made during this period will be rejected.
What changes in architecture and archviz workflows?
App SDK is useful not so much for a specific menu setting in a modeling interface as for connecting V-Ray to another application’s workflow. For example, a team could bring together loading a .vrscene, starting a render, retrieving a progress image and saving the result in its own scene-preparation tool. The benefit is being able to control the render engine from within the application and run both previews and final renders through the same renderer.
Offices should first verify the language binding they use, the location of the V-Ray libraries and the CPU/GPU option available on the target machine. The sources do not explain licensing terms, pricing, compatibility with a specific host application or hardware requirements; no assumptions should be made about these. Monitoring scene status and logs helps build a more robust integration than simply offering users a render button.
Common mistakes
Starting the SDK binding without setting
VRAY_SDKor, when using Python, the module path. If a library or Python module cannot be found, first check the environment variables and folder paths.Treating the
start()call as a synchronous operation and assuming the render finishes immediately. It runs in the background, so the application needs to monitor the completion status.Changing the scene or renderer during the
PREPARINGstage. Use the status-change event to defer edits until a safe stage.Running long operations inside a callback. The documentation notes that this can delay other callbacks; handle heavy work separately from the event handler.
Sources
1 sourceSource texts are not republished; short quotes are marked, everything else is our own summary and commentary.
For architecture and visualization offices in Turkey, App SDK’s main value is its potential to connect repetitive rendering steps to their own tools. Separating the preview and final-image workflows in particular can help teams structure their processes more deliberately.
However, the SDK does not directly guarantee faster rendering. Before developing an integration, verify licensing and cost terms, compatibility with the software in use, and the CPU/GPU options available on the target machine. Environment variable errors, overlooking the asynchronous workflow and running long tasks in callbacks are also points to watch.
Frequently asked questions
What is V-Ray App SDK used for?
It is used to start and control the V-Ray rendering process from third-party applications. A scene can be created in memory or loaded from a `.vrscene` file.
What is the difference between Interactive and Production modes in V-Ray App SDK?
Interactive is designed for quick previews and feedback while testing scene settings; Production is for producing the final image from a configured scene.
What is the default render mode in V-Ray App SDK?
The documentation specifies Interactive (CPU) as the default mode for the VRayRenderer class.



