Announcement

Collapse
No announcement yet.

[MAXSCRIPT] Teague Scene Checker - v1.0

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

  • [MAXSCRIPT] Teague Scene Checker - v1.0

    Hello friends,
    I'm pleased to release our internal tool for your constructive feedback. I created a scene checking tool (it seems every studio has their own practically, or at least they should). I wrote an easily extendable script that will allow you to add the functionality you desire for your studio. Please ask for extensions to the script in this thread, added functionality, etc.

    If you have an interest in extending the script to fit you or your studio's custom needs there is pretty good documentation on my site on the below page. Or as always, email me colin.senner@gmail.com. Thank you and I hope you enjoy.

    Changelog:
    1.01 - Problem finding VRayMtls in Multisub objects has been fixed

    Download Teague Scene Checker Here

    Teague Scene Checker (for V-Ray) is a script that checks your scene for known error causing problems with V-Ray as well as informs you of some things that are happening in your scene. The script currently checks for the following things and informs you so you can optimize the scene.


    After numerous scenes with outrageous render times Teague decided to invest in a simple, easy-to-use tool to eliminate problems for its artists.


    #INFO (These are just useful information to know, not really problems, just want to be aware of some of them)
    • V-Ray fur object is in the scene
    • V-Ray material has “Use Interpolation” on (Problematic for animation
    • V-Ray light material has direct light on (can be problematic if there are a large number of faces on the object)
    • Irradiance Map/LC Not set
    • “Use Light Cache for glossy rays” is off
    • Dynamic memory limit set very low
    • VRayDisplacementMod is applied to objects
    • VRayCarPaintMtl in the scene
    • VRayFastSSS/2 materials in the scene
    #WARN

    • Detects if you are using Linear Workflow and makes sure you have gamma 2.2 and “Don’t affect colors” (There are valid reasons to not have this ticked, but you already know that if you aren’t ticking it)
    • Detail Enhancement is on in the Irradiance Map
    • V-Ray material(s) with more than 32 subdivisions
    • V-Ray light with high subdivisions (>24) found
    #CRITICAL (Usually show stopping errors for V-Ray, crashes and the like or heavily un-optimized things that can skyrocket render times)
    • Standard lights found without “VRayShadow” or “VRayShadowMap” for their shadow generator
    • V-Ray material with “Use Irradiance Map” off (This thing along is why this script was written. I absolutely hate this, it has cost me so many hours figuring it out)
    • Raytrace map found
    • Mental Ray lights that are found and unsupported

    The Script’s interface is simple. In the Messages window it shows the info/warnings/critical errors in the scene. In the “Objects/Materials” window, it identifies what objects have the problems being referenced allowing you to easily change and tweak them.

    Click image for larger version

Name:	TeagueSceneChecker_UI1.png
Views:	2
Size:	46.3 KB
ID:	877021




    The results of a scene optimization are as follows:


    Before:





    After:
    Last edited by MoonDoggie; 13-12-2012, 05:28 PM.
    Colin Senner

  • #2
    WOW, Colin. Thanks for the share!
    Bobby Parker
    www.bobby-parker.com
    e-mail: info@bobby-parker.com
    phone: 2188206812

    My current hardware setup:
    • Ryzen 9 5900x CPU
    • 128gb Vengeance RGB Pro RAM
    • NVIDIA GeForce RTX 4090 X2
    • ​Windows 11 Pro

    Comment


    • #3
      This is certainly not a replacement for something like Subburb's SolidRocks (which I use and love).

      This is a tool to inform the user of some things that are happening in their scene that they might not be aware of (Hiding VRayFur's, CarPaintMtls, huge material subdivision values).

      We have really old scenes that we reuse. Sometimes they have strange SSS materials applied to certain things sometimes and every once in a while, "Use Irradiance Map" is turned off for a material or two. These consistent problems are very frustrating and there currently is no tool that exists to do it all easily. Thus, this was born.

      It's easy to add to and build upon. Full documentation (including the exact code to show and display VRayHairMtls with the script) is all on my site.

      I'm sure I forgot a bunch of things that also affect vray negatively in the same way a "Raytrace Map" in a scene was disastrous in the past. Please let me know what I forgot.
      Last edited by MoonDoggie; 11-12-2012, 03:26 PM.
      Colin Senner

      Comment


      • #4
        Small Update: Added support for finding Architectural materials and "Autodesk_Material" (from imported CAD stuff, I've had huge problems with this material existing in a scene even when the object was hidden).

        If you downloaded this prior to reading this message, please redownload it. I'll change the version number next time, but since this thread has 14 hits, I decided to keep it 1.0.

        -Colin
        Colin Senner

        Comment


        • #5
          Changelog:
          - Checks for Autodesk_Material
          - Checks for Architectural materials in the scene
          Colin Senner

          Comment


          • #6
            Bitmap pager on / off in my version of this type of tool. Also lots of FopenEXR options to get the best speed in nuke but that's a per company thing admittedly.

            Comment


            • #7
              I used it on my current scene and it found some really high subdivisions on some materials. FIVE STARS!!!
              Bobby Parker
              www.bobby-parker.com
              e-mail: info@bobby-parker.com
              phone: 2188206812

              My current hardware setup:
              • Ryzen 9 5900x CPU
              • 128gb Vengeance RGB Pro RAM
              • NVIDIA GeForce RTX 4090 X2
              • ​Windows 11 Pro

              Comment


              • #8
                joconnell, care to elaborate a bit on the FopenEXR stuff? I can add it in or you can check the documentation on my site for adding it yourself if there's something you need.

                If I understand you correctly, you would like notification on the bitmap page on/off. Do you use the bitmap pager? I've never used it but maybe there's something in there that would help me with my rather large scenes?
                Colin Senner

                Comment


                • #9
                  Originally posted by glorybound View Post
                  I used it on my current scene and it found some really high subdivisions on some materials. FIVE STARS!!!
                  Excellent! That's the idea. Sneaky materials and such. I use VRay material control alot for these things, but it's handy to not have to dial an entire scene down and to just figure out which objects have the problematic material.
                  Colin Senner

                  Comment


                  • #10
                    Not at all colin - at the mo we're using exr admittedly with a huge amount of problems largely related to our render nodes and deadline. We're also using a lower AA but higher material and light sampling setup in here for rendering so the method of thought is probably slightly different in our scenes. I do like all your checks, we've a few written in for dumb mistakes and it does make sense to put in some kind of warning to prevent render errors, along the line of deadline's sanity check!

                    In terms of nuke, for speed it likes three things: The datawindow so it only process pixels with visible data, the scanline format and lastly zips compression. In my script for setting up render pass names and folders I set exr options as with that using the following code:

                    Code:
                    - SET MAIN OUTPUT NAME
                    			
                    			
                    			theBeautyPass = theOutPath + "\\" + ss_shotNum.text + "_" + (removeUnderscores ss_shotElement.text) + "_" + ss_shotVersion.text
                    			
                    			-- CLEAR OUTPUT FILENAME
                    			
                    			rendOutputFilename = ""
                    			
                    			RE=  MaxOps.GetCurRenderElementMgr()		
                    			for i = 1 to (re.NumRenderElements()) do
                    			(
                    				re.SetRenderElementFilename (i-1) ""	
                    			)
                    			
                    						
                    			-- SET EXR OPTIONS (fix this)			
                    				
                    			FOpenEXR.setDefaults()
                    			FOpenEXR.setCompression 2
                    			FOpenEXR.setSaveScanline true
                    			FOpenEXR.setSaveRegion true
                    			
                    			
                    			-- Bin invisible render elements
                    			
                    			FOpenEXR.delAllGBufferLayers()
                    			FOpenEXR.delAllRenderElementLayers()
                    			FOpenEXR.setAutoAddRenderElements false
                    			
                    			
                    			
                    			-- SET OUTPUT TO EXR			
                    			
                    			rendOutputFilename = theBeautyPass + "_.exr"				
                    			
                    			-- Set render element names		
                    			
                    			RE=  MaxOps.GetCurRenderElementMgr()		
                    			for i = 1 to (re.NumRenderElements()) do
                    			(
                    				TheElement = re.GetRenderElement (i-1)
                    				TheName = TheElement.ElementName
                    				re.SetRenderElementFilename (i-1) (theBeautyPass + "_" +  TheName + "_.exr")	
                    				
                    				print TheName
                    			)
                    			
                    			rendSaveFile = true	
                    			
                    			-- Turn off vray framebuffer
                    			
                    			renderers.current.output_on = false
                    			
                    			-- Turn off don't render final image
                    			
                    			renderers.current.options_dontRenderImage = false
                    
                    			-- Turn off Bitmap Pager
                    			
                    			IBitmapPager.enabled = false
                    One quirk of max is that if you try to set any render options via script, they won't work if the render dialog is open. Likewise if you try to set any image IO options, they won't work if any render output filename is set - you've to set them all to blank, then set your image options, then reassign the filenames.

                    Comment


                    • #11
                      You're _supposed_ to be able to call RenderSceneDialog.commit()/update() to commit render changes to the Render Scene Dialog while it's open, but frankly, I don't trust it...

                      I always add in the following code to close the Render Scene Dialog and reopen it if the user had it open prior.

                      Before any render parameters are changed

                      Code:
                      local renderSceneDialogWasOpen = RenderSceneDialog.isOpen()   -- Save if the user had the Render Scene Dialog open
                      RenderSceneDialog.close()
                      After changing render parameters
                      Code:
                      if renderSceneDialogWasOpen then
                           RenderSceneDialog.open()


                      I'll also post the code on my site that I use for manually setting the Render Element Paths which also might be helpful. It's simple. Set your output filename (either default max one, or VRayFrameBuffer one) and hit the button, it automatically creates a folder called "#OutputFilename#_Elements" and creates folders for each element and assigns them to the elements. This is helpful if you don't want a single layer EXR. Here's the link: http://www.colinsenner.com/scripts (Set Render Elements).

                      Maybe that helps a bit?
                      Colin Senner

                      Comment


                      • #12
                        Yep - got similar here, all of our element names are based off a preset and the name render elements then feed into a loader / combiner in nuke to reconstruct passes. Good point on the checking though, I've just made a dumb gamma mistake here so gamma lut and vray colour mapping checking has just gone into my render script.

                        Comment


                        • #13
                          Changelog: 1.01 - Problem with finding VRayMtls in Multisub materials has been fixed.
                          Colin Senner

                          Comment


                          • #14
                            Updated to version 1.03 - Fixes the issue with the script erroring with max 2009-2010. If you were receiving this error download the new version.
                            Colin Senner

                            Comment


                            • #15
                              I have my own "RenderSanityChecker" too! May I suggest you add a check to see that if you're loading IR or LC from file, that said files actually exist? I'm a bit embarrassed to say that this has bitten me before

                              Comment

                              Working...
                              X