[Closed] rendUseNet
Hi guys,
having a bit of trouble. i want to be able to control wether i net render or not, but the script below doesnt seem to do anything (well the rendOutputFilename=”” does work)
renderSceneDialog.close() --closes render dialogue
rendOutputFilename="" --does not save anywhere
if chk_dr.checked == true then vr.system_distributedRender=true else vr.system_distributedRender=false --distributed rendering
if chk_nr.checked == true then rendUseNet=true else rendUseNet=false
--rendUseNet=true
there is other peices of code regarding rendering, but nothing I can see that should affect net rendering at all.
any help much appreciated, deano
Hi,
What exactly are you trying to do? In your script you have the last line commentted out, which would activate network rendering.
rendUseNet = not rendUseNet
Josh.
sorry my mistake, the last line wasnt meant to be commented out.
anyway, i have made another simply test script, and i still have the same problems
renderSceneDialog.close()
rendUseNet = true
render()
when i use render() it seems to discard the above info. net rendering becomes ticked, but not implemented.
any ideas?
cheers, dean
From the maxscript help file:
The render() method invokes the current 3ds Max renderer.
Other than calling the max quick render command which is equivalent to clicking the Render icon in the Main Toolbar, the render() method can take many optional parameters to control the rendering independently from the current Render Scene Dialog settings.
NOTE:
As mentioned above, the render() method does NOT use the current render settings found in the Render Scene Dialog. Thus, calling render() will NOT save to the output file name specified in the Render Scene Dialog or via the rendOutputFilename global, but will use the output specified via the outputfile: optional parameter and/or simply return a bitmap value.
You need to use max quick render which is the same as hitting the render button or you must use the render() options to set the outputfile, netrender, etc.
-Eric
EDIT: Posting the full script code will get you a lot more help than posting snippets. Without seeing that you are using render() instead of max quick render, then you may have never gotten a valid answer to address your problem.
OK I think I kind of understand that, but what other alternatives do I have other than using render() ?
This might get you going.
It is a script that will send jobs to the render queue. You put the camera setting into the script and execute the script. I use to use this to automate sendin multiple jobs.
--------------------------------------------------------------------------------
-- Submit NR
-- version 1.0
-- max version 6
-- written by Joshua Newman
-- www.joshuanewman.net
-- last updated 24/11/03
-- copyright 2003
--------------------------------------------------------------------------------
--
-- submit multiple cameras to backburner effortlerssly.
--
--------------------------------------------------------------------------------
-- LIMITATIONS!
--
-- ensure the 'lock-view' button on the render scene dialogue is NOT locked! otherwise this will be the camera submitted.
-- I have had problems with dual HT xeons only rendering with 50% of their processor power.
--
--------------------------------------------------------------------------------
global nman,jbs,jobs,cams=#()
struct scenecamera (file,node,start,finish,output)
netaddress="COMPUTERNAME" -- the ip of your manager
-- all your cameras go here
append cams (scenecamera (maxfilepath+maxfilename) $camera01 0 100 "//xxx/3d/renders/test/test.tga")
append cams (scenecamera (maxfilepath+maxfilename) $camera02 0 100 "//xxx/3d/renders/test/test.tga")
fn connectman server=
(
nman=netrender.getmanager()
nman.connect #manual server
)
fn getjobs=
(
job=nman.getjobs()
jbs=#()
for j in job do append jbs j.name
return jbs
)
x=connectman netaddress
if x==true then
(
print "Connecting!"
for i=1 to cams.count do
(
j=nman.newjob()
j.name=cams[i].node.name
j.rendercamera=cams[i].node.name
j.fromframe=cams[i].start
j.toframe=cams[i].finish
j.frameoutputname=cams[i].output
j.submit()
)
jbs=getjobs()
for i=1 to jbs.count do format "Job : % - %
" i jbs[i]
nman.disconnect()
)
else
(
print "Cannot connect."
)
Josh.
Thanks for that Joshua, but it seems a tad bit advanced for myself!!
I don’t really need to control backburner, or the submission of jobs, I just need it so that when I run the script, it opens up the Network Job Assignment window.
Any ideas?
Thanks for the input so far guys!
Deano
Replace “render()” with “max quick render” without the quotes. max quick render is the same as pressing the render button from the UI or render scene dialog. Otherwise you need to use the optional parameters of the render() command.
For more information search for “render” in the maxscript help and read the top of the “Controlling the Renderer using the render() method” page.
-Eric
Thanks Eric, you’ve made my day!!! Isn’t it always the best solutions are usually the simpliest!!
I’m trying to read / understand as much of the maxscript reference as possible, but it’s bloody hard on your own, especially when your trying to create something useful!
Cheers, Dean