Community
Hey guys, anyone could help me explaning why these approaches are not working for render a single frame in arnold?
My goal is simple:
Please if you can, take a loot at my attempts codes:
# WORKING:
cmds.setAttr("defaultRenderGlobals.currentRenderer", "arnold", type="string")
output_path = "C:\\Users\\joao\\Desktop\\apresentacao\\renders\\render4.exr"
cmds.setAttr("defaultRenderGlobals.imageFilePrefix", output_path, type="string")
cmds.setAttr("defaultRenderGlobals.imageFormat", 51)
cmds.setAttr("defaultResolution.width", 1920)
cmds.setAttr("defaultResolution.height", 1080)
cmds.setAttr("defaultArnoldDriver.aiTranslator", "exr", type="string")
# NOT WORKING: it doesnt generate a proper image file, because its not openable in any software
cam = "persp"
cmds.render(cam)
# NOT WORKING: it doesnt respect the correct camera name ("front in this case")
mel.eval('renderWindowRenderCamera render renderView "front";')
mel.eval('renderWindowEditor -edit -writeImage "C:\\qwe.exr" renderView;')
# NOT WORKING: it renders with arnold, but I couldnt find how to change the camera
mel.eval('renderSequence;')
thanks a lot!
https://discourse.techart.online/t/render-a-single-frame-in-maya-with-arnold-not-working/16490
Hey guys, anyone could help me explaning why these approaches are not working for render a single frame in arnold?
My goal is simple:
Please if you can, take a loot at my attempts codes:
# WORKING:
cmds.setAttr("defaultRenderGlobals.currentRenderer", "arnold", type="string")
output_path = "C:\\Users\\joao\\Desktop\\apresentacao\\renders\\render4.exr"
cmds.setAttr("defaultRenderGlobals.imageFilePrefix", output_path, type="string")
cmds.setAttr("defaultRenderGlobals.imageFormat", 51)
cmds.setAttr("defaultResolution.width", 1920)
cmds.setAttr("defaultResolution.height", 1080)
cmds.setAttr("defaultArnoldDriver.aiTranslator", "exr", type="string")
# NOT WORKING: it doesnt generate a proper image file, because its not openable in any software
cam = "persp"
cmds.render(cam)
# NOT WORKING: it doesnt respect the correct camera name ("front in this case")
mel.eval('renderWindowRenderCamera render renderView "front";')
mel.eval('renderWindowEditor -edit -writeImage "C:\\qwe.exr" renderView;')
# NOT WORKING: it renders with arnold, but I couldnt find how to change the camera
mel.eval('renderSequence;')
thanks a lot!
https://discourse.techart.online/t/render-a-single-frame-in-maya-with-arnold-not-working/16490
Can't find what you're looking for? Ask the community or share your knowledge.