Announcement

Collapse
No announcement yet.

Did pattern selection in vrscene change?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Click image for larger version

Name:	47x93Y2Vel.png
Views:	341
Size:	197.5 KB
ID:	1154943

    Google gave me this:
    http://www.grapheastegypt.com/vray/b...ons/index.html

    According to the article I should be able to do the override just like this:
    Code:
    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:
    Code:
    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:
    Code:
    Node <*> {
    visible=0;
    }
    // not working

    Code:
    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
    Attached Files

  • #2
    Please Help!

    Comment


    • #3
      Robert, sorry for the delay.
      It's being looked into, we'll reply as soon as we have any news, hopefully soon.
      Lele
      Trouble Stirrer in RnD @ Chaos
      ----------------------
      emanuele.lecchi@chaos.com

      Disclaimer:
      The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

      Comment


      • #4
        Originally posted by ^Lele^ View Post
        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

        Comment


        • #5
          No worries whatsoever!
          Lele
          Trouble Stirrer in RnD @ Chaos
          ----------------------
          emanuele.lecchi@chaos.com

          Disclaimer:
          The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

          Comment


          • #6
            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!
            Lele
            Trouble Stirrer in RnD @ Chaos
            ----------------------
            emanuele.lecchi@chaos.com

            Disclaimer:
            The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

            Comment


            • #7
              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

              Comment


              • #8
                Yep, you can use that to chain overrides.
                Hopefully the patterns will work there.
                Lele
                Trouble Stirrer in RnD @ Chaos
                ----------------------
                emanuele.lecchi@chaos.com

                Disclaimer:
                The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                Comment


                • #9
                  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:

                  Code:
                  -parameterOverride="redMTL@mtl_brdf_0.diffuse=AColor(0, 0, 1, 1)"
                  //WORKS
                  or all plugin instances of BRDFVRayMtl:

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

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

                  Comment


                  • #10
                    I'm no vrscene/standalone expert (as you may have gathered), i'll ask the relevant Dev for elucidations.
                    Lele
                    Trouble Stirrer in RnD @ Chaos
                    ----------------------
                    emanuele.lecchi@chaos.com

                    Disclaimer:
                    The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                    Comment


                    • #11
                      Thanks a lot! It's much appreciated!

                      Comment


                      • #12
                        > 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":

                        Code:
                        BRDFVRayMtl <red*> {
                           diffuse=AColor(0, 1, 0, 1);
                        }
                        Scene assembly file "load_scenes.vrscene:

                        Code:
                        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.
                        V-Ray For Houdini | V-Ray Hydra Delegate | VRayScene
                        andrei.izrantcev@chaos.com
                        Support Request

                        Comment


                        • #13
                          Originally posted by bdancer View Post
                          > 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":

                          Code:
                          BRDFVRayMtl <red*> {
                          diffuse=AColor(0, 1, 0, 1);
                          }
                          Scene assembly file "load_scenes.vrscene:

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

                          Comment


                          • #14
                            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:
                            Code:
                            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:
                            Code:
                            BRDFVRayMtl <red*> {
                            diffuse=AColor(0, 1, 0, 1);
                            }
                            This is the myVrscene.vrscene file that contains the box, lights and materials:
                            Code:
                            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:
                            Click image for larger version  Name:	gg9wtayi17[1].png Views:	0 Size:	37.9 KB ID:	1155704

                            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
                            Attached Files
                            Last edited by Fridayvfx; 29-07-2022, 05:30 PM.

                            Comment


                            • #15
                              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:
                              Code:
                              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;
                              }
                              V-Ray For Houdini | V-Ray Hydra Delegate | VRayScene
                              andrei.izrantcev@chaos.com
                              Support Request

                              Comment

                              Working...
                              X