Announcement

Collapse
No announcement yet.

V-Ray standalone doesn't respect .vrscene settings?

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

  • V-Ray standalone doesn't respect .vrscene settings?

    Hi there,

    We want to use V-ray standalone for batch rendering of .vrscene scenes. We exported scenes from 3ds max using the following command

    Code:
    rt.execute(f'vrayExportVRScene "{output_dir}\\{scene_name}.vrscene" exportSetting:true startFrame:{start_frame} endFrame:{end_frame} exportRegion:false')

    When we render such scene, we see the following issues:
    • Resolution set in Render settings is not respected
    • Rendering device type is CPU (VFB shows CPU)
    • Output image is noisy, seems like denoising is not done at all?

    We see this block of params in .vrscene file but it seems like it is not being used?

    Code:
    SettingsRTEngine rtEngine_settings {
      gi_depth=3;
      cpu_bundle_size=128;
      cpu_samples_per_pixel=4;
      gpu_bundle_size=192;
      gpu_samples_per_pixel=16;
      low_gpu_thread_priority=0;
      coherent_tracing=0;
      stereo_mode=0;
      stereo_eye_distance=6.5;
      stereo_focus=2;
      opencl_texsize=512;
      opencl_resizeTextures=0;
      opencl_textureFormat=2;
      progressive_samples_per_pixel=1;
      undersampling=2;
      disable_render_elements=0;
      max_render_time=0.5;
      max_sample_level=2;
      noise_threshold=0.1;
      max_draw_interval=150;
      min_draw_interval=50;
      interactive=0;
      enable_bucket_sampler=0;
      out_of_core=0;
      out_of_core_textures=0;
    }​
    We run V-Ray standalone like this

    Code:
    vray.exe -sceneFile="scene.vrscene" -imgFile="vray_renders\render.png" -camera="Camera0"

    What settings do we need to provide via cmdline to mimic the render output produced by 3ds Max V-Ray GUI/plugin? What parameters do we need to use for standalone tool? We thought the Standalone will read all settings from .vrscene file?

    Best wishes,
    Petr
    Last edited by petr_leontev; 12-03-2025, 03:47 AM.

  • #2
    You have forgotten to add the -rtengine=5/7 (CUDA/RTX) flag when using Standalone. This will switch the engine to GPU and consider the RTEngine settings written in the .vrscene.

    Originally posted by petr_leontev View Post
    Resolution set in Render settings is not respected
    I'm not seeing any issues with the Resolution - it is correctly taken from the Common rollout and written as img_width and img_height in the SettingsOutput section of the .vrscene.

    Originally posted by petr_leontev View Post
    Rendering device type is CPU (VFB shows CPU)
    Not sure what you mean by this; however, it's probably related to the above-mentioned missing flag.

    Originally posted by petr_leontev View Post
    Output image is noisy, seems like denoising is not done at all?
    The denoiser result will be saved as a separate effectsResult channel. Make sure you are previewing it and not the undenoised RGB channel. Also, if you do not plan to denoiser via the vdenoise.exe tool, ensure the VRayDenoiser render element's Mode is set to either "Show/Hide denoiser result channel".
    Last edited by hermit.crab; 12-03-2025, 12:52 AM.
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Thank you hermit.crab Your answers are truly helpful.

      Just to clarify:
      The denoiser result will be saved as a separate effectsResult channel
      How can I find the documentation for that, I mean all possible output elements? We want to use V-Ray Standalone pipeline but we want it to 100% match the renders we are getting when using 3ds Max V-Ray GUI mode (Render Setup dialog).

      You have forgotten to add the -rtengine=5/7 (CUDA/RTX) flag when using Standalone
      So then providing -rtengine is a must even though .vrscene already has all the settings?

      ensure the VRayDenoiser render element's Mode is set to either "Show/Hide denoiser result channel".
      Thank you, that is helpful!


      Finally, do we also need to provide rtNoise and rtTimeLimit params via cmdline to match our setup in Render Setup dialog? Or those params will be taken from .vrscene file? Sorry, it is a bit unclear how params from .vrscene will be used..

      Thank you.
      Last edited by petr_leontev; 12-03-2025, 03:47 AM.

      Comment


      • #4
        Originally posted by petr_leontev View Post
        How can I find the documentation for that, I mean all possible output elements? We watch to use V-Ray Standalone pipeline but we want it to 100% match the renders we are getting when using 3ds Max V-Ray GUI mode (Render Setup dialog).
        The creation of the effectsResult channel is documented in the VRayDenoiser element documentation page. Rendering with the GUI also creates it with the following asterisk: if the output goes through 3ds Max (f.e, the Separate Render channels output), it's named differently: orig_RGB (non-denoised) and RGB (denoised).

        Otherwise, I'm not exactly sure what you mean by "all possible output elements". Could you clarify?

        Originally posted by petr_leontev View Post
        So then providing -rtengine is a must even thought .vrscene already has all the settings?
        Vrscenes are written, so to speak, universally. Both CPU and GPU settings are exported so you can freely choose whichever engine you'd like to render them afterward. This is why it is necessary to add the -rtEngine flag (also STD defaults to 0, which is CPU).

        Originally posted by petr_leontev View Post
        4. Do we need to provide -rtNoise and rtTimeLimit params via cmdline to match our setup in Render Setup dialog?
        Adding these flags is not necessary. With them, however, you can override the ones exported from the Render Setup. Example scenario: you've already exported a .vrscene thinking you were going to use CPU to render, but later decide to switch to GPU. Since you haven't touched the GPU settings, the defaults were exported. Rather than manually adjusting them in the .vrscene, you could use these flags as overrides.
        Aleksandar Hadzhiev | chaos.com
        Chaos Support Representative | contact us

        Comment


        • #5
          Thank you Aleksandar!

          all possible output elements
          I meant will V-Ray Standalone produce more than 2 layers/images by default in some cases? Currently we are getting 2 images/1 frame. We expected only one when started using V-Ray Standalone.

          Vrscenes are written, so to speak, universally. Both CPU and GPU settings are exported so you can freely choose whichever engine you'd like to render them afterward. This is why it is necessary to add the -rtEngine flag (also STD defaults to 0, which is CPU).
          Thank you, all good now.


          Since you haven't touched the GPU settings, the defaults were exported. Rather than manually adjusting them in the .vrscene, you could use these flags as overrides.
          Great! Understood.


          Also, if you do not plan to denoiser via the vdenoise.exe tool, ensure the VRayDenoiser render element's Mode is set to either "Show/Hide denoiser result channel".
          Regarding denoiser, is there any benefit in using vdenoise.exe VS what is already set up in Render Elements (we have only one element there -> V-Ray Denoiser). What could be good use case for vdenoise.exe​?

          Thanks!
          Last edited by petr_leontev; 12-03-2025, 05:57 AM.

          Comment


          • #6
            Originally posted by petr_leontev View Post
            I meant will V-Ray Standalone produce more than 2 layers/images by default in some cases? Currently we are getting 2 images/1 frame. We expected only one when started using V-Ray Standalone.
            I'm not sure. You are getting 2 images per frame from STD and 1 from 3ds Max GUI? What kind of layers are saved/not saved? Maybe attach a simple scene for this so I can take a look.

            Originally posted by petr_leontev View Post
            Regarding denoiser, is there any benefit in using vdenoise.exe VS what is already set up in Render Elements (we have only one element there -> V-Ray Denoiser). What could be good use case for vdenoise.exe​?
            It's better for animations since it considers the previous and subsequent frame when denoising, hence yielding better results and less possibility of flickers. Check docs page here.
            Aleksandar Hadzhiev | chaos.com
            Chaos Support Representative | contact us

            Comment


            • #7
              Thanks hermit.crab


              Rendering from 3ds max GUI via Render Setup dialog produces only 1 image / 1 frame for some reason (*effects one is not produced). And re Denoiser, 3ds Max one set up via Render Elements doesn't do that type of denoising that you described?

              I've sent you DM with the link to the scene.

              Comment


              • #8
                Originally posted by petr_leontev View Post
                Rendering from 3ds max GUI via Render Setup dialog produces only 1 image / 1 frame for some reason (*effects one is not produced).
                Thanks. The attached scene doesn't have an output set. How exactly are you saving the rendered images? I have a hunch you are using the native 3ds Max Render Output (Render Setup > Common), which does not save the V-Ray render elements (only 1 image of what you see in the VFB), unless the V-Ray Frame Buffer is disabled (which is not a good idea, since VRayDenoiser works only in the VFB).

                Originally posted by petr_leontev View Post
                And re Denoiser, 3ds Max one set up via Render Elements doesn't do that type of denoising that you described?
                ​Yes, even on the VRayDenoiser page (green square at the start), it's recommended that one use the vdenoise.exe tool for animations.
                Aleksandar Hadzhiev | chaos.com
                Chaos Support Representative | contact us

                Comment


                • #9
                  Thanks. The attached scene doesn't have an output set.
                  What does that mean? We are rendering scenes using pymxs / maxscript and we don't really set up any kind of output, we just call

                  Code:
                  rt.render(
                    frameRange=rt.Interval(start_frame, end_frame),
                    outputFile=outp_file,
                    progressbar=False,
                    vfb=False
                  )


                  I have a hunch you are using the native 3ds Max Render Output (Render Setup > Common), which does not save the V-Ray render elements
                  That is right!

                  Comment


                  • #10
                    Originally posted by petr_leontev View Post
                    What does that mean? We are rendering scenes using pymxs / maxscript and we don't really set up any kind of output, we just call
                    My bad, I forgot about that. Tested and confirmed - outputting the file like so will make it go through the Common output. This effectively saves the effectsResult channel only.

                    If you really wish for a similar behaviour with Standalone (1 denoised image per frame), you can add this line in the SettingsOutput plugin in the .vrscene:
                    Code:
                    img_dontSaveRgbChannel=1;
                    This will not save the original (non-denoised RGB) channel. You'll get only the effectsResult (denoised channel).
                    Attached Files
                    Aleksandar Hadzhiev | chaos.com
                    Chaos Support Representative | contact us

                    Comment


                    • #11
                      hermit.crab

                      Additional question about vrayExportVRScene:

                      - What flags/options should be set to match what happens in 3ds max GUI mode i.e. when you click Render in Render Setup dialog? Do we need exportNodes:true?

                      - What flags/options actually required for standalone to perform rendering similar to GUI mode?


                      Comment


                      • #12
                        Originally posted by hermit.crab View Post

                        My bad, I forgot about that. Tested and confirmed - outputting the file like so will make it go through the Common output. This effectively saves the effectsResult channel only.

                        If you really wish for a similar behaviour with Standalone (1 denoised image per frame), you can add this line in the SettingsOutput plugin in the .vrscene:
                        Code:
                        img_dontSaveRgbChannel=1;
                        This will not save the original (non-denoised RGB) channel. You'll get only the effectsResult (denoised channel).

                        Thank you a lot! That is really helpful!

                        Comment


                        • #13
                          Originally posted by petr_leontev View Post
                          - What flags/options should be set to match what happens in 3ds max GUI mode i.e. when you click Render in Render Setup dialog? Do we need exportNodes:true?
                          The "exportNodes" flag refers to the Export Nodes option in the .vrscene exporter (V-Ray > .vrscene exporter). It works only when "Separate Files' (separateFiles: true) is active. It's on by default with or without separating the .vrscene, so there's no need to input this flag. The full list of flags can be found here, by the way.

                          Otherwise, what you've already mentioned should give you identical results. If not, there'll probably be a warning in the log saying that something cannot be exported, etc.
                          Code:
                          vray.exe -sceneFile="scene.vrscene" -imgFile="vray_renders\render.png" -camera="Camera0" -rtEngine=5/7
                          Originally posted by petr_leontev View Post
                          - What flags/options actually required for standalone to perform rendering similar to GUI mode?
                          No need to set additional flags. STD will render with whatever settings you've exported to the .vrscene.
                          Aleksandar Hadzhiev | chaos.com
                          Chaos Support Representative | contact us

                          Comment

                          Working...
                          X