Did pattern selection in vrscene change?

Hi!

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

Google gave me this:
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:

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:

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:

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

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

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 (1.92 KB)

Please Help! :frowning:

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! :slight_smile:

-Robert

No worries whatsoever!

Allright, we found what the issue was, maybe. :slight_smile:
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!

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

Yep, you can use that to chain overrides.
Hopefully the patterns will work there.

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:


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

or all plugin instances of BRDFVRayMtl:


-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:


-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

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

Thanks a lot! It’s much appreciated! :slight_smile:

> 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”:


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

Scene assembly file "load_scenes.vrscene:


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 ! :slight_smile:
I’ll try it out, thank you very much!

-Robert

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:

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:


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

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

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:

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 (40.9 KB)

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:


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

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

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?


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