Maxscript Netrender Interface

Maxscript Netrender Interface

Anonymous
Not applicable
1,097 Views
3 Replies
Message 1 of 4

Maxscript Netrender Interface

Anonymous
Not applicable
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:



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
0 Likes
1,098 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
This is doable (I've personally scripted the submission of thousands of backburner jobs at once), but MXS netrender submission is broken in max 2013, so trying to do it the 'right' way is an exercise in futility as of product update 4.

<a href="http://area.autodesk.com/forum/t67828">This thread</a> has a link to a workaround that uses C# through Maxscript to push the UI buttons associated with manual job submission. It might be a fair bit slower than the native netrender code, but it appears to work, although I haven't tried to batch it yet.

In the original CGTalk thread linked fromt he Area thread above, the author responded to a feature request of mine within hours, so you may have some luck getting help there as well.
0 Likes
Message 3 of 4

Anonymous
Not applicable

hello,

can you suggest me how to disable GI next option using maxscipt, In new mental ray renderer 2018.

I want to uncheck GI next option using maxscript. not getting any idea. 

Please suggest

0 Likes
Message 4 of 4

Anonymous
Not applicable

Hello guys,

I found the script 🙂

renderers.current.IndirectDiffuseEnabled = false

thanks

0 Likes