PDA

Visualizza Versione Completa : DrQueue script per Lightwave e Wine



svedese
08-02-11, 21:06
Ciao a tutti e complimenti per l'interessantissimo forum!

Mi sto occupando di mettere su una piccola render farm che effettui i calcoli per un mio amico che modella (lui ci mette l'arte, io la forza bruta ;-)).
Per vari motivi la scelta è caduta su Linux come sistema operativo e DrQueue come rendering manager. L'installazione è filata liscia ed ora ho 5 macchine virtuali di test con DrQueue installato e funzionante (1 master + 4 slave).

Il problema inizia quando invio i jobs: lo script generator non prevede linux+wine come sistema per i slave ed io conosco ben poco di python.
Ho cercato di copiare quanto previsto per lo script di Cinema 4D, inserendo le seguenti righe nel file lightwave_sg.py:


if DRQUEUE_OS == "LINUX":
# we use wine on linux (this is a hack, but works)
# there is a tightvnc server running on display :1
# see wine bug #8069
# the user running DrQueue slave process needs to have wine and Cinema4D installed

# convert to windows path with drive letter
SCENE=subprocess.Popen(['winepath', '-w ' + SCENE], stdout=subprocess.PIPE).communicate()[0]
PROJECTDIR=subprocess.Popen(["winepath", "-w "+PROJECTDIR], stdout=subprocess.PIPE).communicate()[0]
CONFIGDIR = subprocess.Popen(["winepath", "-w "+CONFIGDIR], stdout=subprocess.PIPE).communicate()[0]

WORKDIR="/var/drqueue/render/Lightwave/Programs"
ENGINE_PATH="wine lwsn.exe"

# change into workdir, better for wine startup
os.chdir(WORKDIR)

# set env variable, so wine can access the xserver even though we are rendering headless
#os.environ["DISPLAY"]=":1"Purtroppo il rendering non parte, sembra che lwsn.exe non riceva i parametri. Nei file log ho infatti trovato i seguenti errori:


Log started at Tue Feb 8 00:13:24 2011
Computer: VirtualBox-1
Log filename: /var/drqueue/logs/000.teiere005/teiere005.0001

winepath: invalid option '- '
Try 'winepath --help' for help
winepath: invalid option '- '
Try 'winepath --help' for help
winepath: invalid option '- '
Try 'winepath --help' for help
wine lwsn.exe -3 -c -d 1 1 1
wine: cannot find L"D:\\Lightwave\\Programs\\lwsn.exe"
Requeueing frame...
Tue Feb 8 00:13:26 2011 (PID:17785) : | Info | Computer: name:'VirtualBox-1' id:'0' : Task: Jobid:'0' Jobname:'teiere005' Frame:'1' Taskid:'0' Compid:'0' : -> MSG: Task signaled
Log started at Tue Feb 8 00:13:26 2011
Computer: VirtualBox-1
Log filename: /var/drqueue/logs/000.teiere005/teiere005.0001

winepath: invalid option '- '
Try 'winepath --help' for help
winepath: invalid option '- '
Try 'winepath --help' for help
winepath: invalid option '- '
Try 'winepath --help' for help
wine lwsn.exe -3 -c -d 1 1 1
Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:systray:initialize_systray Could not create tray window
err:wgl:process_attach X11DRV or GDI32 not loaded. Cannot create default context.
err:module:attach_process_dlls "opengl32.dll" failed to initialize, aborting
err:module:LdrInitializeThunk Main exe initialization for L"D:\\Lightwave\\Programs\\lwsn.exe" failed, status c0000142
Requeueing frame...
Tue Feb 8 00:13:28 2011 (PID:17832) : | Info | Computer: name:'VirtualBox-1' id:'0' : Task: Jobid:'0' Jobname:'teiere005' Frame:'1' Taskid:'0' Compid:'0' : -> MSG: Task signaled
Log started at Tue Feb 8 00:13:28 2011
Computer: VirtualBox-1
Log filename: /var/drqueue/logs/000.teiere005/teiere005.0001

...e così via.
Mi manca solo questo ultimo passaggio e poi metto tutto in un tutorial. Qualcuno è in grado di aiutarmi?

Grazie!!

Bruscolì
11-02-11, 01:01
Hai provato a fare un rendering di prova con lo screamer net a riga di comando per vedere se funziona ?

Il problema sembra il path nelle impostazioni di wine, credo ...

Hai visto che lw 10 c'è anche per linux ... forse con quella versione potresti avere meno problemi !!

Fulvio

viandante
11-02-11, 10:25
SCENE=subprocess.Popen(['winepath', '-w ' + SCENE], stdout=subprocess.PIPE).communicate()[0]
PROJECTDIR=subprocess.Popen(["winepath", "-w "+PROJECTDIR], stdout=subprocess.PIPE).communicate()[0]
CONFIGDIR = subprocess.Popen(["winepath", "-w "+CONFIGDIR], stdout=subprocess.PIPE).communicate()[0]

Secondo me l'arcano è in queste 3 righe... dovresti controllare se nel path della scena/progetto/configurazione ci sono dei trattini seguiti da uno spazio...

Potrebbe essere un problema di conversione di path...
Inoltre, sembra che voglia aprire una finestra... se il comando lo lanci da remoto e non "a manella", senza X attivo non funziona...

svedese
15-02-11, 23:01
Vi ringrazio per le risposte!
Avevo provato a lanciare lwsn.exe da riga di comando, funziona tutto perfettamente (è la soluzione che uso provvisoriamente).
Ottimo il consiglio di lw 10, purtroppo ho letto che la versione linux è ancora in beta... oltretutto con wine posso far girare svariati altri motori di rendering.

Ho modificato lo script nel modo seguente:

SCENE=subprocess.Popen(['winepath', '-w', SCENE], stdout=subprocess.PIPE).communicate()[0]
PROJECTDIR=subprocess.Popen(['winepath', '-w', PROJECTDIR], stdout=subprocess.PIPE).communicate()[0]
CONFIGDIR = subprocess.Popen(['winepath', '-w', CONFIGDIR], stdout=subprocess.PIPE).communicate()[0]

WORKDIR="/var/drqueue/render/Lightwave/Programs"
ENGINE_PATH="wine lwsn.exe"

# change into workdir, better for wine startup
os.chdir(WORKDIR)

# set env variable, so wine can access the xserver even though we are rendering headless
#os.environ["DISPLAY"]=":1"


BLOCK = DRQUEUE_FRAME + DRQUEUE_BLOCKSIZE - 1

if BLOCK > DRQUEUE_ENDFRAME:
BLOCK = DRQUEUE_ENDFRAME


#ENGINE_PATH="wine /var/drqueue/render/LightWave/Programs/lwsn"

command = ENGINE_PATH+" -3 -c"+CONFIGDIR+" -d"+PROJECTDIR+" "+SCENE+" "+str(DRQUEUE_FRAME)+" "+str(BLOCK)+" "+str(DRQUEUE_STEPFRAME)Purtroppo il risultato è sempre un errore, i parametri vengono passati correttamente ma vengono inseriti anche degli a capo.
In più devo racchiudere tra "" i percorsi altrimenti non vengono interpretati correttamente.


wine lwsn.exe -3 -cD:\Lightwave\Config
-dD:\Content
D:\Content\Scenes\Benchmark_Red_Teapots.lws
1 1 1
err:wgl:process_attach X11DRV or GDI32 not loaded. Cannot create default context.
err:module:attach_process_dlls "opengl32.dll" failed to initialize, aborting
err:module:LdrInitializeThunk Main exe initialization for L"D:\\Lightwave\\Programs\\lwsn.exe" failed, status c0000142
/bin/sh: -dD:Content: not found
/bin/sh: D:ContentScenesBenchmark_Red_Teapots.lws: not found
/bin/sh: 1: not found
Requeueing frame...Effettivamente senza X non funziona, ma questa parte mi spaventa meno in quanto ho già trovato un tutorial abbastanza aggiornato.