---
title: "VRayScene"
canonical: "https://documentation.chaos.com/space/VMAYA/111739852/VRayScene"
format: markdown
---
This page describes the V-Ray Scene node in V-Ray for Maya.


## **Overview**

---


## **Parameters**

---


---

> Macro (anchor)



### Example: Instancing vrscene with MASH and nParticles


<details>
<summary>MASH example</summary>

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.

![image](media://ff926da9-66d3-48c1-92aa-72ec68b251d3)


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


![image](media://78ee5814-cbd7-487a-82cd-64146e984263)


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**.


![image](media://60b888dc-541b-4ec3-8041-3376edd140ae)

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


<details>
<summary>nParticles example</summary>

Here is how to instance a vrscene with nParticles. Import the .vrscene using the [Scene Manager.](https://docs-chaos.atlassian.net/wiki/spaces/VMAYA/pages/111742808) 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.


![image](media://ff926da9-66d3-48c1-92aa-72ec68b251d3)


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:


![image](media://889db7a2-0ba1-4dda-976b-a9d656ee10fa)


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. 


![image](media://feeaf4ab-b415-43bb-a1eb-da29e473ea72)


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!
</details>


## **Animation Overrides rollout**

---

** **

## **Render Overrides**

---


## **Scene Overrides**

---

---

### **Snippet Example**


**Example: Material Override**

```
// 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; }
```



**Example: User Attributes Override**

```
// 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](https://docs-chaos.atlassian.net/wiki/spaces/VMAYA/pages/111739309) 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*.
- <span style="color: #172b4d">When VRayObjectProperties is used on a VRayScene node, the </span><span style="color: #172b4d">**Override motion blur samples**</span><span style="color: #172b4d"> option has no effect, as it is baked to the VRayScene and cannot be changed.</span>
- <span style="color: #172b4d">V-Ray supports</span><span style="color: #172b4d">* .vrscenes*</span><span style="color: #172b4d"> containing files with long names on Windows when the corresponding option is enabled in the system settings. Refer to the official </span><span style="color: #172b4d">[Windows documentation](https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry)</span><span style="color: #172b4d"> for instructions on how to enable long file name support.</span>