Message 1 of 4
Maxscript Netrender Interface
Not applicable
08-24-2012
02:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am attempting to write a script that will render a folder of animations, all with exactly the same render settings (with the exception of jobname, etc.). I will be using mental ray for the rendering.
The code I have so far is:
I will attach the complete code...
I had it submitting earlier but got "There is no valid server top process job: 'XXXXXXXXXXXXX'". Any ideas of what might be causing this? I can network submit manually without issue...
-- Tubby
The code I have so far is:
global n = NetRender.GetManager()
n.connect #manual "10.10.40.163" platform:#default
if n.connected then (
for file in filelist do (
print file
fileroot = getFilenameFile file
newDir = outputFolder + "\\" + fileroot
makeDir newDir
-- load file from directory
--loadMaxFile file quiet:true
-- Render options
-- set renderer to mentalray
renderers.current = mental_ray_renderer()
-- set all the mentalray render options
renderers.current.MaximumReflections = 4
renderers.current.MaximumRefractions = 6
renderers.current.softshadowsprecision = 1.0
renderers.current.glossyreflectionsprecision = 1.0
-- indirect illuminattion
renderers.current.FinalGatherEnable2 = true
renderers.current.FinalGatherDensity = .1
renderers.current.FinalGatherAccuracy = 50
renderers.current.FinalGatherInterpolationSamples = 30
renderers.current.FinalGatherBounces = 0
renderers.current.FinalGatherFilter = 1
renderers.current.FinalGatherTraceDepth = 5
renderers.current.FinalGatherReflectionDepth = 2
renderers.current.FinalGatherRefractionDepth = 5
renderers.current.FinalGatherBounceMultiplier = 1.0
renderers.current.FinalGatherFalloffStart = 0.0
renderers.current.FinalGatherFalloffStop = 0.0
renderers.current.FinalGatherRadius = 1.0
renderers.current.FinalGatherMinRadius = 0.1
renderers.current.FinalGatherMinRadius_View = .5
renderers.current.FGMultiplierScalar = 1.0
-- caustics
renderers.current.CausticsEnable = false
-- global illumination
renderers.current.GlobalIllumEnable = false
-- volumes
renderers.current.AutoVolume = false
cam = "camera"
range = animationRange
outW = 1920
outH = 1080
outfiles = newDir + "\\" + fileroot + ".tga"
print outfiles
job = n.newJob file:file
ind = random 10000 99999 as string
job.name = "RenderTron 6000 " + fileroot + "___"+ ind
job.renderCamera = cam
job.frameOutputName = outfiles
job.nonSeqFrames = false
job.skipOutputTest = true
job.fromFrame = animationRange.start
job.toFrame = animationRange.end
job.outputWidth = outW
job.outputHeight = outH
job.includeMaps = true
job.useAllServers = true
job.renderHiddenObjects = false
job.renderAtmosphericEffects = false
job.renderEffects = false
job.frameOutputName = outfiles
job.suspended = false
job.priority = 1
job.useAllServers = true
stat = job.submit()
print stat
I will attach the complete code...
I had it submitting earlier but got "There is no valid server top process job: 'XXXXXXXXXXXXX'". Any ideas of what might be causing this? I can network submit manually without issue...
-- Tubby