Render Flatiron via deadline maxscript job

Render Flatiron via deadline maxscript job

Postby renndermonkey » 17 Sep 2016 02:32

Hello,

I'm trying to submit a maxscript job through deadline for network baking.

The example maxscript provided here (http://doc.texturebaking.com/MAXScript.html), and the code I've posted below work fine locally- but does not work on a farm machine. Can you provide any info about the 'workarounds' necessary for network rendering?

info about deadline maxscript job can be found here- http://deadline.thinkboxsoftware.com/su ... maxscript/

Example script -

Code: Select all
(
   local du = DeadlineUtil  --this is the interface exposed by the Lightning Plug-in which provides communication between Deadline and 3ds Max
   if du == undefined do  --if the script is not being run on Deadline (for testing purposes),
   (
      struct DeadlineUtilStruct   --define a stand-in struct with the same methods as the Lightning plug-in
      (
         fn SetTitle title = ( format "Title: %\n" title ),
         fn SetProgress percent = (true),
         fn FailRender msg = ( throw msg ),
         fn GetSubmitInfoEntry key = ( undefined ),
         fn GetSubmitInfoEntryElementCount key = ( 0 ),
         fn GetSubmitInfoEntryElement index key = ( undefined ),
         fn GetJobInfoEntry key = ( undefined ),
         fn GetAuxFilename index = ( undefined ),
         fn GetOutputFilename index = ( undefined ),
         fn LogMessage msg = ( format "%\n" msg ),
         fn WarnMessage msg = ( format "Warning: %\n" msg ),
         CurrentFrame = ((sliderTime as string) as integer),
         CurrentTask = ( -1 ),
         SceneFileName = ( maxFilePath + maxFileName ),
         SceneFilePath = ( maxFilePath ),
         JobsDataFolder = ( "" ),
         PluginsFolder = ( "" )
      )
      du = DeadlineUtilStruct() --create an instance of the stand-in struct
   )--end if
   
   du.SetTitle "MAXScript Job" --set the job title
   du.LogMessage "Starting MAXScript Job..." --output a message to the log
   local st = timestamp() --get the current system time
      
   --YOUR SCENE PROCESSING CODE GOES HERE

      fn DeadlineBake =
      (   
      select geometry
      Flatiron.reset()
      Flatiron.map_channel = 2
      Flatiron.stretch = 0.05
      Flatiron.padding = 4
      Flatiron.width = 512
      Flatiron.height = 512
      Flatiron.overlap = 4
      Flatiron.preview = false
      Flatiron.unwrap "group1"
      Flatiron.output = "A:\\EXAMPLE\\NETWORK\\PATH"
      Flatiron.material_str = "Standard"
      Flatiron.add_bake_element_str "CompleteMap"
      Flatiron.set_element_file_name 1 "testBake.jpg"
      --Flatiron.set_element_slot 1 "Diffuse Color"
      Flatiron.set_element_width 1 1024
      Flatiron.set_element_height 1 1024
      Flatiron.use_shell = false
      Flatiron.bake_mode = 1
      Flatiron.bake "group1"
      )
      
   DeadlineBake()
      
   
   du.LogMessage ("Finished MAXScript Job in "+ ((timestamp() - st)/1000.0) as string + " sec.") --output the job duration
   true  --return true if the task has finished successfully, return false to fail the task.
   
   
)--end script
renndermonkey
 
Posts: 1
Joined: 17 Sep 2016 02:06

Return to Flatiron

Who is online

Users browsing this forum: No registered users and 1 guest

cron