Cinema 4D linux command line render ?

Anyone using the c4d clr on linux?

Have set this up on centos 7.4 but can’t find/get any documentation on setup etc, was wondering if anyone successfully set this up?

Thanks
Ant

I have the install guide, it’s nothing beyond the obvious (attached)

no info on where to put the license.ini, so I copied it everywhere (/opt/maxon/… AND /root/MAXON/… and that’s stopped the license issue)

running c4d_clr --help gives

[code]General Options:
-nogui … start without user interface
-license [ip [port]] … specifies the license server
-noopengl … disable OpenGL and avoid loading OpenGL libraries
-oglversion=xxx … force a specific OpenGL version. xxx must be 100 * (major version) + (minor version)
-title … set the window title
-xembed winid … run c4d embedded (winid is the parent window as decimal number)
-layout filename … use a custom startup layout
-crashtest … causes an exception to test the built-in signal handler
-nocrashhandler … suppress use of the application’s crash handler
-nogui_nothreads … special commandline debug mode
-debug … enable debug output
-g_alloc=debug … enable debug memory allocator (leak detection)
-g_alloc=release … enable release memory allocator

Render Options:
-render filename … specify a file to render
-frame from [to [step]] … specify start frame, end frame and frame step. ‘to’ and ‘step’ are optional
-oimage imagename … override the image output path for rendering
-omultipass imagename … override the multipass output path for rendering
-oformat imageformat … override the image output format to TIFF/TGA/BMP/IFF/JPG/PICT/PSD/PSB/RLA/RPF/B3D
-oresolution width height … override output image size
-threads threadcnt … specify number of threads (0 for auto-detection)
-take takename … specify the take name for rendering[/code]

so now if I run a test directly on the machine, it renders out (of course missing windows mapped alembics etc)
/opt/maxon/cinema4d/19.024/bin/c4d_clr -render /mnt/servername/tests/c4d/r19_abc.c4d -oimage /tmp/test.jpg

If I run a render through Deadline I get all sorts of issues

2017-11-23 10:49:50: 0: STDOUT: argv[0] = (null) 2017-11-23 10:49:50: 0: STDOUT: argv[1] = -nogui 2017-11-23 10:49:50: 0: STDOUT: argv[2] = -DeadlineConnect 36982 389883408210 2017-11-23 10:49:50: 0: STDOUT: Could not initialize OpenGL system: Could not load dll. Error code: libGL.so: cannot open shared object file: No such file or directory. (relative:///libGL.so) [linux_dll.cpp(89)] 2017-11-23 10:49:50: 0: STDOUT: loading plugin directory: /tmp/Thinkbox/Deadline10/root/slave/linuxbox/plugins/5a141d353548b727acfcff0c 2017-11-23 10:49:50: 0: STDOUT: Error: HOME PATH not set 2017-11-23 10:49:50: 0: STDOUT: License Path does not exists () 2017-11-23 10:49:50: 0: STDOUT: License Directory does not exist [] 2017-11-23 10:49:50: 0: STDOUT: Loading LP_solve lib: /opt/maxon/cinema4d/19.024/bin/resource/modules/motiontracker/liblpsolve55.so 2017-11-23 10:49:50: 0: STDOUT: Warning! Unknown arguments: -DeadlineConnect 36982 389883408210 2017-11-23 10:49:50: 0: STDOUT: C4D END

The args supplied from the commandline are different to the ones from deadlin

argv[0] = (null) argv[1] = -render argv[2] = /mnt/servername/tests/c4d/r19_abc.c4d argv[3] = -oimage argv[4] = /tmp/test.jpg

There was no option in the plugin config for linux so I’m guessing this is something that has never been looked at by Thinkbox?
160812_R18 Installation Guide Linux Command_final.pdf (272 KB)

Excellent testing notes Ant! There was all kinds of trouble 11 months ago when we tried testing a beta version of this Linux build (C4D issues, not Deadline). Can you send us a private ticket/note on what customers are asking for this and that will help draw attention to the dev team.

Anyone else reading this thread, really want a Linux version of C4D to work on Deadline?

Thanks Mike,

I thought the c4d linux versions was one of those industry jokes, like Autodesk Flame on Windows :wink:

So I finally got a copy, it seems hard work extracting any kind of assistance or help with it though!

There’s no specific client, it’s just for testing as one of the reasons for using windows render nodes is C4D (the other being After Effects)

I’m interested in this as it maybe beneficial to cloud rendering etc.

It’s odd as there is no full linux release, and seemingly no method of path translation, maybe if you work on mac and map the linux drives under /Volumes/ it may work?

Majority of C4D users seem to prefer rendering directly with C4D than exporting to .ASS etc.

I think if there is the ability to run linux nodes then there’s most like to be the ability to export .ASS etc.

The painful bit is licensing as you still need to buy a C4D Commandline Render when just about everybody else hands out free commandline render licenses!

No need to add any resources unnecessarily, be interested to see if anyone is using it out there or is interested in using it?

Hey Mike,

I also really want a Linux version of C4D to work on Deadline :smiley:

You guys are ace! :sunglasses: I’m requesting a CLR from Maxon so I can test this out

10.0.12.1
Cinema 4D for Linux is now supported.
docs.thinkboxsoftware.com/produ … notes.html

We had to do some sneaky stuff with Python pathing, so it’s all of Grant’s efforts to get that working out of the box. :slight_smile:

I’ve installed the R19.053 on Centos 7

It needs a license.ini file creating in the bin folder like on Windows and OSX, so should pick this up once it’s been created

there is a setup_c4d_env file in the bin folder which contains the following

[code]# source this file to setup the Cinema 4D environment

C4D_BASE=$PWD/…

export LD_LIBRARY_PATH=$C4D_BASE/lib64:$C4D_BASE/bin/resource/modules/python/Python.linux64.framework/lib64
export PATH=$PATH:$C4D_BASE/bin
export LC_NUMERIC=en_US.UTF-8[/code]

This doesn’t seem to work but manually adding them does

Works great now, still have to do the export project before submitting a file with alembic though

Well, usually ‘env’ files are just sourced before using the application. I’m still not sure why they aren’t configuring these things within Cinema as a fallback plan. While it’s not quite the Unix way, making it easier on people is usually a win-win.

Back to c4d linux again!

I’m having an issue with the env vars being set by Deadline,

2019-11-28 11:07:59:  0: Loading Job's Plugin timeout is Disabled
2019-11-28 11:08:01:  0: Executing plugin command of type 'Sync Files for Job'
2019-11-28 11:08:01:  0: All job files are already synchronized
2019-11-28 11:08:01:  0: Plugin Cinema4DBatch was already synchronized.
2019-11-28 11:08:01:  0: Done executing plugin command of type 'Sync Files for Job'
2019-11-28 11:08:02:  0: Executing plugin command of type 'Initialize Plugin'
2019-11-28 11:08:02:  0: INFO: Executing plugin script '/root/Thinkbox/Deadline10/slave/GPU-01-A/plugins/5ddfa6250866c208188ce58e/Cinema4DBatch.py'
2019-11-28 11:08:02:  0: INFO: About: Cinema 4D Batch Plugin for Deadline
2019-11-28 11:08:02:  0: INFO: Render Job As User disabled, running as current user 'root'
2019-11-28 11:08:02:  0: INFO: The job's environment will be merged with the current environment before rendering
2019-11-28 11:08:02:  0: Done executing plugin command of type 'Initialize Plugin'
2019-11-28 11:08:02:  0: Start Job timeout is disabled.
2019-11-28 11:08:02:  0: Task timeout is disabled.
2019-11-28 11:08:02:  0: Loaded job: r20.059_simple (5ddfa6250866c208188ce58e)
2019-11-28 11:08:02:  0: Executing plugin command of type 'Start Job'
2019-11-28 11:08:02:  0: DEBUG: S3BackedCache Client is not installed.
2019-11-28 11:08:02:  0: INFO: Executing global asset transfer preload script '/root/Thinkbox/Deadline10/slave/xxx/plugins/5ddfa6250866c208188ce58e/GlobalAssetTransferPreLoad.py'
2019-11-28 11:08:02:  0: INFO: Looking for AWS Portal File Transfer...
2019-11-28 11:08:02:  0: INFO: Looking for File Transfer controller in /opt/Thinkbox/S3BackedCache/bin/task.py...
2019-11-28 11:08:02:  0: INFO: Could not find AWS Portal File Transfer.
2019-11-28 11:08:02:  0: INFO: AWS Portal File Transfer is not installed on the system.
2019-11-28 11:08:02:  0: INFO: Start Job called - starting up Cinema 4D Batch plugin
2019-11-28 11:08:02:  0: INFO: Not enforcing a build of Cinema 4D
2019-11-28 11:08:02:  0: CheckPathMapping: Swapped "Z:\xxx\r20_simple_export.c4d" with "/mnt/xxx\r20_simple_export.c4d"
2019-11-28 11:08:02:  0: INFO: [g_additionalModulePath] set to: /root/Thinkbox/Deadline10/slave/GPU-01-A/plugins/5ddfa6250866c208188ce58e
2019-11-28 11:08:02:  0: INFO: [LD_LIBRARY_PATH] set to /opt/maxon/cinema4d/20.026/bin/../lib64:/opt/maxon/cinema4d/20.026/bin/resource/modules/python/Python.linux64.framework/lib64:/opt/maxon/cinema4d/20.026/bin/resource/modules/embree.module/libs/linux64:
2019-11-28 11:08:02:  0: INFO: [PYTHONPATH] set to /opt/maxon/cinema4d/20.026/bin/resource/modules/python/Python.linux64.framework/lib/python2.7:/opt/maxon/cinema4d/20.026/bin/resource/modules/python/Python.linux64.framework/lib64/python2.7/lib-dynload:
2019-11-28 11:08:02:  0: INFO: [PATH] set to /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin:/opt/maxon/cinema4d/20.026/bin
2019-11-28 11:08:02:  0: INFO: Cinema 4D socket connection port: 41353

The Deadline path points here
/opt/maxon/cinema4d/20.026/bin/resource/modules/python/Python.linux64.framework/lib64

The linux rendernode is actually here
/opt/maxon/cinema4d/20.026/bin/resource/modules/python/libs/linux64/python.linux64.framework/lib64/

So the python paths are different and I think this is what’s breaking it
/python/Python.linux64.framework/lib64
/python/libs/linux64/python.linux64.framework/lib64/

Is it possible to have the path options in the Deadline plugin options so you can modify this, would be handy for centralised installs also.

What I’ve done is edit the ‘Cinema4DBatch.py’ file in the c4d plugin folder

Changed this part

modLdPath = "%s/../lib64:%s/resource/modules/python/Python.linux64.framework/lib64:%s/resource/modules/embree.module/libs/linux64:%s" % ( c4dDir, c4dDir, c4dDir, ldPath )
modPyPath = "%s/resource/modules/python/Python.linux64.framework/lib/python2.7:%s/resource/modules/python/Python.linux64.framework/lib64/python2.7/lib-dynload:%s" % ( c4dDir, c4dDir, pyPath )
modPath = "%s:%s" % ( path, c4dDir )

to this

modLdPath = "%s/../lib64:%s/resource/modules/python/libs/linux64/python.linux64.framework/lib64:%s/resource/modules/embree.module/libs/linux64:%s" % ( c4dDir, c4dDir, c4dDir, ldPath )
modPyPath = "%s/resource/modules/python/libs/linux64/python.linux64.framework/lib/python2.7:%s/resource/modules/python/libs/linux64/python.linux64.framework/lib64/python2.7/lib-dynload:%s" % ( c4dDir, c4dDir, pyPath )
modPath = "%s:%s" % ( path, c4dDir )

I’ve just checked and the Deadline code is for R19, so this is changed in R20. R21 is the same as R20 but they’ve changed the app folder name!!

another odd thing was rendering locally was no problem, but through deadline it didn’t get a license, solved this issue by copying license.ini from bin to
~/MAXON/.
and
~/Maxon.

I’m not entirely sure this is an issue as tested another node this wasn’t required…