Announcement

Collapse
No announcement yet.

setting output_splitRGB and output_splitfilename by MaxScript doesn't output elements

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

  • setting output_splitRGB and output_splitfilename by MaxScript doesn't output elements

    I'm adding a feature to my render manager script for enabling the Separate render channels feature of the VRay Frame buffer. I've found what I think is a bug and wanted to report it and see if anyone else can verify it.

    So I use this code to disable the Max Frame Buffer, enable the VRay Frame Buffer, enable the Separate render channels mode, enable the RGB output, and then set the path.

    Code:
    vr=renderers.current
    vr.output_on = true
    rendShowVFB = false
    vr.output_splitgbuffer = true
    vr.output_splitRGB = true
    vr.output_splitfilename = "MyOutputPath\\SubFolder\\FileName_.png"
    After running this code, I send it off to BackBurner and it only writes out the final image, no render elements. If after running this code, I click on the browse button in the VRay Frame Buffer Separate Render Channels Save Path, then click Save without changing anything, and then submitting it to BB, all of the render elements save out. The browse button is doing something that my code does not do. I have compared all of the MaxScript accessible values I know of before and after manually browsing the save path, and I can't find anything different. I've tried this on both 3.40.3 and 3.50.4, and the behavior is the same.

    Is there something additional I need to do in script to make this work?

    Secondary question / feature request:
    I would love it if VRay could save each render element into a subfolder of this save path. Preferably, the subfolder would be named the same as the render element. Is this something that can be added? If not, I need to explore adding a post render script to move the render element frames into a subfolder. I am doing this with the standard frame buffer render elements and it really cleans up the output folder structure and makes it much quicker for programs like After Effects to scan the folders when there are thousands of frames.

    Thanks!!!

    Ray
    =======================
    Ray Collett - Design Visualization Specialist
    WSP USA - Visualization and Data Intelligence
    Visualization & Data Intelligence Portfolio (vizportfolio.com)
    =======================

  • #2
    Hello,

    Your script is not setting the output_splitbitmap field which is of type Bitmap.

    This is needed because when splitting to separate files we still use the Max output and allow for any available file format in Max. When you press the browse button you see a file save dialog and there you choose the output format and fill in any options that it might have (compression levels, alpha etc..). Max uses all that info to create a Bitmap object that is set in the output_splitbitmap and we use it afterwards to create all the necessary files.

    Another problem is that the Bitmap object you set in MAXScript must be a valid and created bitmap object. I had to do this once and in the end I ended up writing something like this:

    Code:
    tmpbm = Bitmap 10 10 fileName:outName
    save tmpbm
    vr.output_splitbitmap = tmpbm
    which creates a small bitmap file on disk and assigns it to the output_splitbitmap field.
    Then after rendering I do:
    Code:
    close tmpbm
    free tmpbm
    deleteFile outName
    which frees the bitmap object and deletes the temporary file. The real render output will have the frame number appended to it's name so deleteFile outName won't delete it.

    This might not be the most elegant solution tough

    As for the elements to separate folders - something like this is already coming.

    Best regards,
    Yavor
    Yavor Rubenov
    V-Ray for 3ds Max developer

    Comment

    Working...
    X