Announcement

Collapse
No announcement yet.

Vray Sanity check

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

  • #16
    Sucks even more though, that I DO always get that annyoing message, that I´m about to save out a sequence from 3ds max itsel, when I have frame buffer save enabled...

    Comment


    • #17
      But we´re getting off topic from the wishlist...

      Comment


      • #18
        When I initially did my pre-render script, there was some choises to be made. Some users may get annoyed with it, while others would like it.
        In some situations you would want to cancel the render automatically due to one of the checks coming back negative. At the time, I didnt get around to figuring out how to cancel a render via maxscript and at the time it didnt seem possible.

        So to sum up, how do you guys see this working? Would all these checks be done when you click render, and just warnings pop up, in which case you can then manually cancel the render, or should it be a toolbar kind of button that you can click at any time to see if the scene is "render ready"?
        I havent tested the current script with BB submission yet, so not sure if it would even work with BB.

        Either way, it can do with a bit of an upgrade
        Kind Regards,
        Morne

        Comment


        • #19
          Our NY studio has one as part of a new suite of tools everyone there uses.

          What they find very useful is 'click to fix'. although i've just noticed that click to fix should be added to VFB region enabled...
          I mostly ignore it as if i'm doing something it thinks is stupid it was probably on purpose.

          Comment


          • #20
            Yeah, I also like the idea of "click to fix".

            For me personally I only need any check, when I submit to the farm. If I render locally its 97% of the time for testing stuff and I don´t wanna be bothered with anything. But submitting to the farm right before going home and then coming back to nothing is just stupid. Especially when things have changed without your conscious doing (like the missing output).
            I have to get back to the deadline sanity check... it doesn´t seem to be possible to get just the script, you always have to g through the hole installation and setup process as it seems...

            Comment


            • #21
              here it is pretty basic. I boiled it down to „vfb region off” and „dr on” executed during sending to farm. plus a small toolbar with some buttons I manually click when sending something unusual.
              Marcin Piotrowski
              youtube

              Comment


              • #22
                Digging out this thread again, as our last productions for this year wrapped and there is stil some time left over for optimization...

                I just looked into the deadline submisisons script again and already got stuck at installation (just like the last time I tried a year ago or so...
                Also: Since we´re not using deadline, I don´t wanna install almost 1 gb of files, some of what might end up constantly running in the background, just to get access to that script.

                I got a head start from someone in the stack facebook group, that I´m planning to modify, so I can just have a one button error check, nothing fancy.
                But now I´m stuck trying to figure out how to modify teh script to check if the vray framebuffer is enabled and an output path is defined to save separate channels.

                Code:
                /*
                    Render Sanity (with Vray Support=
                    Created 2019-12-15
                    Modifed 2019-12-15
                    Tested in 3d studio max 2019 and Vray Next 2.1
                    Author: Tony Dugard
                
                    Do a render sanity before rendering. 
                
                    v1.0 :
                    - Check if max render region is enabled
                    - Check if vray render region is enabled
                    - Check if the render view is a camera
                    - Check if the render element list is empty
                    - Check if the Vray Raw output path is enabled
                    - Check if the Vray Raw output path is emtpy
                */
                
                ---macroScript mcr_render_sanity Category:"td_scripts" Tooltip:"Render with Sanity"
                (
                    -- Check Max Render Region (return true if region active)
                    fn is_max_render_region_enabled = return (getrendertype() != #view)
                
                    -- Check Output File enabled
                
                      -- Check Vray Render Region (return true if region active)
                    fn is_vray_render_region_enabled =
                    (
                        vray_render_region = vfbControl #getregion
                        return vray_render_region[1][1] != 0 or vray_render_region[1][2] != 0 or vray_render_region[1][3] != 0 or vray_render_region[1][4] != 0
                    )
                
                    -- Check Vray Filename Enabled (return true if empty or disabled)
                    fn is_vray_filename_empty_or_disabled = 
                    (
                        vray_render = renderers.current
                        if (vray_render.output_on=true) then
                        (
                            if (vray_render.output_FileName != "") then return false
                            else return true
                        )
                        else return true
                    )
                
                    -- Check if there is some render elements
                    fn no_render_elements =
                    (
                        rem = maxOps.GetCurRenderElementMgr() 
                        return rem.NumRenderElements() == 0
                    )
                
                    fn no_camera_to_render =
                    (
                        viewport_id_to_render
                
                        if rendUseActiveView then
                        (
                            viewport_id_to_render = viewport.activeViewport 
                        )
                        else
                        (
                            viewport_id_to_render = rendViewIndex 
                        )
                        return (viewport.getType index:viewport_id_to_render) != #view_camera
                    )
                
                    fn render_sanity =
                    (
                        clearListener()
                
                        s_dialog_title = "Render Sanity 1.0"
                
                        s_title = "Those following errors have been reported :"
                
                        s_title_sanity_generic = "[Generic Sanity]"    
                        s_title_sanity_vray = "[Vay Sanity]"
                
                        s_error_prefix = "[ERROR]"
                
                        s_error_render_region_enabled = "Render Region Enabled"
                        s_error_no_render_elements = "No render elements"
                        s_error_no_camera = "No camera to render"
                        s_error_vray_render_region_enabled = "Vray Render Region Enabled"
                        s_error_vray_filename_empty_or_disabled = "Missing Vray Filename or not Enabled"
                
                        s_error_count = " errors reported"
                
                        s_continue_rendering = "Do you still want to render ?"
                
                        error_count = 0
                
                        s_result = s_title + "\n"
                        s_result += "\n" + s_title_sanity_generic + "\n\n" 
                
                        -- Check Max Region
                        if is_max_render_region_enabled() then 
                        (
                            s_result += s_error_prefix + " : "+ s_error_render_region_enabled + "\n"
                            error_count += 1
                        )
                
                        -- Check Render Elements
                        if no_render_elements() then 
                        (
                            s_result += s_error_prefix + " : "+ s_error_no_render_elements + "\n"
                            error_count += 1
                        )
                        -- Check Camera
                        if no_camera_to_render() then 
                        (
                            s_result += s_error_prefix + " : "+ s_error_no_camera + "\n"
                            error_count += 1
                        )
                
                        -- Checks for Vray
                        render_engine = renderers.current
                        if matchPattern ((classof render_engine) as string) pattern:"V_Ray*" then
                        (
                            s_result +=  "\n" + s_title_sanity_vray + "\n\n" 
                
                            if is_vray_render_region_enabled() then 
                            (
                                s_result += s_error_prefix + " : "+ s_error_vray_render_region_enabled + "\n"
                                error_count += 1
                            )
                            if is_vray_filename_empty_or_disabled() then 
                            (
                                s_result += s_error_prefix + " : "+ s_error_vray_filename_empty_or_disabled + "\n"
                                error_count += 1
                            )
                        )
                
                        s_result += "\n" + (error_count as string) + s_error_count
                
                        s_result += "\n\n" + s_continue_rendering
                
                        if error_count > 0 then 
                        (
                            result = querybox s_result title:s_dialog_title 
                            if result then max quick render
                        )
                    )
                
                    render_sanity()
                )

                Comment


                • #23
                  Very good.

                  check if the vray framebuffer is enabled
                  The property is:
                  Code:
                  renderers.current.output_on
                  (check for true or false.)
                  and an output path is defined to save separate channels
                  Code:
                  renderers.current.output_splitgbuffer
                  (true or false)
                  and
                  Code:
                  renderers.current.output_splitfilename
                  (a filename string.)

                  Notice that any change done to the render settings needs to be confirmed via render panel update, or close and reopen. (Max heritage...)
                  f.e.:
                  Code:
                  renderSceneDialog.commit()

                  Typing
                  Code:
                  show renderers.current
                  while V-Ray is the current renderer will print out all its properties, and data types in the listener.
                  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

                  Working...
                  X