# Did pattern selection in vrscene change?

**URL:** <https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234>\
**Category:** Issues\
**Created:** [July 23, 2022, 11:51pm UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234 "2022-07-23T23:51:49Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fridayvfx](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/fridayvfx/32/20912_2.png) [@Fridayvfx](https://forums.chaos.com/u/Fridayvfx)\
**Post date:** [July 23, 2022, 11:51pm UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/1 "2022-07-23T23:51:49Z")

</div>

Hi!

I’m trying to override a parameter in a very simple vrscene with a red box and a light.  
Here is my scene:

 ![47x93Y2Vel.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/c/e/ce4a9feb0e94f58ab9d65aca443cc3dd579662c4.jpeg)

Google gave me this:  
[http://www.grapheastegypt.com/vray/blog/how-to-move-v-ray-scenes-between-applications/index.html](http://www.grapheastegypt.com/vray/blog/how-to-move-v-ray-scenes-between-applications/index.html)

According to the article I should be able to do the override just like this:

```auto
BRDFVRayMtl <red*> {
diffuse=AColor(0, 1, 0, 1);
}
// not working

```

I can only get it to work if I’m overwriting very specifically like so:

```auto
BRDFVRayMtl redMTL@mtl_brdf_0 {
diffuse=AColor(0, 1, 0, 1);
}
// working

```

If I try other pattern selections on different parameters, it’s also not working:

```auto
Node <*> {
visible=0;
}
// not working

```

```auto
LightDome <VRayLight*> {
enabled=0;
}
// not working

```

Also, if I add the “clay override” snippet from the article, that seems to not work at all.

I’m using Vray Standalone 5.20.23

vrscene file is attached to this post.  
Or view it here: [http://fridayvfx.com/clipupload/myVrscene.vrscene](http://fridayvfx.com/clipupload/myVrscene.vrscene)

p.s. I wonder if It’s possible to do multiline comments in vrscene files? I checked /\*comment\*/ but that does not seem to work.

Thank you for any input on this!  
-Robert  
[myVrscene.zip](https://forums.chaos.com/uploads/short-url/iagRUXozISyv1sp6Dyj2bprYl8u.zip) (1.92 KB)

---

<div class="post-metadata">

**Author:** ![Fridayvfx](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/fridayvfx/32/20912_2.png) [@Fridayvfx](https://forums.chaos.com/u/Fridayvfx)\
**Post date:** [July 25, 2022, 7:33pm UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/2 "2022-07-25T19:33:39Z")

</div>

Please Help! ☹

---

<div class="post-metadata">

**Author:** ![\_Lele](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/_lele/32/49986_2.png) [@\_Lele](https://forums.chaos.com/u/_Lele)\
**Post date:** [July 26, 2022, 11:48am UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/3 "2022-07-26T11:48:07Z")

</div>

Robert, sorry for the delay.  
It’s being looked into, we’ll reply as soon as we have any news, hopefully soon.

---

<div class="post-metadata">

**Author:** ![Fridayvfx](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/fridayvfx/32/20912_2.png) [@Fridayvfx](https://forums.chaos.com/u/Fridayvfx)\
**Post date:** [July 26, 2022, 11:49am UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/4 "2022-07-26T11:49:48Z")

</div>

> [@\_Lele](#):
>
> Robert, sorry for the delay.  
> It’s being looked into, we’ll reply as soon as we have any news, hopefully soon.

Thanks man. Sorry I don’t usually want to cause any stress, but unfortunately it’s a bit urgent on my side! Thanks for looking into it! 🙂

-Robert

---

<div class="post-metadata">

**Author:** ![\_Lele](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/_lele/32/49986_2.png) [@\_Lele](https://forums.chaos.com/u/_Lele)\
**Post date:** [July 26, 2022, 11:52am UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/5 "2022-07-26T11:52:30Z")

</div>

No worries whatsoever!

---

<div class="post-metadata">

**Author:** ![\_Lele](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/_lele/32/49986_2.png) [@\_Lele](https://forums.chaos.com/u/_Lele)\
**Post date:** [July 26, 2022, 4:32pm UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/6 "2022-07-26T16:32:01Z")

</div>

Allright, we found what the issue was, maybe. 🙂  
You’re trying to override the material from inside the file, but you should do that adding the override code to the override snippet window in the vrscene loader.  
from the article you linked: \> For example, by adding the following code _ **to the Override Snippet** _, you can assign a new clay material to all the objects in the scene.

You can, i am told, add your overrides to a separate vrscene file, and then load them with the “From file” option found in the vrscene loader.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Fridayvfx](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/fridayvfx/32/20912_2.png) [@Fridayvfx](https://forums.chaos.com/u/Fridayvfx)\
**Post date:** [July 26, 2022, 4:43pm UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/7 "2022-07-26T16:43:45Z")

</div>

Hey ^Lele^, thank you for your answer.

ohhh.. that means I cannot use that syntax within a vrscene file? Deamn, that’s very unfortunate.  
I’m trying to assemble multiple previously exported vrscene files “on the fly” without loading them in a 3d application again.

What I mean is, I assemble include commands in a text editor, and then render that assembly file using standalone.

Is there any way I can get this to work? Meaning, overriding a bunch of properties from within vrscene without explicitly having to overwrite for each object or material?

I saw that the commandline options come with a " **-parameterOverride"** - can I get some sort of pattern selection to work here?

Thanks again!  
-Robert

---

<div class="post-metadata">

**Author:** ![\_Lele](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/_lele/32/49986_2.png) [@\_Lele](https://forums.chaos.com/u/_Lele)\
**Post date:** [July 26, 2022, 5:01pm UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/8 "2022-07-26T17:01:54Z")

</div>

Yep, you can [use that to chain overrides](https://docs.chaos.com/display/VNS/V-Ray+Standalone+Command+Line+Options).  
Hopefully the patterns will work there.

---

<div class="post-metadata">

**Author:** ![Fridayvfx](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/fridayvfx/32/20912_2.png) [@Fridayvfx](https://forums.chaos.com/u/Fridayvfx)\
**Post date:** [July 26, 2022, 7:56pm UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/9 "2022-07-26T19:56:21Z")

</div>

hey @_Lele thanks, the parameter overrides work as expected. But it only allows me to override one or more parameters at the time when I use very specific naming, in my vrscene file for example I got to override a single material diffuse:

```auto

-parameterOverride="redMTL@mtl_brdf_0.diffuse=AColor(0, 0, 1, 1)"
//WORKS

```

or all plugin instances of BRDFVRayMtl:

```auto

-parameterOverride="BRDFVRayMtl::diffuse=AColor(0, 0, 1, 1)"
//WORKS

```

I could not get any pattern selection to work. I’ve tried a couple of things like these, but I don’t think it’s made to work like that:

```auto

-parameterOverride="<red*>@mtl_brdf_0.diffuse=AColor(0, 0, 1, 1)"
//not working

```

I mean, in the end I’d just like to be able to override parameters for multiple materials at once without having to specify each one specifically.  
Do you think it’s possible?

Thank you  
-Robert

---

<div class="post-metadata">

**Author:** ![\_Lele](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/_lele/32/49986_2.png) [@\_Lele](https://forums.chaos.com/u/_Lele)\
**Post date:** [July 26, 2022, 8:00pm UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/10 "2022-07-26T20:00:26Z")

</div>

I’m no vrscene/standalone expert (as you may have gathered), i’ll ask the relevant Dev for elucidations.

---

<div class="post-metadata">

**Author:** ![Fridayvfx](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/fridayvfx/32/20912_2.png) [@Fridayvfx](https://forums.chaos.com/u/Fridayvfx)\
**Post date:** [July 26, 2022, 8:01pm UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/11 "2022-07-26T20:01:32Z")

</div>

Thanks a lot! It’s much appreciated! 🙂

---

<div class="post-metadata">

**Author:** ![bdancer](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bdancer/32/52257_2.png) [@bdancer](https://forums.chaos.com/u/bdancer)\
**Post date:** [July 27, 2022, 2:18pm UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/12 "2022-07-27T14:18:20Z")

</div>

\> I saw that the commandline options come with a " **-parameterOverride"** - can I get some sort of pattern selection to work here?

No.

1. You could hack this by assembling the scene with VRayScene node instead of #include and place you overrides as VRayScene plugin parameters.

Overrides file “my\_overrides.vrscene”:

```auto

BRDFVRayMtl <red*> {
   diffuse=AColor(0, 1, 0, 1);
}

```

Scene assembly file "load\_scenes.vrscene:

```auto

VRayScene loadScene1 {
   filepath="/path/to/vrscene1";
   use_overrides=1;
   override_filepath="/path/to/my_overrides.vrscene";
}

VRayScene loadScene2 {
   filepath="/path/to/vrscene2";
   use_overrides=1;
   override_filepath="/path/to/my_overrides.vrscene";
}

```

The difficult part here is that VRayScene will not load render settings or render elements, you’ll have to load those separately somehow.

2. You could use V-Ray Application SDK and Python bindings instead of Standalone. This way you could match and override whatever you wish with a few lines of Python.

---

<div class="post-metadata">

**Author:** ![Fridayvfx](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/fridayvfx/32/20912_2.png) [@Fridayvfx](https://forums.chaos.com/u/Fridayvfx)\
**Post date:** [July 27, 2022, 8:36pm UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/13 "2022-07-27T20:36:37Z")

</div>

> [@bdancer](#):
>
> \> I saw that the commandline options come with a " **-parameterOverride"** - can I get some sort of pattern selection to work here?
> 
> No.
> 
> 1. You could hack this by assembling the scene with VRayScene node instead of #include and place you overrides as VRayScene plugin parameters.
> 
> Overrides file “my\_overrides.vrscene”:
> 
> ```auto
> 
> BRDFVRayMtl <red*> {
> diffuse=AColor(0, 1, 0, 1);
> }
> 
> ```
> 
> Scene assembly file "load\_scenes.vrscene:
> 
> ```auto
> 
> VRayScene loadScene1 {
> filepath="/path/to/vrscene1";
> use_overrides=1;
> override_filepath="/path/to/my_overrides.vrscene";
> }
> 
> VRayScene loadScene2 {
> filepath="/path/to/vrscene2";
> use_overrides=1;
> override_filepath="/path/to/my_overrides.vrscene";
> }
> 
> ```
> 
> The difficult part here is that VRayScene will not load render settings or render elements, you’ll have to load those separately somehow.
> 
> 2. You could use V-Ray Application SDK and Python bindings instead of Standalone. This way you could match and override whatever you wish with a few lines of Python.

Ohhh that would totally work for me @bdancer ! 🙂  
I’ll try it out, thank you very much!

-Robert

---

<div class="post-metadata">

**Author:** ![Fridayvfx](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/fridayvfx/32/20912_2.png) [@Fridayvfx](https://forums.chaos.com/u/Fridayvfx)\
**Post date:** [July 29, 2022, 11:26pm UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/14 "2022-07-29T23:26:35Z")

</div>

Hey @bdancer I’ve just tried this out,  
unfortunately V-Ray Standalone instantly crashes after the render process starts.

This is the file that I call:

```auto
VRayScene loadScene1 {
filepath="C:\Users\rober\AppData\Local\Temp\debugging\myVrscene.vrscene";
use_overrides=1;
override_filepath="C:\Users\rober\AppData\Local\Temp\debugging\myOverride.vrscene";
}

```

This is the “myOverrides” vrscene:

```auto

BRDFVRayMtl <red*> {
diffuse=AColor(0, 1, 0, 1);
}

```

This is the myVrscene.vrscene file that contains the box, lights and materials:

```auto
GeomStaticMesh Mesh_16854289329045109079 { ..
}
Node Box001@node_180{ ..
}
Mt1Sing1eBRDF { ..
}
BRDFVRayMt1 { ..
}
LightDome { ..
}
RenderView renderView { ..
}
SettingsUnitsInfo settingsUnits { ..
}
SettingsOutput output _settings { ..
}

```

when I execute it in vray standalone I get a crash and a dump file:

 ![gg9wtayi17[1].png](https://europe1.discourse-cdn.com/chaosprd/original/3X/5/7/5746046ddac77b296ab9c525b78b9333e37ea83a.png)

If you want to try to recreate it, i’ve attached the crash dump and the vrscene files to this post. (debugging.zip)

Would it be possible for you to take a look at this? It’s much appreciated!

-Robert  
[debugging.zip](https://forums.chaos.com/uploads/short-url/on38tkdJCqZYyU9pB5bDXjRhGCL.zip) (40.9 KB)

---

<div class="post-metadata">

**Author:** ![bdancer](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bdancer/32/52257_2.png) [@bdancer](https://forums.chaos.com/u/bdancer)\
**Post date:** [July 30, 2022, 12:02pm UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/15 "2022-07-30T12:02:21Z")

</div>

Sorry, I forgot that you have to specify the transform. Also VRayScene won’t load RenderView (camera) as well, so you’ll have to add camera:

```auto

VRayScene loadScene1 {
   filepath=".\myVrscene.vrscene";
   use_overrides=1;
   override_filepath=".\myOverride.vrscene";
   transform=TransformHex("0000803F0000000000000000000000000000803F0000000000000000000000000000803F00000000000000000000000000000000000000000000000000000000");
}

RenderView renderView {
   transform=TransformHex("F304353FF30435BF00000000F204B53EF204B53ED8B35D3F71C41CBF71C41CBFFEFFFF3E00000000000000E0148B57C0000000E0671F57C000000000BAEF5440");
   fov=0.7853982;
   focalDistance=200;
   clipping=0;
   clipping_near=0.1;
   clipping_far=-1e+30;
   orthographic=0;
   ortho_adjust_to_scene=1;
   use_scene_offset=1;
}

```

---

<div class="post-metadata">

**Author:** ![Fridayvfx](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/fridayvfx/32/20912_2.png) [@Fridayvfx](https://forums.chaos.com/u/Fridayvfx)\
**Post date:** [July 31, 2022, 8:03pm UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/16 "2022-07-31T20:03:14Z")

</div>

@bdancer it works, you are a wonderful human being! Thank you! 8)😛

---

<div class="post-metadata">

**Author:** ![Fridayvfx](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/fridayvfx/32/20912_2.png) [@Fridayvfx](https://forums.chaos.com/u/Fridayvfx)\
**Post date:** [August 6, 2022, 12:01am UTC](https://forums.chaos.com/t/did-pattern-selection-in-vrscene-change/111234/17 "2022-08-06T00:01:26Z")

</div>

Hello @bdancer ,

sorry I have to bother you once more, but I’m not sure if it’s a bug.

If I use standalone to render this file, and I use the -remap parameter in order to string replace paths, it does not seem to do it to the vrscene inside of the “loadScene1” definition.  
Only to top level “includes” - is there a way it can be done recursively?

```auto

VRayScene loadScene1 {
filepath=".\myVrscene.vrscene";
use_overrides=1;
override_filepath=".\myOverride.vrscene";
transform=TransformHex("0000803F000000000000000000 0000000000803F0000000000000000000000000000803F0000 00000000000000000000000000000000000000000000000000 00");
}

RenderView renderView {
transform=TransformHex("F304353FF30435BF00000000F2 04B53EF204B53ED8B35D3F71C41CBF71C41CBFFEFFFF3E0000 0000000000E0148B57C0000000E0671F57C000000000BAEF54 40");
fov=0.7853982;
focalDistance=200;
clipping=0;
clipping_near=0.1;
clipping_far=-1e+30;
orthographic=0;
ortho_adjust_to_scene=1;
use_scene_offset=1;
}

```

Thanks  
-Robert
