This page describes the V-Ray Scene node in V-Ray for Maya.

 

Overview


The V-Ray Scene node is the result of importing a .vrscene file into your scene from the V-Ray Scene Manager. Its parameters are available in the Attribute Editor after import.

For detailed information on how to export a .vrscene file, see the Exporting and Using V-Ray Scene Files tutorial.

V-Ray Object Properties can be assigned to VRayScene nodes to override properties like primary visibility, matte properties and other.

A VRayScene object can also be loaded by dragging and dropping a .vrscene file directly in your viewport. 

 

 

 

 

||V-Ray Shelf|| > VRayScene Manager

 

||V-Ray Menu|| > V-Ray Scene

VRayScene Manager > Import Objects > Attribute Editor > VRayScene_scene

 

 

Parameters


Disable – Turns the VRayScene object off in the render. The preview is still visible in the viewport to select the node, but the items in the vrscene do not appear in any renders.

File (*.vrscene) – The path and filename of the vrscene loaded into the Scene node. Animation vrscene can be stored either in one single file, or as a sequence of files with one file per frame. In the latter case, you can use the string <frame0n> in the file name to have it replaced with the current frame number at render time, where n is an integer number specifying the number of digits. For example, if you enter my_vrscene_<frame04>.vrscene as the file name, this will be expanded to my_vrscene_0000.vrscene for frame 0, my_vrscene_0001.vrscene for frame 1, and so on.

Load Mode – Specifies how to load the .vrscene file. 

All – Loads the .vrscene file with all its geometry, lights, shading, volumes, etc. 
Geometry – Loads the .vrscene file with geometry and shading only. This option allows instancing vrscenes using MASH or nParticles. The new scene can be exported as a .vrscene, too. See the Instancing vrscene with MASH/nParticles  examples below.

 Geometry Load Mode has several advantages:

  • the instanced scene uses much less memory;
  • much faster render times;
  • makes possible of billions of instances of a geometry.

Flip Axis – Controls which axis is used as a vertical - the Y or Z axes for the loaded vrscene. You can choose between:

None – No changes in the axes are applied.
Auto – It aligns the vertical axis of the vrscene with the vertical axis in the scene in cases where the vrscene was not exported from Maya. Use the Auto mode when loading a USD file.
Flip – Switches the Y and Z axes.

Add Lights – When enabled, the lights from the vrscene is used in the render.

 




Example: Instancing vrscene with MASH and nParticles

 

This example shows how to instance a vrscene using MASH. A .vrscene is imported with the Scene Manager. The vrscene used in this example consists of one geometry object (an owl), which has a material applied. 

In the VRayScene rollout, change the Load Mode to Geometry. This way, the scene will load only geometry and shading, but it will become available for instancing.

 

 

To instance the scene using MASH, create a MASH Network (MASH > Create MASH Network ). As a Geometry Type, select Instancer

 

 

Adjust the distribution of your MASH network. In the example shown, the original owl scene is instanced 9 times. The instances are distributed in a Grid, with Distance X and Z set to 50.0.

 

 

 

The new scene is ready to be rendered or exported as a .vrscene, allowing you multiple instancing of one vrscene.  

 

 

Here is how to instance a vrscene with nParticles. Import the .vrscene using the Scene Manager. The vrscene used in this example consists of one geometry object (an owl), which has a material applied. 

In the VRayScene rollout, change the Load Mode to Geometry. This way, the scene will load only geometry and shading, but it will become available for instancing.

 

 

Create the nParticles using the nParticle tool (nParticles > nParticle tool). Select the points in the viewport that will later be instances of the vrscene. Press Enter to create the nParticle node. 

Go to nParticles > Instancer. Select the newly created instancer node and add the vrscene as an instanced object:

 

 

Once done, the vrscene instances load in the viewport and are ready to render. In the example below, the points of the instances are randomly selected. 

 

 

 

Note that if you miss to select the Geometry Load Mode of the vrscene, the render will not include the instanced geometry, although it will be visible in the viewport!  



Animation Overrides rollout


Use Animation Overrides – Enables the following parameters found in the Animation Overrides rollout.

Animation Type – Sets the way any animation in the vrscene play within your current scene.

Loop – The animation plays from the vrscene using the Anim Length setting. If the time range in your current scene is longer than the length of the animation, it repeats the beginning of the animation again.
Once – The animation in the vrscene plays just once. The end of the animation holds, if the time range is longer than the length of the animation.
Ping-Pong – The animation plays from the vrscene and if the end of the animation is reached, the animation plays in reverse towards the beginning of the animation. It continues back and forth until the end of the time range.
Still – The animation holds the Anim Start frame for the duration of the time range.

Anim Start – The frame used for the beginning of the animation.

Anim Length – The number of frames used to play the animation.

Anim Offset – The number of frames shifted between the animation and the time range.

Anim Speed – The pace at which the animation plays. The default of 1 plays at the speed for which the animation was created.

 


Render Overrides


Object ID – Overrides the object ID for all objects in the imported vrscene. If the override is not set, i.e. the value is -1 (minus one), V-Ray uses the original object IDs of the vrscene objects.

V-Ray Object Properties can be assigned to VRayScene nodes to override properties like primary visibility, matte properties and other.

 

 

Scene Overrides


With the scene manager, a vrscene can be imported and new instances of it can be made. Each instance can have its own Override Snippet. This allows overrides to be made independently for each instance of the same vrscene.

Use Scene Overrides – Enables the following parameters found in the Scene Overrides rollout.

From File (*.vrscene) – The path and filename of the vrscene used to override the file loaded in the File parameter.

Override Snippet (*.vrscene) – Editor box expects data in the vrscene format.

 

 

Snippet Example:

// MATERIAL OVERRIDE EXAMPLES // // Create new shadeless material. BRDFLight shadelessBrdf { color=Color(0.15,0.35,0.35); affect_gi=false; } MtlSingleBRDF shadelessMtl { brdf=shadelessBrdf; } MtlWrapper shadelessMtlAlpha { base_material=shadelessMtl; alpha_contribution=-1; }

V-Ray Next allows overriding user attributes to 'Node' plugins. 

// USER ATTRIBUTE OVERRIDE EXAMPLES // // Override user attributes that are used to replace a string in texture paths Node pSphereShape1@node { user_attributes="texPath=/tmp/assets/"; }   // Override user attributes that are used to pass a color Node pSphereShape1@node { user_attributes="color=1,0,0"; }

Notes


  • .vrscene files can be exported when you turn on the Export to a .vrscene file option in the Common tab before rendering the scene or via Maya's FIle menu > Export All.../Export Selection option.

  • Cameras and render settings are not imported from .vrscene files even if they are present in the files themselves.

  • VRayScene supports loading sequences of vrscenes where each frame of the animation data is stored in a separate file.

  • Light linking of a .vrscene asset and a light affects all instances of the .vrscene.

  • When VRayObjectProperties is used on a VRayScene node, the Override motion blur samples option has no effect, as it is baked to the VRayScene and cannot be changed.