Notifications
Clear all

[Closed] how to get a script calling "render" to backburner?

For some reason I need to animate the render region through my animation.
I’m not too much into scripting, but now I got this, what basically does the job.
Is there now an easy way to get this to backburner, that not only one client can render this but our farm?

 for i=0 to 10 do 
(
t=i
render frame:t rendertype:#region region:#(2000-(1.5625*t),0,2753-(1.5625*t),625)outputfile:("e:\	emp\	est_"+t as string+".jpg")
)

6 Replies

Have you tried to add your scropt to the pre-render script rollout? Not sure if it’s what you want but at least it will let you execute a script before (and after) the frame renders. Maybe some of the script wizards knows a proper way though

Thanks for that tip,

but doing this I get an exception. It seems like as the renderer is already called the #preRender can’t call it again in my function…

Hmmm, I still found no way to get my script to render via backburner.:sad:

Also I got some problems, because I see the frame rendering fine in Framebuffer, but sometimes it only saves a totally black image. I got the suspicion that the render-command is so much related to your settings in the render-dialog that sometimes changing something here results in the normal image, sometimes in a black one. But I do not no where exactly this comes from.

Here is my script so far:

 

--Function to check if file already exists, in case returns true
fn da_existFile fname = (getfiles fname).count != 0

fn da_RegionRender startFrame endFrame safetyBorder padding filename= 
(
 -- insert cancel-Button
 progressStart "Rendering..."
 for i=startFrame to endFrame do
  (
  -- count the amount of process, exit on Cancel pressed
  fortschritt = (endFrame-startFrame)/1000 * (i- startFrame + 1)
  if not (progressUpdate(fortschritt)) then exit
  
  -- set the timeslider
  t = i
  
  -- create the filename
  extension = ".tif"
  paddingcount = ""
  count = t
  while (count / (10 ^ padding)) < 1 do 
   (
   paddingcount = paddingcount + "0" 
   count = count * 10
   )

  filenameAll = filename + paddingcount + t as string + extension

  if da_existFile filenameAll == true do continue;
  
  -- factor to move renderregion to the left
  factor = 2002.0/1280
  
  sizeleft = 2002 - (factor * t) - safetyBorder
  if sizeleft < 0 then
   sizeleft = 0
   
  sizeright = 2753 - (factor * t) + safetyBorder
  if sizeright > 2753 then
   sizeright = 2753
	
  -- finally render the specific region
  render frame:t rendertype:#region region:#(sizeleft,0,sizeright,625) vfb:off outputfile:(filenameAll)
  print ("Frame " + filenameAll + " rendered!")
  )
 progressEnd()
)


Maybe the black renders occur because of vray. With scanliner it works fine.

might be VRay. not sure. I have a ‘render monkey’ script that will batch render a file and call a script before each frame.
Try it out!

http://www.joshuanewman.net/scripts/download/rendermonkey1.zip

J.

Hey, thanks, sounds perfect. I’ll try it as soon as I’m back in office!