[Closed] Between-Frame Scripting
I have a collection of ~1500 MAX files that contain a simple surface that I need to import & render. Previously, we have had a MAXScript that could “mergeMaxFile” one of them, submit the job to BackBurner (We have a 30 node renderfarm), and then delete the mesh, repeating for every file.
This works, but it’s slow. Importing every mesh takes 15-20seconds, so I can only submit about 2 jobs per minute. Can I modify the script to instead register a callback to import the necessary data at rendertime, then submit a single job to the renderfarm?
I wrote upt he script using the “#preRenderEval” callback, but it doesn’t seem to work. If no “Droplets” object exists before I start the render, then I get all black frames. If I create a “Droplets” object prior to rendering, then 3ds Max crashes as though the geometry was already cached (like doing this in the #PreRenderFrame).
PLEASE someone tell me how to do this.
Just a thought. Maybe the problem is created partially by the render callback.
Perhaps you can instead change the geometry with the script and then call Render from the script? That has to work for sure.
So
- find the files
- loop throug the files
–merge them in the scene
–call Render
-continue with loop
So the user would instead of pressing render press the button to your script.
Should do the trick
/Andreas
Well, that would work yes… But that defeats the entire point!
I want to submit the job to our 30+ node render farm and let it do all the work of loading the data & rendering. The way you’ve described is how I do it now, where I load a dataset, then submit a single 1-frame job to the farm. That results in 1500 jobs to be managed by backburner, each of 1 frame. Plus all the time that it takes for me to load each model individually, so it takes about an hour just to submit the jobs.
I tried using the preRenderEval callback, but it seems to be no different from the preRenderFrame callback. If a model with the name I’m importing already exists, then 3ds crashes when it tries to render. If no model with the name exists (the first frame usually) then the entire sequence is rendered without it, although I can see from the log that it was actually loaded.