[Closed] Render to texture – Backburner
Hi,
I’ve got problem with network rendering. I’m trying to render to texture (LightingMap, Ambient Occlusion) for all objects on scene.
For all nodes I am running following code:
--creating light map bake element
lm = lightingMap()
lm.outputSzX = 256
lm.outputSzY = 256
lm.fileType = "<PATH>" + selectedNode.name + "LightingMap.png"
lm.fileName = filenameFromPath lm.fileType
-- creating ambient occlusion bake element
amb = Ambient_Occlusion()
amb.outputSzX = 256
amb.outputSzY = 256
amb.enabled = true
amb.fileType = "<PATH>" + selectedNode.name + "Ambient Occlusion _MR.png"
amb.fileName = filenameFromPath amb.fileType
amb.spread = 2.0
amb.maxDistance = 150.0
amb.falloff = 1.0
-- setting bake elements
obj.INodeBakeProperties.removeAllBakeElements()
obj.INodeBakeProperties.bakeEnabled = true
obj.INodeBakeProperties.bakeChannel = 2
obj.INodeBakeProperties.addBakeElement lm
obj.INodeBakeProperties.addBakeElement amb
-- connecting to server
manager = NetRender.GetManager()
manager.connect #manual "localhost"
-- rendering with option netrender
render netrender:true rendertype:#bakeSelected vfb:false progressBar:false
But still everything is rendered locally on my machine.
I was trying to do it creating jobs manually, like in following example:
manager = NetRender.GetManager()
manager.connect #manual "localhost"
job = manager.newJob()
job.name = obj.name + "_job"
job.suspended = true
job.fromFrame = 0
job.toFrame = 0
job.submit()
but it performs full scene render, not with renderType:#bakeSelected option I need.
There is no problem with Backburner server, because everything works fine using ‘Render to texture’ dialog with ‘Network render’ option.
Is there any way to make netrender:true option work?
Please help!
I have also tried another way to render textures:
RTT_methods.NetBakeNode currentNode
but still take no effect, render is processed on local machine.
Anybody tried running methods from RTT_methods class?
I’m actually looking at doing this as well. I think there is another method to do it, by starting a new seperate job via the cmdjob.exe and passing it a batch file to open a max file/run a macroscript or whatever.
But I am curious if I can just pass the farm a job like you guys are looking at. This seems like a better/more efficient way to do it.
I think that RTT_Methods is broken. I am going to look into it more, but it doesn’t seem to be working right anymore. I keeps throwing errors about fileproperties
Well, so far, I’ve found that you can either use the RTT Dialogs, Network Render option, but then you have to deal with the popup window. You could maybe use windows.sendmessage to push buttons in that popup, but that’s annoying.
There is also the
networkRTT
command, that does a RTT render using the network, and brings up that same window.
Or, the other method I’m using/testing currently is to use the cmdjob.exe, and send it parameters to setup the job info, then I pass it a batch script, which loads max, loads a max file and runs a maxscript.
But, I’m not sure this last method will work. I spent all Friday at work trying it, but couldn’t get it to work. But I did some things slightly different here at home, and it seems to work. Although, it was all locally on my machine. What I should try is installing max on my laptop, or using max 2010 or whatever I have on there, and see if it still works.
So far so good… Setup my laptop with Max 2013 backburner, and same with my desktop.
Then ran my cmdjob batch and my laptop picked it up, and launched Max as expected, then opened the Max file in the network folder, and ran the .ms file to render out the map.
Still need to try and get it to load max in silent mode, to bypass menus if possible. Since scale and gamma popups occur. Also, I got some entrypoint exception, which means I need to install sp1 and hotfix I guess.