VRay SDK for C#
|
This class controls the native V-Ray renderer and manages scene contents. More...
Inherits IDisposable.
Classes | |
class | ProfilerMethods |
Public Types | |
enum | AddHostsResult |
Result of AddHosts method | |
enum | DefaultsPreset |
Global settings presets used with VRayRenderer.SetImprovedDefaultSettings(). | |
enum | RendererState |
Enumeration used by the StateChanged event and returned by VRayRenderer.GetState() for the current asynchronous renderer state. Use the static helpers IsInactiveState and IsActiveState to check for multiple values. | |
enum | WaitTime |
Used with waitForRenderEnd() | |
Public Member Functions | |
VRayRenderer () | |
Creates a new VRayRenderer using the default rendering options. The default render mode is Interactive. | |
VRayRenderer (IntPtr instanceHandle) | |
Creates a new shared VRayRenderer from an instance handle. This allows sharing a VRayRenderer instance among different programming languages and/or shared libraries in the same process. Use with extreme caution! Do not use unless you know exactly what you're doing! More... | |
VRayRenderer (RendererOptions rendererOptions) | |
Creates a new VRayRenderer using the specified options. The default render mode is Interactive. More... | |
void | Abort () |
Flags to stops the current rendering without waiting for the render thread to finish. | |
AddHostsResult | AddHosts (string hosts) |
Adds hosts to the renderer for distributed rendering. More... | |
bool | AddVRayProfilerMetadata (string category, string key, string value) |
Add a key-value pair to VRay Profiler metadata under a specific category (key). Should be called as early as possible before SetVRayProfiler, otherwise it will have no effect. More... | |
void | Append (FileInfo sceneFile, bool drSendNameOnly=false) |
Appends a V-Ray scene from a .vrscene file. More... | |
void | Append (params FileInfo[] sceneFiles) |
Appends the specified scene files data to the currently loaded scene without wiping it. This treats all files as one. More... | |
void | Append (params string[] sceneFileNames) |
Appends the specified scene files data to the currently loaded scene without wiping it. This treats all files as one. More... | |
void | Append (string sceneFileName, bool drSendNameOnly=false) |
Appends a V-Ray scene from a .vrscene file. More... | |
void | AppendAsText (params string[] sceneTexts) |
Appends V-Ray scenes from text data array in the format of a .vrscene files. More... | |
void | AppendAsText (string sceneText) |
Appends a V-Ray scene from text data in the format of a .vrscene file. More... | |
void | AppendAsTextFiltered (OnPluginFilter onPluginFilter, params string[] sceneTexts) |
Appends a V-Ray scene from text data in the format of a .vrscene file using a plugin filtering callback. More... | |
void | AppendAsTextFiltered (string sceneText, OnPluginFilter onPluginFilter) |
Appends a V-Ray scene from text data in the format of a .vrscene file using a plugin filtering callback. More... | |
void | AppendAsTextFiltered (string[] sceneTexts, OnPluginFilter onPluginFilter) |
Appends a V-Ray scene from text data in the format of a .vrscene file using a plugin filtering callback. More... | |
void | AppendFiltered (FileInfo sceneFile, OnPluginFilter onPluginFilter) |
Appends a V-Ray scene from a .vrscene file using a plugin filtering callback. More... | |
void | AppendFiltered (FileInfo[] sceneFiles, OnPluginFilter onPluginFilter) |
Appends V-Ray scenes from a .vrscene files array using a plugin filtering callback. This treats all files as one. More... | |
void | AppendFiltered (OnPluginFilter onPluginFilter, params FileInfo[] sceneFiles) |
Appends V-Ray scenes from a .vrscene files array using a plugin filtering callback. This treats all files as one. More... | |
void | AppendFiltered (OnPluginFilter onPluginFilter, params string[] sceneFileNames) |
Appends a V-Ray scene from a .vrscene file array using a plugin filtering callback. This treats all files as one. More... | |
void | AppendFiltered (string sceneFileName, OnPluginFilter onPluginFilter) |
Appends a V-Ray scene from a .vrscene file using a plugin filtering callback. More... | |
void | AppendFiltered (string[] sceneFileNames, OnPluginFilter onPluginFilter) |
Appends a V-Ray scene from a .vrscene file array using a plugin filtering callback. This treats all files as one. More... | |
void | BucketRenderNearest (int x, int y) |
In Production mode the method provides the coordinates for a nearby bucket to be rendered. If the selected bucket has already been rendered, a closest bucket will be picked with a minimum distance to the specified coordinates. The coordinates must be within the dimensions of the currently rendered image, otherwise the method has no effect. The method has also no effect in progressive modes. More... | |
bool | ClearAllPropertyValuesUpToTime (double time) |
Removes all keyframe values of animated properties up to the given time. More... | |
void | ClearLastError () |
Clear the last error. | |
bool | ClearPropertyValuesUpToTime (double time, PluginCategories categories) |
Removes all keyframe values of animated properties up to the given time only from plugins of the given categories. More... | |
bool | ClearScene () |
Stops any ongoing rendering and clears the scene contents. | |
long | Commit () |
Commits any accumulated scene changes. This is necessary if the AutoCommit flag is set to false. More... | |
void | ContinueSequence () |
Starts the rendering of an animation sequence in a separate thread using the default animation sequence from the vrscene file. | |
bool | DeletePlugin (Plugin plugin) |
Delete the plugin from the scene and remove any references to it from other plugins. More... | |
bool | DeletePlugin (string pluginName) |
Delete the plugin from the scene and remove any references to it from other plugins. More... | |
bool | DeletePlugins (IEnumerable< Plugin > plugins) |
Delete multiple plugins from the scene and remove any references to them from other plugins. More... | |
bool | DeletePlugins (IEnumerable< string > pluginNames) |
Delete multiple plugins from the scene and remove any references to them from other plugins. More... | |
bool | DenoiseNow (OnManualDenoiseFinished userCallback=null, bool shouldPassImage=true) |
Explicitly starts the denoiser. Requires a RenderChannelDenoiser instance in the scene. This can be run while rendering is ongoing or when it's paused or after it is stopped. Denoising parameters are taken from the RenderChannelDenoiser plugin. The denoising is run asynchronously, so this function will return as soon as the thread is started. When denoising is done the PostEffectsUpdated callback will be called. More... | |
void | DisableDRClient () |
Toggles off the current VRayRenderer to act as a DR2 client. More... | |
void | Dispose () |
Releases internal resources held by the current renderer. The renderer becomes unusable after calling Dispose(). | |
void | EnableDRClient (EnableDRClientParams enableParams) |
Toggles on the current VRayRenderer to act as a DR2 client. More... | |
void | EnableLiveLinkClient (EnableLiveLinkClientParams enableParams) |
Toggles on the current VRayRenderer to act as a DR2 LiveLink client. More... | |
bool | Export (FileInfo file) |
Exports the currently loaded scene to the specified text file. The export serializes all plugins in text format. More... | |
bool | Export (string filePath, ExportSettings settings=null) |
Exports the currently loaded scene to the specified text file. The export serializes all plugins in text format. More... | |
string | ExportToBuffer (ExportSettings settings=null) |
Exports and return the currently loaded scene as a string instance. The export serializes all plugins in text format. More... | |
AutoExposureResult | GetAutoExposureResult () |
Gets the auto-exposure and auto-white balance values computed during the last light cache calculation. More... | |
Plugin | GetCamera () |
Returns the current camera. More... | |
T | GetCamera< T > () |
Returns the current camera. More... | |
long | GetChangeIndex () |
Returns the last change index for interactive changes on the renderer instance. More... | |
ComputeDeviceInfo[] | GetComputeDevicesCUDA () |
Returns a list of all devices available for use by the CUDA engine. The "CUDA CPU" device uses the CUDA engine code compiled for the x86-64 architecture. It is not the CPU V-Ray engine. It is disabled by default but you can enable it for faster "hybrid" rendering. More... | |
ComputeDeviceInfo[] | GetComputeDevicesCurrentEngine () |
Returns a list of all devices available for use by the current engine (Optix, CUDA, Metal). More... | |
ComputeDeviceInfo[] | GetComputeDevicesDenoiser () |
Returns a list of all devices available for denoising. More... | |
ComputeDeviceInfo[] | GetComputeDevicesMetal () |
Returns a list of all devices available for use by the Metal engine. macOS only. More... | |
ComputeDeviceInfo[] | GetComputeDevicesOptix () |
Returns a list of all devices available for use by the Optix engine. Compute capability >= 5.2 is required to use Optix. All unsupported devices will be ignored. More... | |
CropRegion | GetCropRegion () |
Gets the virtual crop region (RgnLeft, RgnTop, RgnWidth, RgnHeight) within a virtual source image space with sizes SrcWidth, SrcHeight. More... | |
bool | GetDREnabled () |
Return whether distributed rendering is currently enabled or not. More... | |
VRayImage | GetImage (GetImageOptions options=null) |
Gets the latest rendered image. This can return intermediate results while rendering. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions. More... | |
bool | GetImageSize (out int width, out int height) |
Gets the rendering width and height. (There're also properties Width and Height.) More... | |
Plugin | GetInstanceOf (string pluginClassName) |
Returns the latest instance of a given plugin type if any exist. Should be used for singleton plugins. Most settings plugins are singletons. More... | |
T | GetInstanceOf< T > () |
Returns the latest instance of a given plugin type if any exist. Should be used for singleton plugins. Most settings plugins are singletons. More... | |
Plugin | GetInstanceOrCreate (string pluginClassName, string pluginName=null) |
Returns an existing instance (the last one) of a given plugin type or creates a new instance otherwise, using the given instance name. Should be used for singleton plugins. Settings plugins are singletons. More... | |
T | GetInstanceOrCreate< T > (string pluginName=null) |
Returns an existing instance (the last one) of a given plugin type or creates a new instance otherwise, using the given instance name. Should be used for singleton plugins. Settings plugins are singletons. More... | |
InteractiveStatistics | GetInteractiveStatistics () |
Plugin | GetOrCreatePlugin (string pluginClassName, string pluginName) |
Returns an existing plugin instance with the given instance name and of the given type. A new instance is created if one does not exist with the given name. This behaves like getInstanceOrCreate if no instance name is given (empty/null), i.e. returns any instance of this type as long as one exists. For singleton plugins like the settings plugins use getInstanceOrCreate() to avoid inadvertently creating more than one instance. More... | |
T | GetOrCreatePlugin< T > (string pluginName) |
Returns an existing plugin instance with the given instance name and of the given type. A new instance is created if one does not exist with the given name. This behaves like getInstanceOrCreate if no instance name is given (empty/null), i.e. returns any instance of this type as long as one exists. For singleton plugins like the settings plugins use getInstanceOrCreate() to avoid inadvertently creating more than one instance. More... | |
Plugin | GetPlugin (string pluginName) |
Searches the current scene for the plugin with the specified name. More... | |
T | GetPlugin< T > (string pluginName) |
Searches the current scene for the plugin with the specified name. More... | |
PluginMeta | GetPluginMeta (string pluginClassName) |
Gets the meta info for the plugin of the given type. More... | |
Plugin[] | GetPlugins () |
Returns an array with all Plugin instances contained in the scene. More... | |
Plugin[] | GetPlugins (string pluginClassName) |
Returns an array with Plugin instances of the specified type. More... | |
T[] | GetPlugins< T > () |
Returns an array with Plugin instances of the specified type. More... | |
Plugin[] | GetPluginsOfCategories (IEnumerable< PluginCategories > categories) |
Returns an array of all plugin instances that belong to all passed categories in categories[0] or all in categories[1], etc. More... | |
Plugin[] | GetPluginsOfCategories (PluginCategories categories) |
Returns an array of Plugin instances that belong to all passed categories. More... | |
string[] | GetPluginTypesOfCategory (PluginCategory category) |
Returns the class names of all available V-Ray plugin classes loaded from dynamic libraries which belong to the specified category. More... | |
RenderRegion | GetRenderRegion () |
Gets the rendering region within the image Width and Height. Width and Height are the rendering sizes set but other methods or constructors, etc. More... | |
RenderSizeParams | GetRenderSizes () |
Gets the frame buffer width and height, the rendering region and the crop region. More... | |
RenderSizeParams | GetRenderSizes (out bool regionButtonState) |
Gets the frame buffer width and height, the rendering region and the crop region. More... | |
RendererState | GetState () |
Returns the current state of the renderer. The state could change asynchronously as rendering occurs in another thread. More... | |
bool | GetVFBContextMenuItemValue (int commandID, out int value) |
Get the value from a VFB context menu checkbox item More... | |
bool | IsDRClientEnabled () |
Returns whether the current VRayRenderer acts as a DR2 client or not. More... | |
bool | IsRenderingInHalfResolution () |
True if V-Ray is rendering internally half resolution (the images/data returned are upsampled to full resolution). False if V-Ray is rendering in full resolution. | |
void | Load (FileInfo sceneFile) |
Loads a V-Ray scene from a .vrscene file. More... | |
void | Load (string sceneFileName) |
Loads a V-Ray scene from a .vrscene file. More... | |
void | LoadAsText (string sceneText) |
Loads a V-Ray scene from text data in the format of a .vrscene file. More... | |
void | LoadAsTextFiltered (string sceneText, OnPluginFilter onPluginFilter) |
Loads a V-Ray scene from text data in the format of a .vrscene file using a plugin filtering callback. More... | |
void | LoadFiltered (FileInfo sceneFile, OnPluginFilter onPluginFilter) |
Loads a V-Ray scene from a .vrscene file using a plugin filtering callback. More... | |
void | LoadFiltered (string sceneFileName, OnPluginFilter onPluginFilter) |
Loads a V-Ray scene from a .vrscene file using a plugin filtering callback. More... | |
void | LockScene () |
Locks the scene for writing and reading. This will block until rendering stops and will not resume until unlockScene is called. This method is usefull when there are a batch of changes to be made while interactive rendering is running. Locking scene before all changes and then unlocking after finished updating, may increase performance significantly when there are many changes. | |
Plugin | NewPlugin (string pluginClassName, string pluginName=null) |
Creates an instance of a Plugin class with the specified name and of the given type. More... | |
T | NewPlugin< T > (string pluginName=null) |
Creates an instance of a Plugin class with the specified name and of the given type. More... | |
delegate void | OnManualDenoiseFinished (VRayImage image) |
delegate string | OnPluginFilter (string type, string name) |
A user callback which is called for each plugin instance read from a .vrscene-file. The user should return the desired new plugin name or null to skip creating the plugin. More... | |
void | Pause () |
Pauses Interactive rendering. | |
Plugin | PickPlugin (int x, int y, int timeout=-1) |
Returns the first scene Node object intersected at the given pixel. More... | |
PickedPluginInfo[] | PickPlugins (double x, double y, int maxcount=0, int timeout=-1) |
Returns the scene Node objects intersected at the given pixel. More... | |
bool | RemoveHosts (string hosts) |
Removes hosts to the renderer for distributed rendering. More... | |
void | RenderSequence () |
Starts the rendering of an animation sequence in a separate thread using the default animation sequence from the vrscene file. | |
void | RenderSequence (SubSequenceDesc[] ss) |
Starts the rendering of an animation sequence in a separate thread using the frames sequence described by SubSequenceDesc[] array. | |
bool | ReplacePlugin (Plugin oldPlugin, Plugin newPlugin) |
Replaces all references (in the scene) of oldPlugin with newPlugin. More... | |
bool | ResetHosts (string hosts=null) |
Resets the renderer host list used for distributed rendering. Removes all if null is passed. More... | |
void | Resume () |
Resumes Interactive rendering. | |
bool | SaveCausticsFile (string fileName) |
Saves the caustics to a file. More... | |
bool | SaveIrradianceMapFile (string fileName) |
Saves the irradiance map to a file. More... | |
bool | SaveLightCacheFile (string fileName) |
Saves the light cache to a file. More... | |
bool | SavePhotonMapFile (string fileName) |
Saves the photon map to a file. More... | |
bool | SerializeScene () |
Serializes the whole scene (plugins with their property values) contained in the renderer into a single memory stream no matter if they originate from a loaded or appended vrscene file or are created by code. The whole stream will be always transferred when DR hosts are connected. No DR hosts should have been connected before serialization. (Currently only one type of serialization is supported but other types may be added in the future.) This method is here mainly for debug purposes but it can be helpful in some other cases as well. Do not use it unless you know exactly what you're doing. | |
bool | SetBitmapCache (bool onOff) |
Enable or disable bitmap caching between renders. If enabled, bitmap textures will be stored in memory and won't be unloaded / loaded again on the next render. This may save a lot of time loading heavy textures before every render. More... | |
bool | SetCamera (Plugin plugin) |
Sets the current camera. More... | |
bool | SetComputeDevicesCUDA (IList< int > indices) |
Set which devices to use for rendering with the CUDA engine. More... | |
bool | SetComputeDevicesCurrentEngine (IList< int > indices) |
Set which devices to use for rendering with the current engine (Optix, CUDA, Metal). More... | |
bool | SetComputeDevicesDenoiser (IList< int > indices) |
Set which devices to use for denoising, when GPU denoiser is selected. More... | |
bool | SetComputeDevicesEnvironmentVariable () |
Set the user environment to the currently selected devices for each engine. Note that this will affect other V-Ray products as well. More... | |
bool | SetComputeDevicesMetal (IList< int > indices) |
Set which devices to use for rendering with the Metal engine. macOS only. More... | |
bool | SetComputeDevicesOptix (IList< int > indices) |
Set which devices to use for rendering with the Optix engine. Optix requires compute capability >= 5.2. All unsupported devices will be ignored. More... | |
bool | SetCropRegion (CropRegion cropRegion) |
Sets a virtual crop region (RgnLeft, RgnTop, RgnWidth, RgnHeight) within a virtual source image space with sizes SrcWidth, SrcHeight. The output image pixel width and height do not change. More... | |
bool | SetCropRegion (int SrcWidth, int SrcHeight, float RgnLeft, float RgnTop) |
Sets a virtual crop region (RgnLeft, RgnTop, Width, Height) within a virtual source image space with size SrcWidth, SrcHeight. This (creates if necessary and) changes SettingsOutput in the scene. The region is reset after clearing the scene or loading another scene file. More... | |
void | SetDebugShadingSelection (IEnumerable< Plugin > plugins) |
Selection for Debug Shading Isolate Selected mode. More... | |
bool | SetDREnabled (bool drEnabled, bool withBroadcastListener=true) |
Toggles distributed rendering on or off. This can only be done when the renderer is idle. When this is disabled (default) it saves some memory. When it is enabled remote render machines added with addHosts() will be connected and contribute to the render. More... | |
bool | SetImageSize (int width, int height) |
Sets a new rendering width and height at once. Crop and renderer region are reset. This (creates if necessary and) changes SettingsOutput in the scene. The size is reset after clearing the scene or loading another scene file. More... | |
bool | SetImageSize (int width, int height, bool resetCropRegion, bool resetRenderRegion) |
Sets a new rendering width and height at once. This (creates if necessary and) changes SettingsOutput in the scene. The size is reset after clearing the scene or loading another scene file. More... | |
bool | SetImprovedDefaultSettings (DefaultsPreset preset=DefaultsPreset.Medium) |
Initializes some settings plugins to recommended values. Call on an empty scene before your own changes. More... | |
void | SetIncludePaths (string includePaths, bool overwrite=true) |
Set search paths for scene include files. More... | |
bool | SetInteractiveNoiseThreshold (float threshold) |
Set noise threshold for a frame when using interactive mode. Value 0 means unlimited. This (creates if necessary and) changes SettingsRTEngine in the scene. The setting is reset after clearing the scene or loading another scene file. More... | |
bool | SetInteractiveSampleLevel (int sampleLevel) |
Set the maximum camera samples per pixel when using interactive mode. Value 0 means unlimited. This (creates if necessary and) changes SettingsRTEngine in the scene. The setting is reset after clearing the scene or loading another scene file. More... | |
bool | SetInteractiveTimeout (int timeout) |
Set a timeout value (in milliseconds) for a frame when using interactive mode. Value 0 means unlimited. This (creates if necessary and) changes SettingsRTEngine in the scene. The setting is reset after clearing the scene or loading another scene file. More... | |
bool | SetRenderRegion (int left, int top, int width, int height) |
Sets the rendering region within the image Width and Height. This (creates if necessary and) changes SettingsOutput in the scene. The region is reset after clearing the scene or loading another scene file. More... | |
bool | SetRenderRegion (RenderRegion renderRegion) |
Sets the rendering region within the image Width and Height. This (creates if necessary and) changes SettingsOutput in the scene. The region is reset after clearing the scene or loading another scene file. More... | |
bool | SetRenderSizes (RenderSizeParams sizes, bool regionButtonState) |
Sets the frame buffer width and height, the rendering region and the crop region. More... | |
bool | SetResumableRendering (bool enable, ResumableRenderingOptions options) |
Toggles resumable rendering and sets optional parameters. Call before rendering. More... | |
void | SetVFBContextMenuItems (IList< VFBContextMenuItem > menuItems) |
Set menu items for the VFB's context menu More... | |
bool | SetVFBContextMenuItemValue (int commandID, int value) |
Set the value of a VFB context menu checkbox item. More... | |
void | SetVRayProfiler (VRayProfilerSettings settings) |
Sets up the VRay Profiler. Should be called as early as possible(e.g.before rendering start), otherwise it will have no effect. More... | |
void | Start () |
Starts rendering the loaded V-Ray scene in a separate thread. | |
void | StartSync () |
Starts rendering the loaded V-Ray scene in a separate thread but blocks until rendering actually started. | |
void | Stop () |
Stops the current rendering. | |
bool | TryLockScene () |
Attempts to lock the scene, without blocking, for writing and reading. If scene is locked, rendering stops and will not resume until UnlockScene() is called, LockScene This is usefull when changes can be done only from the UI thread of the application. If locking fails then it can be attempted at a later time allowing the UI thread to not block the UI. More... | |
void | UnlockScene () |
Unlocks previously locked scene. This must be called after the scene has been locked with LockScene() or TryLockScene(). | |
bool | UpdateLightAnalysis () |
Invokes an update to the lighting analysis render element. Requires RenderChannelLightingAnalysis to be present in the scene. This can be run while rendering is ongoing or when it's paused or after it is stopped. Lighting analysis parameters are taken from the RenderChannelLightingAnalysis plugin. The update is asynchronous, so the funtion will return as soon as the thread is started. When the channel is updated the postEffectsUpdated callback will be called. More... | |
bool | WaitForRenderEnd (int timeout) |
Waits for the final image to become ready. This is a blocking call that waits for the corresponding render call to finish. More... | |
bool | WaitForRenderEnd (WaitTime time=WaitTime.AwaitingOrIdle) |
Waits for the final image to become ready. This is a blocking call that waits for the corresponding render call to finish. More... | |
bool | WaitForSequenceEnd (int timeout=-1) |
Waits for rendering of an animation sequence to finish. This is a blocking call. More... | |
bool | WaitForVFBClosed () |
Waits for the VFB window to be closed or hidden. More... | |
bool | WaitForVFBClosed (int timeout) |
Waits for the VFB window to be closed or hidden. More... | |
Static Public Member Functions | |
static int[] | EncodeScannedMaterialParams (ScannedMaterialParams mtlParams) |
Encodes the parameters for the BRDFScanned::param_block plugin property More... | |
static bool | IsActiveState (RendererState value) |
Convenience function for checking if a state value is in the rendering subset (including preparing). | |
static bool | IsInactiveState (RendererState value) |
Convenience function for checking if a state value is in the idle subset (including IDLE_FRAME_DONE awaiting continue command). | |
Properties | |
string | ActiveHosts [get] |
Gets a colon separated string of ip:port pairs for the active rendering hosts. | |
EventHandler< VFBAddRenderElementToSceneEventArgs > | AddRenderElementToScene |
The event is sent when the Add 'Render Element' to the scene button in V-Ray VFB is pressed. The button doesn't do anything by default. | |
string | AllHosts [get] |
Gets a colon separated string of ip:port pairs for all active and inactive rendering hosts. | |
string[] | AllPluginTypes [get] |
Gets the class(type) names of all available V-Ray plugins. | |
bool | AutoCommit [get, set] |
When true, every parameter change is applied immediately. Otherwise you have to call Commit() yourself to apply changes. 'false' allows you to batch changes together for efficiency. | |
EventHandler< BucketRegionEventArgs > | BucketFailed |
The event is sent when rendering a bucket has failed. | |
EventHandler< BucketRegionEventArgs > | BucketInit |
The event is sent when a bucket has been initialized for rendering and has been assigned to a render host. | |
EventHandler< BucketImageEventArgs > | BucketReady |
The event is sent when a bucket image has been rendered. | |
bool | BucketReadyHasBuffer [get, set] |
Sets if an image passed in the BucketReady event parameters is needed. If not, no unnecessary copies would be made. | |
string | CameraName [get, set] |
Camera name override. Current camera is selected internally using the scene_name property of the camera plugins. | |
double | CurrentEventTime [get] |
Get the current value (in seconds) of the relative time used in event callbacks | |
int | Frame [get, set] |
The frame number to be rendered. Makes sense only if the scene supports animation. Setting it during sequence rendering will not work. This setter will also calculate and set the time (see the time property) for setting animated property values. This would only be possible if an instance of SettingsOutput plugin is available. Getting it during sequence rendering will return the of the frame number that will be rendered after the call to continueSequence(). | |
EventHandler< HostConnectedEventArgs > | HostConnected |
The event is sent when a DR host is connected. | |
EventHandler< HostDisconnectedEventArgs > | HostDisconnected |
The event is sent when a DR host is disconnected. | |
string | InactiveHosts [get] |
Gets a colon separated string of ip:port pairs for the inactive rendering hosts. | |
bool | InProcess [get, set] |
Specifies whether the executing process participates in the rendering (when true, default) or whether the rendering is executed entirely by V-Ray DR render slaves (when false). Setting is only allowed while the renderer is idle, otherwise an exception is thrown. More... | |
IntPtr | InstanceHandle [get] |
Returns a handle which allows sharing a VRayRenderer instance among different programming languages and/or shared libraries in the same process. Use with extreme caution! Do not use unless you know exactly what you're doing! More... | |
bool | IsFrameSkipped [get] |
Checks if an the last rendered frame was skipped (e.g. resuming and already complete frame). More... | |
bool | IsRenderEnded [get] |
Checks if an image has been rendered. More... | |
bool | IsSequenceEnded [get] |
Checks if an anim sequence has been finished. More... | |
bool | KeepInteractiveRunning [get, set] |
When set to true V-Ray won't quit interactive rendering even if timeout or noise threshold are reached. Defaults to false. If a noise/time limit is reached, the render engine will become idle, but it will not unload and it will restart sampling when a scene change is applied. The only way to end the render is to explicitly stop() it. | |
Error | LastError [get] |
Gets the last error. | |
ParserError | LastParserError [get] |
Gets the last parser error. | |
EventHandler< LightMixTransferToSceneEventArgs > | LightMixTransferToScene |
The event is sent when the Light Mix "Transfer to scene" button is pressed | |
EventHandler< MessageEventArgs > | LogMessage |
The event is sent when the render status has been updated. A text message with its log level type is returned. | |
int | NumThreads [get, set] |
Gets or sets the number of rendering threads (default is 0 - all CPU logical threads). Setting is only allowed while the renderer is idle, otherwise an exception is thrown. | |
EventHandler< LicenseErrorEventArgs > | OnLicenseError |
The event is sent when renderer receives a license error. An error code with a text message and the current user log-in status are returned. | |
RendererOptions | Options [get] |
Renderer options that were passed to the VRayRenderer constructor. | |
EventHandler< VRayEventArgs > | PostEffectsUpdated |
The event is sent when a new post-processed (denoised, lens effects) image is available. | |
ProfilerMethods | Profiler [get] |
Contains methods for the VRay Profiler, such as manual initializations, custom events and writing output | |
EventHandler< ProgressEventArgs > | Progress |
The event is sent to indicate the progress of the current operation. | |
EventHandler< VRayImageEventArgs > | ProgressiveImageUpdated |
The event is sent when V-Ray produces a new progressively updated image (when not using buckets). | |
bool | ProgressiveImageUpdatedHasBuffer [get, set] |
Sets if an image passed in the ProgressiveImageUpdated event parameters is needed. If not, no unnecessary copies would be made. | |
float | ProgressiveImageUpdateDifference [get, set] |
Gets or sets the maximum difference threshold between two intermediate images returned by V-Ray progressive during rendering so that it can be used as a criterion when to send the current image in the callback event. The parameter works in a combination with ProgressiveImageUpdateInterval and has no effect if ProgressiveImageUpdateInterval is 0. | |
long | ProgressiveImageUpdateTimeout [get, set] |
Sets the maximum timeout interval during V-Ray progressive rendering to send the current image in the callback even if the difference criterion is not met. Works in a combination with ProgressiveImageUpdateDifference. | |
RenderElements | RenderElements [get] |
Get RenderElements wrapper class. | |
RenderMode | RenderMode [get, set] |
The setter changes the render mode if the renderer is in an idle state. If a rendering is in process, it will not be affected. You can switch between Production and Interactive mode with this without clearing the scene. | |
EventHandler< RenderViewChangedEventArgs > | RenderViewChanged |
The event is sent when the RenderView is changed internally. | |
EventHandler< StateChangedEventArgs > | StateChanged |
The event is sent when the renderer state changes. This is used to detect image completion/failure etc. See the RendererState enum for what the values mean. | |
double | Time [get, set] |
The current time. All subsequent plugin property sets will set the values at the given time if animation has been enabled (see useAnimatedValues). This will also calculate and set the current rendering frame (see the frame property) if possible. Setting it during sequence rendering will not work. Getting it during sequence rendering will return the time of the next frame that will be rendered after the call to continueSequence(). | |
EventHandler< UploadToCollaborationEventArgs > | UploadToCollaboration |
The event is sent when an upload to collaboration is requested | |
bool | UseAnimatedValues [get, set] |
Enables or disables property value animation when setting property values. Affects only subsequent plugin property sets. | |
VFB | Vfb [get] |
Get a VFB wrapper class. | |
EventHandler< VRayEventArgs > | VFBClosed |
The event is sent when the VFB window has been closed (hidden). | |
EventHandler< VFBContextMenuSelectedEventArgs > | VFBContextMenuSelected |
The event is sent when a custom context menu item is selected | |
EventHandler< VRayEventArgs > | VFBCopyToHostFrameBuffer |
The event is sent when the "Duplicate to host frame buffer" VFB button is pressed. | |
EventHandler< VRayEventArgs > | VFBLayersChanged |
The event is sent when VFB color corrections or compositing layers have changed. Note that this callback may be called multiple times in short time period, when a parameter is changed by a slider. | |
EventHandler< VRayEventArgs > | VFBOpenUpdateNotify |
The event is sent when the user clicks the update available notification in VFB. | |
EventHandler< VFBPauseIPRNotifyEventArgs > | VFBPauseIPR |
The event is sent when the Pause IPR button in V-Ray VFB is pressed. The button pauses the rendering by default. | |
EventHandler< RenderInteractiveEventArgs > | VFBRenderInteractive |
The event is sent when the Render Interactive button in V-Ray VFB is pressed. | |
EventHandler< RenderLastEventArgs > | VFBRenderLast |
The event is sent when the RenderLast button in V-Ray VFB is pressed. | |
EventHandler< VRayEventArgs > | VFBSaveSettingsNotify |
The event is sent when some settings have been changed from VFB UI. | |
EventHandler< VRayEventArgs > | VFBShowMessagesWindow |
The event is sent when the message window button in the VFB is clicked. | |
EventHandler< VFBUpdateIPRNotifyEventArgs > | VFBUpdateIPR |
The event is sent when the Update IPR button in V-Ray VFB is pressed. The button restarts the rendering by default. | |
bool | VisualDebuggerEnabled [get, set] |
Enabled/disable the Visual Debugger functionality | |
EventHandler< VRayProfilerWriteEventArgs > | VRayProfilerWrite |
The event is sent when the V-Ray Profiler has finished writing the file | |
This class controls the native V-Ray renderer and manages scene contents.
VRay.VRayRenderer.VRayRenderer | ( | RendererOptions | rendererOptions | ) |
Creates a new VRayRenderer using the specified options. The default render mode is Interactive.
rendererOptions | The instance holding the immutable render options. |
VRay.VRayRenderer.VRayRenderer | ( | IntPtr | instanceHandle | ) |
Creates a new shared VRayRenderer from an instance handle. This allows sharing a VRayRenderer instance among different programming languages and/or shared libraries in the same process. Use with extreme caution! Do not use unless you know exactly what you're doing!
instanceHandle | An instance handle received from the InstanceHandle property or getInstanceHandle() from other languages. |
AddHostsResult VRay.VRayRenderer.AddHosts | ( | string | hosts | ) |
Adds hosts to the renderer for distributed rendering.
hosts | Ip:port pairs as String delimited by ',' or ';'. |
bool VRay.VRayRenderer.AddVRayProfilerMetadata | ( | string | category, |
string | key, | ||
string | value | ||
) |
Add a key-value pair to VRay Profiler metadata under a specific category (key). Should be called as early as possible before SetVRayProfiler, otherwise it will have no effect.
category | A key to which the key-value pair will be added |
key | A preferably unique identifier. If duplicated the last value entry will be set to correspond to this key |
value | The value to the corresponding key |
void VRay.VRayRenderer.Append | ( | FileInfo | sceneFile, |
bool | drSendNameOnly = false |
||
) |
Appends a V-Ray scene from a .vrscene file.
sceneFile | The .vrscene file info. |
drSendNameOnly | Indicates whether the whole file should be sent to the DR hosts or the name only. |
void VRay.VRayRenderer.Append | ( | params FileInfo[] | sceneFiles | ) |
Appends the specified scene files data to the currently loaded scene without wiping it. This treats all files as one.
sceneFiles | The file info array to the .vrscene files which will be appended. The files are interpreted as one. If one fails, they all fail. |
void VRay.VRayRenderer.Append | ( | params string[] | sceneFileNames | ) |
Appends the specified scene files data to the currently loaded scene without wiping it. This treats all files as one.
sceneFileNames | The file paths array to the .vrscene files which will be appended. The files are interpreted as one. If one fails, they all fail. |
void VRay.VRayRenderer.Append | ( | string | sceneFileName, |
bool | drSendNameOnly = false |
||
) |
Appends a V-Ray scene from a .vrscene file.
sceneFileName | The full path to the .vrscene file including its name. |
drSendNameOnly | Indicates whether the whole file should be sent to the DR hosts or the name only. |
void VRay.VRayRenderer.AppendAsText | ( | params string[] | sceneTexts | ) |
Appends V-Ray scenes from text data array in the format of a .vrscene files.
sceneTexts | The scene text data array. The texts are interpreted as one. If one fails, they all fail. |
void VRay.VRayRenderer.AppendAsText | ( | string | sceneText | ) |
Appends a V-Ray scene from text data in the format of a .vrscene file.
sceneText | The scene text data. The texts are interpreted as one. If one fails, they all fail. |
void VRay.VRayRenderer.AppendAsTextFiltered | ( | OnPluginFilter | onPluginFilter, |
params string[] | sceneTexts | ||
) |
Appends a V-Ray scene from text data in the format of a .vrscene file using a plugin filtering callback.
onPluginFilter | The plugin filtering user callback method. |
sceneTexts | The scene text data array. The texts are interpreted as one. If one fails, they all fail. |
void VRay.VRayRenderer.AppendAsTextFiltered | ( | string | sceneText, |
OnPluginFilter | onPluginFilter | ||
) |
Appends a V-Ray scene from text data in the format of a .vrscene file using a plugin filtering callback.
sceneText | The scene text data. |
onPluginFilter | The plugin filtering user callback method. |
void VRay.VRayRenderer.AppendAsTextFiltered | ( | string[] | sceneTexts, |
OnPluginFilter | onPluginFilter | ||
) |
Appends a V-Ray scene from text data in the format of a .vrscene file using a plugin filtering callback.
sceneTexts | The scene text data array. The texts are interpreted as one. If one fails, they all fail. |
onPluginFilter | The plugin filtering user callback method. |
void VRay.VRayRenderer.AppendFiltered | ( | FileInfo | sceneFile, |
OnPluginFilter | onPluginFilter | ||
) |
Appends a V-Ray scene from a .vrscene file using a plugin filtering callback.
sceneFile | The .vrscene file info. |
onPluginFilter | The plugin filtering user callback method. |
void VRay.VRayRenderer.AppendFiltered | ( | FileInfo[] | sceneFiles, |
OnPluginFilter | onPluginFilter | ||
) |
Appends V-Ray scenes from a .vrscene files array using a plugin filtering callback. This treats all files as one.
sceneFiles | The file info array to the .vrscene files which will be appended. The files are interpreted as one. If one fails, they all fail. |
onPluginFilter | The plugin filtering user callback method. |
void VRay.VRayRenderer.AppendFiltered | ( | OnPluginFilter | onPluginFilter, |
params FileInfo[] | sceneFiles | ||
) |
Appends V-Ray scenes from a .vrscene files array using a plugin filtering callback. This treats all files as one.
onPluginFilter | The plugin filtering user callback method. |
sceneFiles | The file info array to the .vrscene files which will be appended. The files are interpreted as one. If one fails, they all fail. |
void VRay.VRayRenderer.AppendFiltered | ( | OnPluginFilter | onPluginFilter, |
params string[] | sceneFileNames | ||
) |
Appends a V-Ray scene from a .vrscene file array using a plugin filtering callback. This treats all files as one.
onPluginFilter | The plugin filtering user callback method. |
sceneFileNames | The file paths array to the .vrscene files which will be appended. |
void VRay.VRayRenderer.AppendFiltered | ( | string | sceneFileName, |
OnPluginFilter | onPluginFilter | ||
) |
Appends a V-Ray scene from a .vrscene file using a plugin filtering callback.
sceneFileName | The full path to the .vrscene file including its name. |
onPluginFilter | The plugin filtering user callback method. |
void VRay.VRayRenderer.AppendFiltered | ( | string[] | sceneFileNames, |
OnPluginFilter | onPluginFilter | ||
) |
Appends a V-Ray scene from a .vrscene file array using a plugin filtering callback. This treats all files as one.
sceneFileNames | The file paths array to the .vrscene files which will be appended. The files are interpreted as one. If one fails, they all fail. |
onPluginFilter | The plugin filtering user callback method. |
void VRay.VRayRenderer.BucketRenderNearest | ( | int | x, |
int | y | ||
) |
In Production mode the method provides the coordinates for a nearby bucket to be rendered. If the selected bucket has already been rendered, a closest bucket will be picked with a minimum distance to the specified coordinates. The coordinates must be within the dimensions of the currently rendered image, otherwise the method has no effect. The method has also no effect in progressive modes.
x | The x coordinate for a nearby bucket. Must be between 0 and ImageWidth inclusive. |
y | The y coordinate for a nearby bucket. Must be between 0 and ImageHeight inclusive. |
bool VRay.VRayRenderer.ClearAllPropertyValuesUpToTime | ( | double | time | ) |
Removes all keyframe values of animated properties up to the given time.
time | The time value that determines which values to remove. |
bool VRay.VRayRenderer.ClearPropertyValuesUpToTime | ( | double | time, |
PluginCategories | categories | ||
) |
Removes all keyframe values of animated properties up to the given time only from plugins of the given categories.
time | The time value that determines which values to remove. |
categories | The categories of plugins from which to remove values. |
long VRay.VRayRenderer.Commit | ( | ) |
Commits any accumulated scene changes. This is necessary if the AutoCommit flag is set to false.
bool VRay.VRayRenderer.DeletePlugin | ( | Plugin | plugin | ) |
Delete the plugin from the scene and remove any references to it from other plugins.
plugin | The plugin instance to be removed. |
bool VRay.VRayRenderer.DeletePlugin | ( | string | pluginName | ) |
Delete the plugin from the scene and remove any references to it from other plugins.
pluginName | The name of the plugin to be removed. |
bool VRay.VRayRenderer.DeletePlugins | ( | IEnumerable< Plugin > | plugins | ) |
Delete multiple plugins from the scene and remove any references to them from other plugins.
plugins | The plugin instances to be removed. |
bool VRay.VRayRenderer.DeletePlugins | ( | IEnumerable< string > | pluginNames | ) |
Delete multiple plugins from the scene and remove any references to them from other plugins.
pluginNames | The names of the plugins to be removed. |
bool VRay.VRayRenderer.DenoiseNow | ( | OnManualDenoiseFinished | userCallback = null , |
bool | shouldPassImage = true |
||
) |
Explicitly starts the denoiser. Requires a RenderChannelDenoiser instance in the scene. This can be run while rendering is ongoing or when it's paused or after it is stopped. Denoising parameters are taken from the RenderChannelDenoiser plugin. The denoising is run asynchronously, so this function will return as soon as the thread is started. When denoising is done the PostEffectsUpdated callback will be called.
userCallback | Optional callback function to be called when denoising finishes. |
shouldPassImage | Optional boolean, whether to pass the denoised image to the callback. |
void VRay.VRayRenderer.DisableDRClient | ( | ) |
Toggles off the current VRayRenderer to act as a DR2 client.
Available in DR2 only
Disabling is only allowed while the renderer is idle, otherwise an exception is thrown.
void VRay.VRayRenderer.EnableDRClient | ( | EnableDRClientParams | enableParams | ) |
Toggles on the current VRayRenderer to act as a DR2 client.
Available in DR2 only
enableParams | The necessary parameters. |
Disabling is only allowed while the renderer is idle, otherwise an exception is thrown.
void VRay.VRayRenderer.EnableLiveLinkClient | ( | EnableLiveLinkClientParams | enableParams | ) |
Toggles on the current VRayRenderer to act as a DR2 LiveLink client.
Available in DR2 only
enableParams | Pre-configured parameters to enable livelink |
Enabling is only allowed while the renderer is idle, otherwise an exception is thrown.
|
static |
Encodes the parameters for the BRDFScanned::param_block plugin property
mtlParams | the parameters to be encoded |
bool VRay.VRayRenderer.Export | ( | FileInfo | file | ) |
Exports the currently loaded scene to the specified text file. The export serializes all plugins in text format.
file | The path to the file where the scene will be exported. The file path must contain the name of the destination file. The export will not add a ".vrscene" extension to the file name if it is missing. |
bool VRay.VRayRenderer.Export | ( | string | filePath, |
ExportSettings | settings = null |
||
) |
Exports the currently loaded scene to the specified text file. The export serializes all plugins in text format.
filePath | The path to the file where the scene will be exported. The file path must contain the name of the destination file. The export will not add a ".vrscene" extension to the file name if it is missing. |
settings | The settings for the export operation. The settings specify how and what type of scene elements are exported. |
string VRay.VRayRenderer.ExportToBuffer | ( | ExportSettings | settings = null | ) |
Exports and return the currently loaded scene as a string instance. The export serializes all plugins in text format.
settings | The settings for the export operation. The settings specify how and what type of scene elements are exported. |
AutoExposureResult VRay.VRayRenderer.GetAutoExposureResult | ( | ) |
Gets the auto-exposure and auto-white balance values computed during the last light cache calculation.
Plugin VRay.VRayRenderer.GetCamera | ( | ) |
Returns the current camera.
T VRay.VRayRenderer.GetCamera< T > | ( | ) |
Returns the current camera.
T | The type (class) of returned plugin. |
T | : | Plugin |
long VRay.VRayRenderer.GetChangeIndex | ( | ) |
Returns the last change index for interactive changes on the renderer instance.
ComputeDeviceInfo[] VRay.VRayRenderer.GetComputeDevicesCUDA | ( | ) |
Returns a list of all devices available for use by the CUDA engine. The "CUDA CPU" device uses the CUDA engine code compiled for the x86-64 architecture. It is not the CPU V-Ray engine. It is disabled by default but you can enable it for faster "hybrid" rendering.
ComputeDeviceInfo[] VRay.VRayRenderer.GetComputeDevicesCurrentEngine | ( | ) |
Returns a list of all devices available for use by the current engine (Optix, CUDA, Metal).
ComputeDeviceInfo[] VRay.VRayRenderer.GetComputeDevicesDenoiser | ( | ) |
Returns a list of all devices available for denoising.
ComputeDeviceInfo[] VRay.VRayRenderer.GetComputeDevicesMetal | ( | ) |
Returns a list of all devices available for use by the Metal engine. macOS only.
ComputeDeviceInfo[] VRay.VRayRenderer.GetComputeDevicesOptix | ( | ) |
Returns a list of all devices available for use by the Optix engine. Compute capability >= 5.2 is required to use Optix. All unsupported devices will be ignored.
CropRegion VRay.VRayRenderer.GetCropRegion | ( | ) |
Gets the virtual crop region (RgnLeft, RgnTop, RgnWidth, RgnHeight) within a virtual source image space with sizes SrcWidth, SrcHeight.
bool VRay.VRayRenderer.GetDREnabled | ( | ) |
Return whether distributed rendering is currently enabled or not.
Available in DR1 only
VRayImage VRay.VRayRenderer.GetImage | ( | GetImageOptions | options = null | ) |
Gets the latest rendered image. This can return intermediate results while rendering. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions.
options | Options that may differ from the default parameterless GetImage() |
bool VRay.VRayRenderer.GetImageSize | ( | out int | width, |
out int | height | ||
) |
Gets the rendering width and height. (There're also properties Width and Height.)
width | output param width |
height | output param height |
Plugin VRay.VRayRenderer.GetInstanceOf | ( | string | pluginClassName | ) |
Returns the latest instance of a given plugin type if any exist. Should be used for singleton plugins. Most settings plugins are singletons.
pluginClassName | The class name of the plugin. |
T VRay.VRayRenderer.GetInstanceOf< T > | ( | ) |
Returns the latest instance of a given plugin type if any exist. Should be used for singleton plugins. Most settings plugins are singletons.
T | The type (class) of the plugin. |
T | : | Plugin |
Plugin VRay.VRayRenderer.GetInstanceOrCreate | ( | string | pluginClassName, |
string | pluginName = null |
||
) |
Returns an existing instance (the last one) of a given plugin type or creates a new instance otherwise, using the given instance name. Should be used for singleton plugins. Settings plugins are singletons.
pluginClassName | The name of the plugin class/type. |
pluginName | The plugin instance name if it has to be created. |
T VRay.VRayRenderer.GetInstanceOrCreate< T > | ( | string | pluginName = null | ) |
Returns an existing instance (the last one) of a given plugin type or creates a new instance otherwise, using the given instance name. Should be used for singleton plugins. Settings plugins are singletons.
T | The type (class) of the plugin. |
pluginName | The plugin instance name if it has to be created. |
T | : | Plugin |
Plugin VRay.VRayRenderer.GetOrCreatePlugin | ( | string | pluginClassName, |
string | pluginName | ||
) |
Returns an existing plugin instance with the given instance name and of the given type. A new instance is created if one does not exist with the given name. This behaves like getInstanceOrCreate if no instance name is given (empty/null), i.e. returns any instance of this type as long as one exists. For singleton plugins like the settings plugins use getInstanceOrCreate() to avoid inadvertently creating more than one instance.
pluginClassName | The class name of the plugin. |
pluginName | The plugin instance name. If empty, any existing plugin might be returned. |
T VRay.VRayRenderer.GetOrCreatePlugin< T > | ( | string | pluginName | ) |
Returns an existing plugin instance with the given instance name and of the given type. A new instance is created if one does not exist with the given name. This behaves like getInstanceOrCreate if no instance name is given (empty/null), i.e. returns any instance of this type as long as one exists. For singleton plugins like the settings plugins use getInstanceOrCreate() to avoid inadvertently creating more than one instance.
T | The type (class) of the plugin. |
pluginName | The plugin instance name. If empty, any existing plugin might be returned. |
T | : | Plugin |
Plugin VRay.VRayRenderer.GetPlugin | ( | string | pluginName | ) |
Searches the current scene for the plugin with the specified name.
pluginName | The name of the plugin. |
T VRay.VRayRenderer.GetPlugin< T > | ( | string | pluginName | ) |
Searches the current scene for the plugin with the specified name.
pluginName | The name of the plugin. |
T | : | class | |
T | : | IPluginRef |
PluginMeta VRay.VRayRenderer.GetPluginMeta | ( | string | pluginClassName | ) |
Gets the meta info for the plugin of the given type.
pluginClassName | The type of the plugin. |
Plugin[] VRay.VRayRenderer.GetPlugins | ( | ) |
Returns an array with all Plugin instances contained in the scene.
Plugin[] VRay.VRayRenderer.GetPlugins | ( | string | pluginClassName | ) |
Returns an array with Plugin instances of the specified type.
pluginClassName | The type of the plugin. |
T[] VRay.VRayRenderer.GetPlugins< T > | ( | ) |
Returns an array with Plugin instances of the specified type.
T | The type of the plugins. |
T | : | Plugin |
Plugin[] VRay.VRayRenderer.GetPluginsOfCategories | ( | IEnumerable< PluginCategories > | categories | ) |
Returns an array of all plugin instances that belong to all passed categories in categories[0] or all in categories[1], etc.
categories | An array or list of plugin category sets. |
Plugin[] VRay.VRayRenderer.GetPluginsOfCategories | ( | PluginCategories | categories | ) |
Returns an array of Plugin instances that belong to all passed categories.
categories | A set of plugin categories. |
string[] VRay.VRayRenderer.GetPluginTypesOfCategory | ( | PluginCategory | category | ) |
Returns the class names of all available V-Ray plugin classes loaded from dynamic libraries which belong to the specified category.
category | Plugin category |
RenderRegion VRay.VRayRenderer.GetRenderRegion | ( | ) |
Gets the rendering region within the image Width and Height. Width and Height are the rendering sizes set but other methods or constructors, etc.
RenderSizeParams VRay.VRayRenderer.GetRenderSizes | ( | ) |
Gets the frame buffer width and height, the rendering region and the crop region.
RenderSizeParams VRay.VRayRenderer.GetRenderSizes | ( | out bool | regionButtonState | ) |
Gets the frame buffer width and height, the rendering region and the crop region.
regionButtonState | The state of the VFB's region button. |
RendererState VRay.VRayRenderer.GetState | ( | ) |
Returns the current state of the renderer. The state could change asynchronously as rendering occurs in another thread.
Use the static helpers IsInactiveState and IsActiveState to check for multiple values.
bool VRay.VRayRenderer.GetVFBContextMenuItemValue | ( | int | commandID, |
out int | value | ||
) |
Get the value from a VFB context menu checkbox item
commandID | Id of the menu item |
value | output parameter for the value |
bool VRay.VRayRenderer.IsDRClientEnabled | ( | ) |
Returns whether the current VRayRenderer acts as a DR2 client or not.
Available in DR2 only
void VRay.VRayRenderer.Load | ( | FileInfo | sceneFile | ) |
Loads a V-Ray scene from a .vrscene file.
sceneFile | The .vrscene file info. |
void VRay.VRayRenderer.Load | ( | string | sceneFileName | ) |
Loads a V-Ray scene from a .vrscene file.
sceneFileName | The full path to the .vrscene file including its name. |
void VRay.VRayRenderer.LoadAsText | ( | string | sceneText | ) |
Loads a V-Ray scene from text data in the format of a .vrscene file.
sceneText | The scene text data. |
void VRay.VRayRenderer.LoadAsTextFiltered | ( | string | sceneText, |
OnPluginFilter | onPluginFilter | ||
) |
Loads a V-Ray scene from text data in the format of a .vrscene file using a plugin filtering callback.
sceneText | The scene text data. |
onPluginFilter | The plugin filtering user callback method. |
void VRay.VRayRenderer.LoadFiltered | ( | FileInfo | sceneFile, |
OnPluginFilter | onPluginFilter | ||
) |
Loads a V-Ray scene from a .vrscene file using a plugin filtering callback.
sceneFile | The .vrscene file info. |
onPluginFilter | The plugin filtering user callback method. |
void VRay.VRayRenderer.LoadFiltered | ( | string | sceneFileName, |
OnPluginFilter | onPluginFilter | ||
) |
Loads a V-Ray scene from a .vrscene file using a plugin filtering callback.
sceneFileName | The full path to the .vrscene file including its name. |
onPluginFilter | The plugin filtering user callback method. |
Plugin VRay.VRayRenderer.NewPlugin | ( | string | pluginClassName, |
string | pluginName = null |
||
) |
Creates an instance of a Plugin class with the specified name and of the given type.
pluginClassName | The class name of the new plugin. |
pluginName | The name of the new plugin. |
T VRay.VRayRenderer.NewPlugin< T > | ( | string | pluginName = null | ) |
Creates an instance of a Plugin class with the specified name and of the given type.
T | The type (class) of the new plugin. |
pluginName | The name of the new plugin. |
T | : | Plugin |
delegate string VRay.VRayRenderer.OnPluginFilter | ( | string | type, |
string | name | ||
) |
A user callback which is called for each plugin instance read from a .vrscene-file. The user should return the desired new plugin name or null to skip creating the plugin.
type | |
name |
Plugin VRay.VRayRenderer.PickPlugin | ( | int | x, |
int | y, | ||
int | timeout = -1 |
||
) |
Returns the first scene Node object intersected at the given pixel.
x | Coordinate X. |
y | Coordinate Y. |
timeout | Optional maximum time to perform the intersection. |
PickedPluginInfo[] VRay.VRayRenderer.PickPlugins | ( | double | x, |
double | y, | ||
int | maxcount = 0 , |
||
int | timeout = -1 |
||
) |
Returns the scene Node objects intersected at the given pixel.
x | Coordinate X. |
y | Coordinate Y. |
maxcount | Optional - The maximum number of plugins to obtain (0 - no limitation) |
timeout | Optional - The maximum time to perform the intersection. |
bool VRay.VRayRenderer.RemoveHosts | ( | string | hosts | ) |
Removes hosts to the renderer for distributed rendering.
hosts | Ip:port pairs as String delimited by ',' or ';'. |
Replaces all references (in the scene) of oldPlugin with newPlugin.
oldPlugin | The plugin whose references are to be replaced. |
newPlugin | The plugin which will replace the old one. If null, all references to oldPlugin will be removed. |
bool VRay.VRayRenderer.ResetHosts | ( | string | hosts = null | ) |
Resets the renderer host list used for distributed rendering. Removes all if null is passed.
hosts | Ip:port pairs as String delimited by ',' or ';'. |
bool VRay.VRayRenderer.SaveCausticsFile | ( | string | fileName | ) |
Saves the caustics to a file.
fileName | Destination caustics file |
bool VRay.VRayRenderer.SaveIrradianceMapFile | ( | string | fileName | ) |
Saves the irradiance map to a file.
fileName | Destination irradiance map file |
bool VRay.VRayRenderer.SaveLightCacheFile | ( | string | fileName | ) |
Saves the light cache to a file.
fileName | Destination light cache file |
bool VRay.VRayRenderer.SavePhotonMapFile | ( | string | fileName | ) |
Saves the photon map to a file.
fileName | Destination photon map file |
bool VRay.VRayRenderer.SetBitmapCache | ( | bool | onOff | ) |
Enable or disable bitmap caching between renders. If enabled, bitmap textures will be stored in memory and won't be unloaded / loaded again on the next render. This may save a lot of time loading heavy textures before every render.
onOff | Enable or disable bitmap caching. Disabling cache will clear cached data |
bool VRay.VRayRenderer.SetCamera | ( | Plugin | plugin | ) |
Sets the current camera.
plugin | The camera plugin. |
bool VRay.VRayRenderer.SetComputeDevicesCUDA | ( | IList< int > | indices | ) |
Set which devices to use for rendering with the CUDA engine.
indices | The indices of the devices to use as returned by GetComputeDevicesCUDA |
bool VRay.VRayRenderer.SetComputeDevicesCurrentEngine | ( | IList< int > | indices | ) |
Set which devices to use for rendering with the current engine (Optix, CUDA, Metal).
indices | The indices of the devices to use as returned by GetComputeDevicesCurrentEngine |
bool VRay.VRayRenderer.SetComputeDevicesDenoiser | ( | IList< int > | indices | ) |
Set which devices to use for denoising, when GPU denoiser is selected.
indices | The indices of the devices to use as returned by GetComputeDevicesDenoiser |
bool VRay.VRayRenderer.SetComputeDevicesEnvironmentVariable | ( | ) |
Set the user environment to the currently selected devices for each engine. Note that this will affect other V-Ray products as well.
bool VRay.VRayRenderer.SetComputeDevicesMetal | ( | IList< int > | indices | ) |
Set which devices to use for rendering with the Metal engine. macOS only.
indices | The indices of the devices to use as returned by GetComputeDevicesMetal. |
bool VRay.VRayRenderer.SetComputeDevicesOptix | ( | IList< int > | indices | ) |
Set which devices to use for rendering with the Optix engine. Optix requires compute capability >= 5.2. All unsupported devices will be ignored.
indices | The indices of the devices to use as returned by GetComputeDevicesOptix. |
bool VRay.VRayRenderer.SetCropRegion | ( | CropRegion | cropRegion | ) |
Sets a virtual crop region (RgnLeft, RgnTop, RgnWidth, RgnHeight) within a virtual source image space with sizes SrcWidth, SrcHeight. The output image pixel width and height do not change.
cropRegion | the crop region |
Set to an invalid size, like (0, 0, 0, 0), to reset the region and render the whole image.
bool VRay.VRayRenderer.SetCropRegion | ( | int | SrcWidth, |
int | SrcHeight, | ||
float | RgnLeft, | ||
float | RgnTop | ||
) |
Sets a virtual crop region (RgnLeft, RgnTop, Width, Height) within a virtual source image space with size SrcWidth, SrcHeight. This (creates if necessary and) changes SettingsOutput in the scene. The region is reset after clearing the scene or loading another scene file.
SrcWidth | Virtual image width |
SrcHeight | Virtual image height |
RgnLeft | Left horizontal crop limit. The right limit is RgnLeft + image width (not SrcWidth) |
RgnTop | Top horizontal crop limit. The bottom limit is RgnTop + image height (not SrcHeight) |
Set to an invalid size, like (0, 0, 0, 0), to reset the region and render the whole image.
void VRay.VRayRenderer.SetDebugShadingSelection | ( | IEnumerable< Plugin > | plugins | ) |
Selection for Debug Shading Isolate Selected mode.
plugins | The plugin instances to be selected. |
bool VRay.VRayRenderer.SetDREnabled | ( | bool | drEnabled, |
bool | withBroadcastListener = true |
||
) |
Toggles distributed rendering on or off. This can only be done when the renderer is idle. When this is disabled (default) it saves some memory. When it is enabled remote render machines added with addHosts() will be connected and contribute to the render.
Available in DR1 only
drEnabled | True to enable the DR subsystem. |
withBroadcastListener | Only when drEnabled=true: Whether a socket will be created to listen for remote machine broadcast messages over LAN. |
bool VRay.VRayRenderer.SetImageSize | ( | int | width, |
int | height | ||
) |
Sets a new rendering width and height at once. Crop and renderer region are reset. This (creates if necessary and) changes SettingsOutput in the scene. The size is reset after clearing the scene or loading another scene file.
width | new width |
height | new height |
bool VRay.VRayRenderer.SetImageSize | ( | int | width, |
int | height, | ||
bool | resetCropRegion, | ||
bool | resetRenderRegion | ||
) |
Sets a new rendering width and height at once. This (creates if necessary and) changes SettingsOutput in the scene. The size is reset after clearing the scene or loading another scene file.
width | new width |
height | new height |
resetCropRegion | specifies whether the crop region should be reset to the new width and height |
resetRenderRegion | specifies whether the render region should be reset to the new width and height |
bool VRay.VRayRenderer.SetImprovedDefaultSettings | ( | DefaultsPreset | preset = DefaultsPreset.Medium | ) |
Initializes some settings plugins to recommended values. Call on an empty scene before your own changes.
preset | Amount of sampling to perform - tradeoff between render time and noise |
This should be done before applying your own settings and before starting a render. The values are better than the defaults. The defaults remain as they are for compatibility reasons. To see what got changed, export the scene after that to a file and inspect it.
void VRay.VRayRenderer.SetIncludePaths | ( | string | includePaths, |
bool | overwrite = true |
||
) |
Set search paths for scene include files.
includePaths | String that looks like "assets;assets/meshes;assets/textures". These are relative paths where the parser looks in when including files. |
overwrite | Indicates whether to overwrite the existing search paths with the given string or to add it to them. |
bool VRay.VRayRenderer.SetInteractiveNoiseThreshold | ( | float | threshold | ) |
Set noise threshold for a frame when using interactive mode. Value 0 means unlimited. This (creates if necessary and) changes SettingsRTEngine in the scene. The setting is reset after clearing the scene or loading another scene file.
threshold | End sampling when the noise is at or below this level for all pixels (value 0.001 or higher) |
bool VRay.VRayRenderer.SetInteractiveSampleLevel | ( | int | sampleLevel | ) |
Set the maximum camera samples per pixel when using interactive mode. Value 0 means unlimited. This (creates if necessary and) changes SettingsRTEngine in the scene. The setting is reset after clearing the scene or loading another scene file.
sampleLevel | Maximum samples to take per pixel before render ends |
bool VRay.VRayRenderer.SetInteractiveTimeout | ( | int | timeout | ) |
Set a timeout value (in milliseconds) for a frame when using interactive mode. Value 0 means unlimited. This (creates if necessary and) changes SettingsRTEngine in the scene. The setting is reset after clearing the scene or loading another scene file.
timeout | Rendering will end after this time elapses |
bool VRay.VRayRenderer.SetRenderRegion | ( | int | left, |
int | top, | ||
int | width, | ||
int | height | ||
) |
Sets the rendering region within the image Width and Height. This (creates if necessary and) changes SettingsOutput in the scene. The region is reset after clearing the scene or loading another scene file.
Set to an invalid size, like (0, 0, 0, 0), to reset the region and render the whole image.
bool VRay.VRayRenderer.SetRenderRegion | ( | RenderRegion | renderRegion | ) |
Sets the rendering region within the image Width and Height. This (creates if necessary and) changes SettingsOutput in the scene. The region is reset after clearing the scene or loading another scene file.
renderRegion | the rendering region |
Set to an invalid size, like (0, 0, 0, 0), to reset the region and render the whole image.
bool VRay.VRayRenderer.SetRenderSizes | ( | RenderSizeParams | sizes, |
bool | regionButtonState | ||
) |
Sets the frame buffer width and height, the rendering region and the crop region.
sizes | "Structure" of all applicable parameters and flags indicating which ones to be set. |
regionButtonState | regionButtonState the new state of the VFB's region button if applicable. |
bool VRay.VRayRenderer.SetResumableRendering | ( | bool | enable, |
ResumableRenderingOptions | options | ||
) |
Toggles resumable rendering and sets optional parameters. Call before rendering.
enable | Whether resumable rendering should be enabled. |
options | Optional additional parameters |
void VRay.VRayRenderer.SetVFBContextMenuItems | ( | IList< VFBContextMenuItem > | menuItems | ) |
Set menu items for the VFB's context menu
menuItems | List of the menuitems |
bool VRay.VRayRenderer.SetVFBContextMenuItemValue | ( | int | commandID, |
int | value | ||
) |
Set the value of a VFB context menu checkbox item.
commandID | Id of the menu item |
value | Value to set. 0 means cleared and 1 means ticked. |
void VRay.VRayRenderer.SetVRayProfiler | ( | VRayProfilerSettings | settings | ) |
Sets up the VRay Profiler. Should be called as early as possible(e.g.before rendering start), otherwise it will have no effect.
settings | The settings, which contain the requested VRayProfiler operational mode, outputDirectory, max depth and other metadata |
bool VRay.VRayRenderer.TryLockScene | ( | ) |
Attempts to lock the scene, without blocking, for writing and reading. If scene is locked, rendering stops and will not resume until UnlockScene() is called, LockScene This is usefull when changes can be done only from the UI thread of the application. If locking fails then it can be attempted at a later time allowing the UI thread to not block the UI.
bool VRay.VRayRenderer.UpdateLightAnalysis | ( | ) |
Invokes an update to the lighting analysis render element. Requires RenderChannelLightingAnalysis to be present in the scene. This can be run while rendering is ongoing or when it's paused or after it is stopped. Lighting analysis parameters are taken from the RenderChannelLightingAnalysis plugin. The update is asynchronous, so the funtion will return as soon as the thread is started. When the channel is updated the postEffectsUpdated callback will be called.
bool VRay.VRayRenderer.WaitForRenderEnd | ( | int | timeout | ) |
Waits for the final image to become ready. This is a blocking call that waits for the corresponding render call to finish.
timeout | The timeout in milliseconds after which the waiting terminates if the image has not become ready in the meantime. |
bool VRay.VRayRenderer.WaitForRenderEnd | ( | WaitTime | time = WaitTime.AwaitingOrIdle | ) |
Waits for the final image to become ready. This is a blocking call that waits for the corresponding render call to finish.
time | If the keepInteractiveRunning flag is set and WaitTime.AwaitingOrIdle is passed (default) this event may occur without ending the render session (when the renderer state becomes RENDERING_AWAITING_CHANGES or any of the idle states). |
bool VRay.VRayRenderer.WaitForSequenceEnd | ( | int | timeout = -1 | ) |
Waits for rendering of an animation sequence to finish. This is a blocking call.
timeout | The timeout in milliseconds after which the waiting terminates if the sequenced is not finished in the meantime. The default value of -1 means infinity. |
bool VRay.VRayRenderer.WaitForVFBClosed | ( | ) |
bool VRay.VRayRenderer.WaitForVFBClosed | ( | int | timeout | ) |
|
getset |
Specifies whether the executing process participates in the rendering (when true, default) or whether the rendering is executed entirely by V-Ray DR render slaves (when false). Setting is only allowed while the renderer is idle, otherwise an exception is thrown.
Available in DR1 only
|
get |
Returns a handle which allows sharing a VRayRenderer instance among different programming languages and/or shared libraries in the same process. Use with extreme caution! Do not use unless you know exactly what you're doing!
|
get |
Checks if an the last rendered frame was skipped (e.g. resuming and already complete frame).
|
get |
Checks if an image has been rendered.
|
get |
Checks if an anim sequence has been finished.