FREE OCTANE RENDER FARM: For Community By Community....

Generic forum to discuss Octane Render, post ideas and suggest improvements.
Forum rules
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB
sublime
Licensed Customer
Posts: 93
Joined: Thu Mar 18, 2010 9:31 am

Sharing scene data in proprietary files like .max further limits the number of participants to only those that have the appropriate software.
We could use KilaD script (the one he made for my case a while ago). you dont need max file or any other original 3d file (appart from the obj). You need to use the script before hand to export camera positions, and run them using bat file that he also made for that purpose.

@necko77: wot wot wot wot??
my humble spec: Quad Cores Q6600 @ 2.4 Ghz, 2GB, GeForce GTX 460 (x2), winXP 32 bit, 3DS MAx 2009
User avatar
matej
Licensed Customer
Posts: 2083
Joined: Fri Jun 25, 2010 7:54 pm
Location: Slovenia

sublime wrote:We could use KilaD script (the one he made for my case a while ago). you dont need max file or any other original 3d file (appart from the obj). You need to use the script before hand to export camera positions, and run them using bat file that he also made for that purpose.
I'm not familiar with this script. Let's say someone has a scene of 100MB .obj + 100MB of textures to render, and I would like to render 5 frames of it. How would the whole process look like - him uploading & me downloading & rendering.
sublime wrote:@necko77: wot wot wot wot??
He just has difficulties expressing himself
SW: Octane 3.05 | Linux Mint 18.1 64bit | Blender 2.78 HW: EVGA GTX 1070 | i5 2500K | 16GB RAM Drivers: 375.26
cgmo.net
sublime
Licensed Customer
Posts: 93
Joined: Thu Mar 18, 2010 9:31 am

I'm not familiar with this script. Let's say someone has a scene of 100MB .obj + 100MB of textures to render, and I would like to render 5 frames of it. How would the whole process look like - him uploading & me downloading & rendering.
i have the scripts if you want to try it.

The script works like this:
1. I am using 3dsmax so rather than using Max2Octane script, i amusing this one. The UI is exactly the same but when you hit "render animation", the script would generate; in this case; 5 camera coordinates from frame 1 to 5 in the form small file (1KB each). These little files need to be placed in the octane's root along with the obj file and the ocs. Texture files can be anywhere, but in the case of this project, better place it in some fixed location.

2. To run octane with the new camera corrdinates, i am using a bat file which then opens octane like normal and process the render option. Once finished, it will triggers octane to render the next frame, and so on,..

Tell you what, let me paste the code here...
my humble spec: Quad Cores Q6600 @ 2.4 Ghz, 2GB, GeForce GTX 460 (x2), winXP 32 bit, 3DS MAx 2009
sublime
Licensed Customer
Posts: 93
Joined: Thu Mar 18, 2010 9:31 am

Credit to the great KilaD, copy this code into notepad and save it with .ms extension:

if (ClassOf max2octane == RolloutClass ) do destroyDialog max2octane


fn UpdateLightlist=
(
max2octane.ddl_light.items=for i in lights where superclassof i == light collect i.name
)

fn updateCameralist=
(
max2octane.ddl_cam.items=for i in cameras where superclassof i == Camera collect i.name
)

--CALLBACKS
callbacks.addscript #nodeCreated "UpdateLightlist()" id:#max2octane
callbacks.addscript #nodePostDelete "UpdateLightlist()" id:#max2octane
callbacks.addscript #nodeCreated "updateCameralist()" id:#max2octane
callbacks.addscript #nodePostDelete "updateCameralist()" id:#max2octane

rollout max2octane "MAX2Octane 1.022f" width:464 height:696
(
GroupBox grp1 "Project Configuration" pos:[8,8] width:448 height:104
label lbl1 "Octane Render Binary:" pos:[24,34] width:112 height:20
edittext edt_path "" pos:[144,32] width:232 height:17 readOnly:true
button btn_browse "Browse" pos:[384,32] width:64 height:17
label lbl3 "Project Path:" pos:[24,58] width:72 height:20
label lbl4 "Project Name:" pos:[24,80] width:72 height:20
edittext edt_pPath "" pos:[144,56] width:232 height:17 readOnly:true
button btn_pPath "Browse" pos:[384,56] width:64 height:17 toolTip:"Pick project folder\nRightclick: Open project folder"
edittext edt_pName "" pos:[144,80] width:136 height:17 readOnly:true
button btn_exproj "Use Existing Project" pos:[340,79] width:108 height:19
GroupBox grp4 "Export Configuration" pos:[8,120] width:448 height:320
GroupBox grp5 "Camera" pos:[16,192] width:432 height:128

checkbox chk_camera "Camera" pos:[24,216] width:72 height:16 checked:true --enabled:false
--enabled:false

checkbox chk_lens "Lens Aperture" pos:[24,240] width:88 height:16
checkbox chk_focal "Focal Depth" pos:[24,264] width:80 height:16
checkbox chk_sun "Sun Direction" pos:[24,352] width:88 height:16
button btn_export "Export OBJ/MTL only" pos:[24,484] width:136 height:20
button btn_render "Render" pos:[264,484] width:176 height:20
GroupBox grp6 "Export" pos:[8,448] width:448 height:240
edittext edt_png "Image Output: " pos:[24,548] width:352 height:17 readOnly:true
button btn_png "Browse" pos:[384,548] width:56 height:17
label lbl10 "Range:" pos:[24,576] width:48 height:20
spinner spn_from "" pos:[97,576] width:80 height:16 range:[-10000,1e+006,0] type:#integer
label lbl11 "To" pos:[184,576] width:24 height:20
spinner spn_to "" pos:[208,576] width:80 height:16 range:[-10000,1e+006,100] type:#integer
checkbox chk_moblur "Camera Motion Blur" pos:[24,296] width:116 height:16
spinner spn_samples "" pos:[97,604] width:80 height:16 range:[0,64000,256] type:#integer
label lbl13 "Pixelsamples:" pos:[24,604] width:72 height:20




dropdownList ddl_units "" pos:[184,602] width:144 height:21 items:#("Very Low (8 s/px)", "Low (32 s/px)", "Medium (256 s/px)", "Medium/High (512 s/px)", "High (1024 s/px)", "Very High (4096 s/px)") selection:3
button btn_render_animation "Render Animation" pos:[336,640] width:104 height:32
GroupBox grp11 "Frame" pos:[16,464] width:432 height:48
GroupBox grp12 "Film" pos:[16,136] width:432 height:48
GroupBox grp13 "Daylight Environment" pos:[16,328] width:432 height:48
dropdownList ddl_cam "" pos:[272,212] width:168 height:21
label lbl_actcam "Active Camera:" pos:[184,216] width:88 height:16
GroupBox grp14 "Animation" pos:[16,528] width:432 height:152
spinner spn_step "Nth Frame: " pos:[352,576] width:88 height:16 range:[0,100,1] type:#integer
checkbox chk_res "Resolution" pos:[24,159] width:80 height:16 checked:false
spinner spn_width "Width: " pos:[127,160] width:99 height:16 enabled:false range:[1,20000,1024] type:#integer
spinner spn_height "Height: " pos:[272,160] width:96 height:16 enabled:false range:[1,20000,512] type:#integer
dropdownList ddl_percent "" pos:[376,156] width:64 height:21 enabled:false items:#("100%", "75%", "50%", "25%")
label lbl_lightsource "Light Source:" pos:[184,352] width:80 height:16
dropdownList ddl_light "" pos:[272,348] width:168 height:21
edittext edt_aperture text:"1" pos:[184,240] width:72 height:17 enabled:false
edittext edt_focal text:"5" pos:[184,264] width:72 height:17 enabled:false
slider sld_aperture "" pos:[264,238] width:176 height:25 enabled:false range:[0.01,100,1] ticks:0

slider sld_focal "" pos:[264,262] width:176 height:25 enabled:false range:[0,10,5] ticks:0

label lbl_interpolate "Interpolate:" pos:[184,296] width:88 height:16 enabled:false
dropdownList ddl_interpolate "" pos:[272,294] width:80 height:21 enabled:false items:#("Previous", "Next") selection:2
checkbutton btn_lock "" pos:[227,160] width:16 height:16 enabled:false images:#("LockButton_i.bmp", undefined, 1, 1, 1, 1, 1)

GroupBox grp_GPU "GPU Devices" pos:[16,384] width:432 height:48
checkbox chk_GPU "Specify GPU devices to use" pos:[24,408] width:152 height:16 tooltip:"Example: 0 1 2 3"
edittext edt_GPU text:"0" pos:[269,408] width:171 height:17 enabled:false
progressBar pb_anim "" pos:[32,648] width:288 height:16 color:(color 85 126 140)
checkbox chk_camonly "Camera only" pos:[342,605] width:96 height:16
GroupBox grp_progress "Animation Progress" pos:[24,632] width:304 height:40
button btn_edit "Edit" pos:[168,484] width:88 height:20
button btn_new "New" pos:[286,79] width:48 height:19
checkbox chk_roll "Roll" pos:[95,216] width:72 height:16 checked:false



-- LOCALS

local myIni = (getDir #plugcfg) + "\\max2octane.ini"
local myExe = getINISetting myIni "Binary" "value"
local pPath = getIniSetting myIni "ProjectPath" "value"
local myPng = getIniSetting myIni "PngOutput" "value"
local myProject
local outName
local theOctaneSun
local thecam = getActiveCamera()
local filenamecheck
local fcheck
--
local theFlags
local theOctaneSun_dir=undefined
local thecam_pos=undefined
local thecam_dir=undefined
local theTarget_pos=undefined
local theFOV=undefined
local thecam_focal=undefined
local thecam_aperture
local theRes=undefined
local mblur=undefined
--
local SceneCameras
local thecamtarget
local filmwidth = renderWidth
local filmheight = renderHeight
local w= renderWidth
local h= renderHeight
local samples=spn_samples.value
local ddlActualValues = #(8, 32, 256, 512, 1024, 4096)
local aspect
local NEWProject=undefined
local theGPUs

local theobjexp_curscale="1.000000"
local theobjexp_newscale
local UpdateLightlist

--FUNCTIONS

fn getCamState=
(
if chk_camera.checked==true then
(
chk_lens.enabled=true
chk_focal.enabled=true
lbl_actcam.enabled=true
ddl_cam.enabled=true
chk_moblur.enabled=true
)
else
(
chk_lens.enabled=false
chk_focal.enabled=false
chk_lens.checked=false
chk_focal.checked=false
lbl_actcam.enabled=false
ddl_cam.enabled=false
chk_moblur.enabled=false
chk_moblur.checked=false
lbl_interpolate.enabled=off
ddl_interpolate.enabled=off
)
)

fn getSceneCameras=
(
for i in cameras where superclassof i == Camera collect i.name
)

fn createsun=
(
theOctaneSun=directionallight pos:[6000,-7000,10000] name:"OctaneSun"
theOctaneSun.type=#targetDirect
theOctaneSun.target.pos=[0,0,0]
)

fn getSceneLights=
(
for i in lights where superclassof i == light collect i.name
)


fn showPaths=
(
max2octane.edt_png.text = myPng
max2octane.edt_pPath.text = pPath
max2octane.edt_path.text = myExe
)

fn sunFilter obj=
(
isKindOf obj light
)

fn setFilmstate=
(
if chk_res.checked==true then
(
spn_width.enabled=true
spn_height.enabled=true
ddl_percent.enabled=true
btn_lock.enabled=true
)
else
(
spn_width.enabled=false
spn_height.enabled=false
ddl_percent.enabled=false
btn_lock.enabled=false
)
)

fn setSunstate=
(
if chk_sun.checked==true then
(
lbl_lightsource.enabled=true
ddl_light.enabled=true
)
else
(
lbl_lightsource.enabled=false
ddl_light.enabled=false
)
)

fn getGPUs=
(
theGPUstrstream=(max2octane.edt_gpu.text as stringstream)
theGPUArray=#()

for s=0 to 64 do try
(
append theGPUArray (readChar theGPUstrstream)
)catch()

theGPUArray=for i in theGPUArray where classof (execute i)==integer collect i
)


fn rescaleScene=
(
case units.SystemType of
(
#Inches: (theobjexp_newscale= 0.0254)
#Feet: (theobjexp_newscale= 0.3048)
#Miles: (theobjexp_newscale= 1609.344)
#Millimeters: (theobjexp_newscale= 0.001)
#Centimeters: (theobjexp_newscale= 0.01)
#Meters: (theobjexp_newscale= 1)
#Kilometers: (theobjexp_newscale= 1000)
)
try(setinisetting (objExp.getIniName()) "Geometry" "ObjScale" (theobjexp_newscale as string))catch()
)




fn getFlags=
(
theOctaneSun_dir=undefined
thecam_pos=undefined
theTarget_pos=undefined
theFOV=undefined
thecam_focal=undefined
theRes=undefined
theTarget_pos=undefined
themblur=undefined
theGPUs=undefined
thecam_dir=undefined


if thecam.type==#target then
(
if chk_camera.checked==true do (thecam_pos=thecam.pos*theobjexp_newscale;theTarget_pos=thecam.target.pos*theobjexp_newscale;theFOV=thecam.FOV)
if chk_focal.checked==true then thecam_focal=edt_focal.text else thecam_focal=((distance thecam thecam.target)*theobjexp_newscale)
if chk_moblur.checked==true do (if max2octane.ddl_interpolate.selection==1 then themblur=(at time(slidertime-1)#(thecam.pos*theobjexp_newscale,thecam.target.pos*theobjexp_newscale)) else themblur=(at time(slidertime+spn_step.value)#(thecam.pos*theobjexp_newscale,thecam.target.pos*theobjexp_newscale)))
)
else
(
if chk_camera.checked==true do (thecam_pos=(thecam.pos*theobjexp_newscale);theTarget_pos=(thecamtarget.pos*theobjexp_newscale);theFOV=thecam.FOV)
if chk_focal.checked==true then thecam_focal=edt_focal.text else thecam_focal=((distance thecam thecamtarget)*theobjexp_newscale)
if chk_moblur.checked==true do (if max2octane.ddl_interpolate.selection==1 then themblur=(at time(slidertime-1)#(thecam.pos*theobjexp_newscale,thecamtarget.pos*theobjexp_newscale)) else themblur=(at time(slidertime+spn_step.value)#(thecam.pos*theobjexp_newscale,thecamtarget.pos*theobjexp_newscale)))
)

if chk_lens.checked==true then thecam_aperture=edt_aperture.text else thecam_aperture=1
if chk_sun.checked==true do theOctaneSun_dir=theOctaneSun.dir
if chk_res.checked==true then theRes=#(spn_width.value,spn_height.value) else theRes=#(filmwidth,filmheight)
if chk_GPU.checked==true then theGPUs=getGPUs() else theGPUs=undefined

if chk_roll.checked==true do
(
thecam_dir=
(
local posdummy=dummy transform:thecam.transform
in coordsys local move posdummy [0,100,0]
local yvec_pos=posdummy.pos
delete posdummy
camup_pos=normalize(thecam.pos-yvec_pos)
)
)
theFlags=#(thecam_pos,theTarget_pos,theFOV,thecam_focal,theOctaneSun_dir,themblur,theRes,thecam_aperture,theGPUs,thecam_dir)
)





-- HANDLERS

on max2octane open do
(
-- theobjexp_curscale=getinisetting (objExp.getIniName()) "Geometry" "ObjScale"
showPaths()

if edt_path.text=="" do
(
myExe = getOpenFileName filename:"octane.exe" caption:"Please browse to and select the Octane executable" types:"Executable (*.exe)|*.exe" --donotwait:true
if ((myExe == undefined) OR (myExe == "")) do ( return false )
edt_path.text = myExe
setINISetting myIni "Binary" "value" myExe
)

--LIGHTS
(
ddl_light.items=getSceneLights()
)

--CAMERAS
(
if (getSceneCameras()).count==0 then
(
viewport.setType #view_persp_user
thecam=targetcamera isselected:on
thecam.type=#free
thecam.type=#target
macros.run "Lights and Cameras" "Camera_CreateFromView"
viewport.setCamera thecam
ddl_cam.items=getSceneCameras()
if thecam!=undefined do ddl_cam.selection=finditem ddl_cam.items thecam.name
)
else
(
ddl_cam.items=getSceneCameras()
if thecam!=undefined do ddl_cam.selection=finditem ddl_cam.items thecam.name
thecam=getnodebyname(ddl_cam.selected)
if thecam.type==#free and (getnodebyname (thecam.name+"_OctaneTarget"))==undefined then
(
--|| Free/Target Camera workaround
thecamtarget=dummy name:(thecam.name+"_OctaneTarget") transform:thecam.transform isfrozen:true
in coordsys local move thecamtarget [0,0,-800]
thecamtarget.parent=thecam
)
else if thecam.type==#free and (getnodebyname (thecam.name+"_OctaneTarget"))!=undefined do
(
thecamtarget=(getnodebyname (thecam.name+"_OctaneTarget"))
)
-- try(thecamtarget=(getnodebyname (thecam.name+"_OctaneTarget")))catch()
)
)


--FRAMESIZE
spn_width.value=filmwidth
spn_height.value=filmheight

-- ANIMRANGE
spn_from.value=animationrange.start
spn_to.value=animationrange.end

-- CHECKBOXES
try
(
chk_GPU.checked=execute(getinisetting myIni "Checkboxes" "chk_GPU")
if chk_GPU.checked==true then edt_GPU.enabled=true else edt_GPU.enabled=false
edt_GPU.text=(getinisetting myIni "GPU" "edt_GPU")

)catch()

setSunstate()
getCamState()

-- try(edt_pName.text=theSPprojectname)catch()
)
on max2octane close do
(
callbacks.removeScripts id:#max2octane

try(setinisetting (objExp.getIniName()) "Geometry" "ObjScale" theobjexp_curscale)catch()
setinisetting myIni "Checkboxes" "chk_GPU" (max2octane.chk_GPU.checked as string)
setinisetting myIni "GPU" "edt_GPU" (max2octane.edt_GPU.text as string)
)
on btn_browse pressed do
(
myExe = getOpenFileName filename:"octane.exe" caption:"Please browse to and select the Octane executable" types:"Executable (*.exe)|*.exe" --donotwait:true
if ((myExe == undefined) OR (myExe == "")) do ( return false )
edt_path.text = myExe
setINISetting myIni "Binary" "value" myExe
)
on btn_pPath pressed do
(
-- getMypPath()
pPath = getSavePath()
if ((pPath == undefined) OR (pPath == "")) do ( return false )
if (substitutestring pPath " " "_")!=pPath then messagebox "No spaces in folder name" else
(
edt_pPath.text = pPath
setIniSetting myIni "ProjectPath" "value" pPath
)
)
on btn_pPath rightClick do
try
(
shelllaunch "explorer.exe" pPath
)catch()
on edt_pName entered pname do
(
filenamecheck=max2octane.edt_pName.text=(substitutestring(max2octane.edt_pName.text) " " "_")

if (doesFileExist (pPath+"\\"+filenamecheck+".ocs")==true) then
(
if querybox "File Exist - Overwrite?" title:"Max2Octane" then
(
setfocus max2octane
NEWproject=true
max2octane.edt_pName.readOnly=true
)
else
(
setfocus max2octane
NEWproject=undefined
max2octane.edt_pName.text=""
max2octane.edt_pName.readOnly=true
)
)
else
(
setfocus max2octane
NEWproject=true
max2octane.edt_pName.readOnly=true
)
max2octane.edt_pName.readOnly=true
)

on btn_new pressed do
(
edt_pName.readOnly=false
edt_pName.text=""
setfocus edt_pName
)


on btn_exproj pressed do
(
myProject = getOpenFileName filename:"*.ocs" caption:"Please browse to and select a project file" types:"txt (*.ocs)|*.ocs" --donotwait:true
if ((myProject == undefined) OR (myProject == "")) do ( return false )
edt_pPath.text = getFilenamePath myProject
edt_pName.text = getFilenameFile myProject

NEWProject=false
)
on chk_camera changed state do
(
getCamState()
if state == on then
(
if thecam == undefined or isdeleted thecam then
(
if getActiveCamera()!=undefined then thecam=getActiveCamera()
else
(
viewport.setType #view_persp_user
thecam=targetcamera isselected:on
thecam.type=#free
thecam.type=#target
macros.run "Lights and Cameras" "Camera_CreateFromView"
viewport.setCamera thecam
)
)
else
(
thecam_pos=thecam.pos
theTarget_pos=thecam.target.pos
theFOV=thecam.fov
)
ddl_cam.items=getSceneCameras()
)
else
(
thecam=undefined
)
)
on chk_lens changed state do
(
if state==on then
(
edt_aperture.enabled=true
sld_aperture.enabled=true
)
else
(
edt_aperture.enabled=false
sld_aperture.enabled=false
)
)
on chk_focal changed state do
(
if state==on then
(
edt_focal.enabled=true
sld_focal.enabled=true
)
else
(
edt_focal.enabled=false
sld_focal.enabled=false
)
)
on chk_sun changed state do
(
if lights[1]==undefined and state==true then
(
if (querybox "No lights in scene!\nCreate sun?" title:"max2octane") then
(
createsun()
ddl_light.items=getSceneLights()
setSunstate()
try(theOctaneSun=getnodebyname(ddl_light.items[1]))catch()
)
else
(
chk_sun.checked=false
)
)
else
(
ddl_light.items=getSceneLights()
setSunstate()
try(theOctaneSun=getnodebyname(ddl_light.items[1]))catch()
)
)
on btn_export pressed do
(
if (edt_pName.text== "") then (messageBox "Project Name Missing!")
else if (edt_pPath.text== "") then (messageBox "Project Path not set yet!")
else
(
rescaleScene()
outName = (edt_pPath.text + "\\" + edt_pName.text + "_" + ".obj")
exportFile outName selectedOnly:false using:objexp
)
)



--------------------------------------------
--RENDER STILL
--------------------------------------------


on btn_render pressed do
(

(
if (edt_pName.text== "") then (messageBox "Project Name Missing!" title:"MAX2Octane")
else
-- if classof thecam!=Targetcamera then (messagebox "Camera must\nbe standard targeted!" title:"max2octane") else
(
if (myExe != undefined) do
(
rescaleScene()

outName = (edt_pPath.text + "\\" + edt_pName.text + ".obj")
if (keyboard.controlpressed==true) then (exportFile outName selectedOnly:false using:objexp) else (exportFile outName #noPrompt selectedOnly:false using:objexp)

if (doesFileExist outName) == true do
(
getFlags()
str = stringStream ""

format "\"%\"" myExe to:str

a = ""
if (a != undefined) do ( format " -e %" "" to:str )
format "NEWproject = %\n" NEWproject
if (NEWproject==true) then ( format " -n % -m % -l %" (edt_ppath.text+"\\"+edt_pName.text+".ocs") (edt_pName.text+".obj") (edt_ppath.text+"\\"+edt_pName.text+".obj") to:str)
else
(if (NEWproject==false) do ( format " -m % -r % -s %" (edt_pName.text+".obj") (edt_ppath.text+"\\"+edt_pName.text+".obj") ("64000") to:str))


if theFlags[1]!=undefined do
(
format " --cam-pos-x %" theFlags[1][1] to:str
format " --cam-pos-y %" theFlags[1][3] to:str
format " --cam-pos-z %" -theFlags[1][2] to:str
)
if theFlags[2]!=undefined do
(
format " --cam-target-x %" theFlags[2][1] to:str
format " --cam-target-y %" theFlags[2][3] to:str
format " --cam-target-z %" -theFlags[2][2] to:str
)
if theFlags[3]!=undefined do ( format " --cam-fov %" theFlags[3] to:str )
if theFlags[4]!=undefined do ( format " --cam-focaldepth %" theFlags[4] to:str )
if theFlags[5]!=undefined do
(
format " --daylight-sundir-x %" theFlags[5][1] to:str
format " --daylight-sundir-y %" theFlags[5][3] to:str
format " --daylight-sundir-z %" -theFlags[5][2] to:str
)
if theFlags[6]!=undefined do --moblur
(
format " --cam-motion-pos-x %" theFlags[6][1][1] to:str
format " --cam-motion-pos-y %" theFlags[6][1][3] to:str
format " --cam-motion-pos-z %" -theFlags[6][1][2] to:str
format " --cam-motion-target-x %" theFlags[6][2][1] to:str
format " --cam-motion-target-y %" theFlags[6][2][3] to:str
format " --cam-motion-target-z %" -theFlags[6][2][2] to:str
)
if theFlags[7]!=undefined do
(
format " --film-width %" theFlags[7][1] to:str
format " --film-height %" theFlags[7][2] to:str
)
if theFlags[8]!=undefined do
(
format " --cam-aperture %" theFlags[8] to:str
)
if theFlags[9]!=undefined do --GPUs
(
for i =1 to theGPUs.count do
(
format " -g %" theFlags[9] to:str
)
)
if theFlags[10]!=undefined do
(
format " --cam-up-x %" -theFlags[10].x to:str
format " --cam-up-y %" -theFlags[10].z to:str
format " --cam-up-z %" theFlags[10].y to:str
)

if (NEWproject==false) then ( format " %" (edt_ppath.text+"\\"+edt_pName.text+".ocs") to:str)
else (edt_pName.text="")

print str
-- print theflags
-- HiddenDOSCommand (str as string + " || pause")
hiddenDOSCommand (str as string) donotwait:true

)--check for export
)

)
)
)
on btn_png pressed do
(
-- getMyPng()
myPng = getSavePath()
if ((myPng == undefined) OR (myPng == "")) do ( return false )
edt_png.text = myPng
setIniSetting myIni "PngOutput" "value" myPng
)
on spn_from changed val do
(
if spn_from.value>spn_to.value do spn_to.value=spn_from.value
)
on spn_to changed val do
(
if spn_to.value<spn_from.value do spn_from.value=spn_to.value
)
on chk_moblur changed state do
(
if state==on then
(
lbl_interpolate.enabled=on
ddl_interpolate.enabled=on
)
else
(
lbl_interpolate.enabled=off
ddl_interpolate.enabled=off
)
)
on ddl_units selected index do
(
spn_samples.value = ddlActualValues[index]
)



---------------------------------------------------
--ANIMATION
---------------------------------------------------



on btn_render_animation pressed do
(
if (NEWproject == true) or (edt_pName.text== "") then
(
messageBox "Please pick an Existing Project!" title:"Max2Octane"
)
else
(
if (myExe != undefined) and querybox "Render Animation?" title:"Max2Octane" do
(
data = getINISetting myIni "Binary" "value"
myExe = data
edt_path.text = myExe
setObjParams = false

--rescale scene
rescaleScene()
local batfile

-- theBatFile=createfile (batFile=(edt_pPath.text+"\\"+edt_pName.text+".txt"))

for f = (startFrame = spn_from.value ) to (endFrame = spn_to.value ) by (frameStep = spn_step.value) do
(
if (keyboard.escpressed!=true) do
(
sliderTime = f
outName = (edt_pPath.text + "\\" + edt_pName.text + "_anim.obj")

str = createfile (batFile=(edt_pPath.text+"\\"+edt_pName.text+"_"+f as string+"_"+".bat"))

pb_anim.value=100.0*f/spn_to.value
grp_progress.caption=("Animation Progress - " + f as string + " of " + (spn_to.value as string))

-- export the objects
if (chk_camonly.checked==false) do
(
if (keyboard.controlpressed==true) then (exportFile outName selectedOnly:false) else (exportFile outName #noPrompt selectedOnly:false)
)


-- now render them
getFlags()

format "octane " to:str

a = ""
if (a != undefined) do ( format " -e%" "" to:str )

( format " -q %" "" to:str )

if (chk_camonly.checked==false) then
(format " -o % -s % -m % -r %" (edt_png.text+"\\"+edt_pName.text+"_"+((1000+f) as string)+".png") (spn_samples.value) (edt_pName.text+".obj") (outName) to:str)
else
(format " -o % -s % -m % -l %" (edt_png.text+"\\"+edt_pName.text+"_"+((1000+f) as string)+".png") (spn_samples.value) (edt_pName.text+".obj") (edt_ppath.text+"\\"+edt_pName.text+".obj") to:str)


if theFlags[1]!=undefined do
(
format " --cam-pos-x %" theFlags[1][1] to:str
format " --cam-pos-y %" theFlags[1][3] to:str
format " --cam-pos-z %" -theFlags[1][2] to:str
)
if theFlags[2]!=undefined do
(
format " --cam-target-x %" theFlags[2][1] to:str
format " --cam-target-y %" theFlags[2][3] to:str
format " --cam-target-z %" -theFlags[2][2] to:str
)
if theFlags[3]!=undefined do ( format " --cam-fov %" theFlags[3] to:str )
if theFlags[4]!=undefined do ( format " --cam-focaldepth %" theFlags[4] to:str )
if theFlags[5]!=undefined do
(
format " --daylight-sundir-x %" theFlags[5][1] to:str
format " --daylight-sundir-y %" theFlags[5][3] to:str
format " --daylight-sundir-z %" -theFlags[5][2] to:str
)
if theFlags[6]!=undefined do --moblur
(
format " --cam-motion-pos-x %" theFlags[6][1][1] to:str
format " --cam-motion-pos-y %" theFlags[6][1][3] to:str
format " --cam-motion-pos-z %" -theFlags[6][1][2] to:str
format " --cam-motion-target-x %" theFlags[6][2][1] to:str
format " --cam-motion-target-y %" theFlags[6][2][3] to:str
format " --cam-motion-target-z %" -theFlags[6][2][2] to:str
)
if theFlags[7]!=undefined do
(
format " --film-width %" theFlags[7][1] to:str
format " --film-height %" theFlags[7][2] to:str
)
if theFlags[8]!=undefined do
(
format " --cam-aperture %" theFlags[8] to:str
)
if theFlags[9]!=undefined do --GPUs
(
for i =1 to theGPUs.count do
(
format " -g %" theFlags[9] to:str
)
)
if theFlags[10]!=undefined do
(
format " --cam-up-x %" -theFlags[10].x to:str
format " --cam-up-y %" -theFlags[10].z to:str
format " --cam-up-z %" theFlags[10].y to:str
)

(format " %" (edt_ppath.text+"\\"+edt_pName.text+".ocs") to:str)

close str
-- format "%" str to:BatFile
-- close str
-- print str
-- print theflags
-- HiddenDOSCommand (str as string + " || pause")
-- DOSCommand (str as string)
)--escape loop
) -- anim loop
pb_anim.value=0
grp_progress.caption="Animation Progress"

shelllaunch ppath ""
) -- myExe != undefined
) -- edt_pName.text == "" | else
) -- on btn_render_animation pressed
on ddl_cam selected cam do
(
thecam=getnodebyname(max2octane.ddl_cam.items[cam])
if thecam.type==#free and (getnodebyname (thecam.name+"_OctaneTarget"))==undefined then
(
--|| Free/Target Camera workaround
thecamtarget=dummy name:(thecam.name+"_OctaneTarget") transform:thecam.transform isfrozen:true
in coordsys local move thecamtarget [0,0,-800]
thecamtarget.parent=thecam
)
thecamtarget=(getnodebyname (thecam.name+"_OctaneTarget"))
print thecam
print thecamtarget
-- viewport.setCamera thecam
)
on chk_res changed state do
(
setFilmstate()
)
on spn_width changed val do
(
w=val
if btn_lock.checked==true do spn_height.value = val * (1.0 / aspect)
)
on spn_height changed val do
(
h=val
if btn_lock.checked==true do spn_width.value = val * aspect
)
on ddl_percent selected percent do
(
spn_width.value=
case percent of
(
1: w*1
2: w*0.75
3: w*0.5
4: w*0.25
)
spn_height.value=
case percent of
(
1: h*1
2: h*0.75
3: h*0.5
4: h*0.25
)
)
on ddl_light selected thelight do
(
theOctaneSun=getnodebyname(max2octane.ddl_light.items[thelight])
print theOctaneSun
)
on edt_aperture entered aperture do
(
sld_aperture.value=execute aperture
)
on edt_focal entered focal do
(
sld_focal.value=execute focal
)
on sld_aperture changed val do
(
edt_aperture.text=val as string
)
on sld_focal changed val do
(
edt_focal.text=val as string
)
on btn_lock changed state do
(
aspect = (spn_width.value as float) / spn_height.value
)
on chk_GPU changed state do
(
if state==true then edt_GPU.enabled=true else edt_GPU.enabled=false
)
on btn_edit pressed do
(
editScene = getOpenFileName filename:"*.ocs" caption:"Please browse to and select a project file" types:"txt (*.ocs)|*.ocs" --donotwait:true
if ((editScene == undefined) OR (editScene == "")) do ( return false )
shelllaunch editScene ""
-- editScene=(edt_ppath.text+"\\"+edt_pName.text+".ocs")
-- editstr=stringstream ""
-- format "\"%\"" myExe to:editstr
-- ( format " -e %" "" to:editstr )
-- ( format " -m % -r % -s %" (edt_pName.text+".obj") (edt_ppath.text+"\\"+edt_pName.text+".obj") ("16000") to:editstr)
-- ( format " %" editscene to:editstr)
-- hiddenDOSCommand (editstr as string) donotwait:true
-- close editstr
)
)
createdialog max2octane modal:false style:#(#style_sysmenu, #style_minimizebox, #style_titlebar)
my humble spec: Quad Cores Q6600 @ 2.4 Ghz, 2GB, GeForce GTX 460 (x2), winXP 32 bit, 3DS MAx 2009
sublime
Licensed Customer
Posts: 93
Joined: Thu Mar 18, 2010 9:31 am

secondly, copy this one and put it in notepad, save it as .bat

::Change "teapot" to your project name
::If your Project name is Archvizanim_2 then replace (teapot*) with (Archvizanim*) below

For %%f in (teapot*) do (
CMD /C %%f
)
my humble spec: Quad Cores Q6600 @ 2.4 Ghz, 2GB, GeForce GTX 460 (x2), winXP 32 bit, 3DS MAx 2009
kilaD
Licensed Customer
Posts: 215
Joined: Sun Mar 21, 2010 12:34 pm
Location: Norway
Contact:

I think an automated system like this would be hard to get working properly.
What if (or when) 3dsmax crashes or hangs? Or the fact that octane renders your computer/gfxcard
pretty much useless for other tasks.

It would be better to do this manually in my opinion. Create a forum with a small Octane-club where you can post your scenes
and ask for help rendering e.g 500 frames. Then members can download your ocs, obj and textures and render them manually and upload to a ftp.

In return they get credits so they can buy better cards :)
Or you could even get paid for rendering frames... 0.05 eur per frame! There's a reason why capitalism works.
Hello
sublime
Licensed Customer
Posts: 93
Joined: Thu Mar 18, 2010 9:31 am

It would be better to do this manually in my opinion. Create a forum with a small Octane-club where you can post your scenes
and ask for help rendering e.g 500 frames. Then members can download your ocs, obj and textures and render them manually and upload to a ftp.
That is exactly what im saying, simple straight forward and its a fool proof as well. Besides by using your script you made for me we dont need to provide max file or cinema4D file,..
my humble spec: Quad Cores Q6600 @ 2.4 Ghz, 2GB, GeForce GTX 460 (x2), winXP 32 bit, 3DS MAx 2009
User avatar
matej
Licensed Customer
Posts: 2083
Joined: Fri Jun 25, 2010 7:54 pm
Location: Slovenia

If I understand correctly this method works only if the camera is the only animated object and only within 3dsmax (we would need such scripts for all the supported 3D packages). It's a start. But for 'real' animations, there's still a lot of data to move around.

But the main issue here is sharing all the sources. People will be reluctant to do that, I'm sure (for real projects I mean). Now if Octane supported loading scene data in some sort of encrypted archives... you wold download the archive and then get a 'certificate' to render the scene from the LiveDB, that will be valid for only that session. Without it the scene would not render. Something like that :)

BTW, sublime, better post such long files as attachments or here
SW: Octane 3.05 | Linux Mint 18.1 64bit | Blender 2.78 HW: EVGA GTX 1070 | i5 2500K | 16GB RAM Drivers: 375.26
cgmo.net
sublime
Licensed Customer
Posts: 93
Joined: Thu Mar 18, 2010 9:31 am

If I understand correctly this method works only if the camera is the only animated object and only within 3dsmax (we would need such scripts for all the supported 3D packages). It's a start. But for 'real' animations, there's still a lot of data to move around.
It is, and therefore need support from everyone.
Yes, the script is only for camera movement only, but still, it is a good option to replace "camera only".

As in for data, my biggest file so far is 50MB with texture not more than 20MB. I dont think Octane it self could handle too big scene anyway,.. 50MB is nothing really, im sure in this day and age people download much more than that, legally or illegaly,
my humble spec: Quad Cores Q6600 @ 2.4 Ghz, 2GB, GeForce GTX 460 (x2), winXP 32 bit, 3DS MAx 2009
areyal
Licensed Customer
Posts: 75
Joined: Tue Feb 15, 2011 3:57 pm

Sublime,

First I was a bit skeptical but you have convinced me. It is a very interesting idea.

I think that doing it manually would limit the people interested on it, because the additional time you'd have to invest on it.

If it could be similar to the way e-mule works, It would be awesome.
A few years ago I participated in the Worldwide Grid Project (supported by IBM) where you shared your computer's idle time in calculating for scientific projects.

I can imagine an Octane version where you can leave it in background, and it is calculating in your GPU (which you don't need now) a net-render. When you need to work with octane, you simply open it, net-render stops automatically (you don't even need to notice it) and you can inmediately start working in your Octane.

The possibility of a community farm in the way p2p works would be a big point for octane, sure.
But to have future probably It would need to force people to share their resources (If you render a project, you later should help render another).


Regards
GPU GTX 480 / GT 430 for UI
CPU Intel Core 2 Quad Q8300 (2.5 Ghz) / RAM 8 GB DDR2
SOFT Windows 7 64bit4
Post Reply

Return to “General Discussion”