Lua script (below) needs to render 65,536 images.
Machine is Win7, Intel Core i7-5930K CPU - Six Cores, 3.5GHz
Quad Titan X air cooled not overclocked, fans on 100%
64 Gig memory, 1500 watt ps running at 850 watts while rendering.
all components running cool.
Crashes happen at random times. Has run for 12 hours without a problem.
Sometimes fails in an hour.
When crashes occur CPU drops from 25% to zero, All GPU's cool down to idle.
Octane and Script windows grey out and show "Not Responding"
No hint of a problem in the Windows log files.
Octane Memory usage value in task manager freezes at ~750,000 K
This value floats around this number while rendering.
Images are simple so far Render time for each frame is 1-2 seconds.
Any suggestions would be appreciated!
Craig
- Code: Select all
----------------------------------------------------------------------------------------------------
-- Shear animation using Octane Scatter node
-- animates the shear elements of a single scatter transform
-- @description renders an array of ortho views for holograms
-- @author Craig Newswanger & Ariel James
-- @version 0.3 August 4, 2015
-- @script-id Octane Shear Animation
------------------------------------------------------------------------------
-- Returns copies of the original scene graph, the camera node and the rendertarget.
-- This prevents us from modifying the original scene.
local function getSceneCopy()
-- get the selected render target
local selectedRt = octane.project.getSelection()[1]
if not selectedRt or selectedRt.type ~= octane.NT_RENDERTARGET then
octane.gui.showError{ text = "No render target selected" }
return nil
end
-- Create a full copy of the whole project so we don't modify the original project.
local copyScene = octane.nodegraph.createRootGraph("Project Copy")
local copyRt = copyScene:copyFromGraph(octane.project.getSceneGraph(), { selectedRt })[1]
-- check if the copied node is a render target with a thinlens camera connected to it
if not copyRt or copyRt.type ~= octane.NT_RENDERTARGET then
octane.gui.showError("No render target selected")
return nil
end
-- check if a thin lens camera is connected to the render target
local copyCam = copyRt:getInputNode(octane.P_CAMERA)
if not copyCam or copyCam .type ~= octane.NT_CAM_THINLENS then
octane.gui.showError("No thinlens camera connected to the render target")
return nil
end
return copyScene, copyRt, copyCam
end
local function saveRender(cScene, fName)
--Find parent direcotry of current project
local filePath = octane.project.getCurrentProject()
fileName = octane.file.getParentDirectory(filePath)
--Define new render folder and check if it exists
--renderFolder = fileName .. '/RenderFolder'
renderFolder = 'E:\\Death_Star_8-15-15'
exists = octane.file.exists(renderFolder)
--If the render folder does not exist create it
if not exists then
local result = octane.file.createDirectory(renderFolder)
end
renderFile = renderFolder .. '/' .. fName
print('FILE-NAME')
print(fName)
print('RENDER-FOLDER')
print(renderFile)
octane.render.start
{
renderTargetNode = cScene,
maxSamples = 10,
}
octane.render.saveImage(renderFile, octane.render.imageType.PNG8)
end
--
--Main
--
-- Get the render target and camera in global variables
SCENE_GRAPH, RT_NODE, CAM_NODE = getSceneCopy()
-- if getSceneCopy failed, halt the script
if SCENE_GRAPH == nil then return end
basename = "Death_Star_Battle"
for x = 255,0,-1 do
xshear = x/128 -1
for y = 255,0,-1 do
yshear = y/128 -1
xstr=string.format("%04d",255-x)
ystr=string.format("%04d",255-y)
filename= basename .. "_" .. ystr .. "_" .. xstr .. ".png"
print(filename,xshear,yshear)
local myScatterNode = octane.nodegraph.findItemsByName(SCENE_GRAPH,"myScatter",false)[1]
local matrix = { { 1, 0, xshear, 0 }, { 0, 1, yshear, 0 }, { 0, 0, 1, 0 } }
myScatterNode:setAttribute(octane.A_TRANSFORMS,{matrix})
saveRender(RT_NODE, filename)
end
end
-- reset the render engine
octane.render.reset()