Announcement

Collapse
No announcement yet.

How can I turn vfb Display Correction off in batch mode??

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

  • How can I turn vfb Display Correction off in batch mode??

    I'm using python in Maya 2022.3/Vray 5.20.01 to bake textures. I need both a beauty pass (color-corrected) and a utility pass (NOT color-corrected). Problem is, the display correction that makes the beauty looks good, causes the utility pass to be wrong. I'm outputting Reflection Roughness and Normal Map as baked textures, so I need those to maintain accurate values.

    I can disable Display Correction via python script while running in the interface but not in batch mode(!!!):
    [vray vfbControl] command error: vfbControl cannot be called in batch mode."

    Question 1: Why not?

    Question 2: Can I render both uncorrected and corrected results? In the way *.denoiser, *.zDepth, and *.Glare are separate files? I tried saving the Display Correction as a LUT, adding that to the stack, and setting primary Display Correction to None. But that does not save an un-corrected result!

    Question 3: Ugh, do I really have to save as uncorrected EXR and build a python toolchain around OCIO, to get both results?

    Question 4: Seriously, why is it that vfb layers can affect the batch render result, but can't be disabled/modified in batch?????
    Last edited by AGravois; 03-06-2022, 07:51 PM.

  • #2
    I don't think Display Correction affects vector elements even if the "Save in image" option is enabled. Note that "when Normals Render Element is saved as a separate render channel, its output value is kept between [0;1] range; if saved as a multichannel .exr, its output value is in the range from -1 to 1." Maybe this is the difference you're noticing?
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Thank you for the reply

      To clarify, I am not using render elements or multichannel EXRs to generate these passes. VRay GPU doesn't support Reflection Roughness as an element. And, if I use EXRs, my pipeline becomes much more complex.
      Attached Files

      Comment


      • #4
        (sad: forum ate half of my reply)
        All of these outputs are baked in texture space, for use in real-time GLTF model. I am trying to 'swizzle' the Occlusion, Roughness, and Metalness into a single texture, per GLTF spec. It would keep my pipeline simpler if I could output a usable PNG straight from Maya/VRay. And I can! Except for this one little problem...

        the texture sample above shows a ORM (Occlusion, Roughness, Metalness) texture output. Note how Roughness (green channel) gets bumped from 0.25 to 0.388!

        Comment


        • #5
          Not sure if there's a one-click method of saving both display corrected and uncorrected images. Wouldn't it be easier to save the images without corrections and apply the LUT file you exported in post?
          Also, I'll ask around to see why doesn't Batch allow the VFB interface.
          Aleksandar Hadzhiev | chaos.com
          Chaos Support Representative | contact us

          Comment


          • #6
            Thank you! Hey, it can be a seven-click-method, as long as all of those clicks are lines of Python code! Processing hundreds of files, so everything has to be automated.

            My reluctance to exporting uncorrected and applying LUT in post is simply that I would have to build that in Python. Doable but non-trivial. Unknown hazards, including color management in Python. XD

            Comment


            • #7
              It seems we've actually implemented the vfbControl access through cmd Batch in the internal builds. There will be a stable release in the coming weeks. For now, using Batch through the Maya interface may be used as a solution.
              Aleksandar Hadzhiev | chaos.com
              Chaos Support Representative | contact us

              Comment


              • #8
                Oh indeed? That's exciting! I shall go watch the beta builds to await its debut.

                As for now: it's true this script could run in Maya Interface BUT the reason I prefer command line batch is that the script & its inputs can be crashy. If Maya crashes, as it does, a lot, I need an outside script to restart the process.

                So, the question I have to solve is: will it be more difficult to write a script that launches Maya UI and then a Python script within Maya (non-trivial, apparently), OR a script that renders to EXR and applies a LUT to create a PNG? I'll look into it. Thanks!

                Comment

                Working...
                X