Announcement

Collapse
No announcement yet.

an "empty/clean memory button" after render wish.

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

  • #16
    Rerender, or other could you write the total script please.....
    I understand nothing to scripting.
    Thx
    =:-/
    Laurent

    Comment


    • #17
      you can just highlight the green text in my first post and drag it to a a tool bar in Max, that will create a button. Then just press it before you start your renders.

      I think the best option is to use backburner, that way if for some reason one frame won't render the rest will.

      If I have the time I can make a little UI for the script when I get home after work.
      Eric Boer
      Dev

      Comment


      • #18
        ok that's cool I will give it a try.
        Thanks
        =:-/
        Laurent

        Comment


        • #19
          note to self: look into callbacks...

          pretty powerful stuff

          Comment


          • #20
            It seems to not work for me.
            Max has crashed tonight after one frame. I have create the button and clicked it before the render but.
            One thing is good, I have sleeped but nothing to see when I wakeup
            =:-/
            Laurent

            Comment


            • #21
              Originally posted by priad
              It seems to not work for me.
              Max has crashed tonight after one frame. I have create the button and clicked it before the render but.
              One thing is good, I have sleeped but nothing to see when I wakeup
              lol!

              I guess it'll be simpler like this:
              No button, just a plain script that has to fire AFTER the render (max 8 has a post-render script box, i think...)calling the two procedures.
              I prepared the two commands text file (script would be too big a name for it) and uploaded it for you to copy wherever you want.
              Link that to that postrender script box and give it a try...
              Maybe not overnight

              http://www.studiodim.it/_download/postrender_cleaner.ms

              re,
              Lele

              Comment


              • #22
                lol, glad you got some sleep I probably should have suggested a try before bed.

                studioDIM is that script called after each frame or after the render?

                Priad - USE BACKBURNER!!!!!!!!!
                Eric Boer
                Dev

                Comment


                • #23
                  loll
                  Priad - USE BACKBURNER!!!!!!!!!
                  I have never use it for this kind of think could you make a littletut how to use it?
                  =:-/
                  Laurent

                  Comment


                  • #24
                    It depends on the scene, really.
                    You could call that per frame through a batchrender of single frames (pretty quick to setup, unless you have a LOT of frames top render out) as a postrender script.
                    I guess that's the case for Laurent, where he needs a few very heavy frames rendered out, with no scene manipulation happening before the render starts.

                    Further, he might try to use 3dsmaxcmd.exe, or whichever correspondent commandline renderer max 8 has...
                    That might impact even less on his memory...

                    Blind guess, though.

                    Cheers,
                    Lele

                    Comment


                    • #25
                      priad: there should be a fairly complete tutorial in the help files

                      lele: i guess what rerender was asking was if the postrender script in max's render dialog gets called after each frame or after each render

                      i think i remember it being after each render - which doesnt help much in priads case

                      rerender: weve been running into heavy trouble with backburner from time to time, sometimes only one computer out of 3 would keep rendering and it would only give us obscure error messages
                      but in principle i have to agree - its nice for queuing up work and going home

                      Comment


                      • #26
                        ok

                        1. go to start->all Programs-->Discreet-->Backburner and start "manager"
                        ( just accept the default settings when it first starts)

                        2. start "" "server"

                        3. In both dialogs you should see that they have recognized eachother with a registration message. ( if you do not see this then something is wrong and we will need a longer tut).

                        That's it for the setup

                        Next in max set up your render as usual but in the place where you designate where to save the image there is a checkbox that says "net render" check this box.

                        now when you press render a new dialog will come up "the network submission dialog" Here you can give the job a unique name (or keep the file name).

                        All you really need to do is make sure "use all servers" is checked and then press "connect" , it should then show your machine in the list.

                        Now just press "submit" the job will transfer to a new folder and start rendering, close out of your Max session and you should be good to go.

                        once the job is rendering you can see it's progress by running
                        go to start->all Programs-->Discreet-->Backburner-->"monitor"

                        In monitor you can start, pause,reorder jobs etc.

                        If you have more than one computer on your network they can join in by running their own server or let you monitor the render box from another computer, you need to install max on the other boxes but they do not need to be licensed.
                        Eric Boer
                        Dev

                        Comment


                        • #27
                          to take the horn by the bulls (), here's a callback script that cleans memory per frame.
                          http://www.studiodim.it/_download/perframecleaner.ms

                          just run it (maxscript -> run script) before the renderer starts.
                          It will simply fire the infamous gc() and freescenebitmaps() after the renderer has processed a frame.
                          So to make it easier for the lazy ones.


                          Since callbacks are session-persistant, to deactivate it either close max and reopen it, or run this one.
                          http://www.studiodim.it/_download/pe...ner_remover.ms

                          Comment


                          • #28
                            Originally posted by mike.edel
                            lele: i guess what rerender was asking was if the postrender script in max's render dialog gets called after each frame or after each render

                            i think i remember it being after each render - which doesnt help much in priads case
                            aye, that's why i suggested using the batch renderer to call the script.
                            you set up as many queues (1 frame long) as frames to render, and get around it that way.

                            I guess that post has been made obsolete by the new callback, though. do try it and let me know if it works...

                            re,
                            Lele

                            Comment


                            • #29
                              () looks more like a puppy than a bull :P lol

                              I am skeptical that running gc() and frebit...() is going to be stable inbetween frames it is a lot to interject into the render proccess, It would be great though if Priad could test it as it would be good to know.

                              I still highly recomend Backburner over the command line as it provides more failsafes.
                              Eric Boer
                              Dev

                              Comment


                              • #30
                                I didn't test it with VRay proxies, but did a quick and dirty test with GI (Irmap + LC), hdri GI backdrop and moblur turned on.

                                It worked flawlessly (to no real avail, as i had everything in view all the time...), giving me a warning "HDRI map in memory, no reload needed" for each frame, meaning it did not, as expected, drop the needed stuff from memory.

                                Just to reassure you, here's a paste from maxscript help file:
                                Code:
                                The function gc() invokes the garbage collector. Normally, the collector runs automatically when available memory runs low, so you don't normally need to call it explicitly. However, in some situations, it is useful to be able to force a collect to ensure a pause due to garbage collection will be delayed as long as possible.
                                You can also invoke the collector to cause any unreferenced open files to be closed. In some situations, a file can be left open if a runtime error occurs while it is still open. If the file object was being held in a local variable at this point, it may not be possible to get at it from the Listener to force a close. Any subsequent attempts to open it may result in an "already open" error from the operating system. Running the collector will cause the file object to be reclaimed and this forces any open file associated with it to be closed.
                                Code:
                                freeSceneBitmaps()
                                Frees up all the memory used by the image file bitmap caches. This is useful if memory is fragmented with a lot of different bitmaps and you want to have just the ones currently active reloaded.
                                Of course, anyone's free to do as he wishes: I take no responsibility whatsoever on the results

                                regards,
                                Lele

                                Comment

                                Working...
                                X