backburner for Distributed rendering with terragen2

Started by miqtidar, November 25, 2010, 07:51:44 PM

Previous topic - Next topic

miqtidar

Hello every one.

Can somebody explain how i can use backburner for Distributed rendering with terragen2?

I mean using 2 computer together to render one single image or may be 3 computers?

I have looked to this post but process is not explained.

http://forums.planetside.co.uk/index.php?topic=5421.0



miqtidar


Tangled-Universe

Unfortunately I don't have more than 1 PC to do something similar like you :(

My guess is that the guy in the link you posted is splitting his tgd's up in render-regions to be rendered.
These separate tgd's are then distributed via the rendermanager.

As far as I know, there's no other way.

Martin

Oshyan

Sorry about the late response. For splitting up a single render, you must use Crop Regions (ideally with some overlap) and create multiple TGDs, one with each crop region, which are then distributed for rendering across several computers. The distributed rendering would be controlled by Backburner using its commandline support by calling the Terragen executable with a different TGD file on each rendering machine. Once each crop area is rendered you then need to reassemble them using a stitching application of some kind. Photoshop can handle this, as can Panotools/Huigin (free), and many other systems.

This is not quite as simple as a one-click operation, it requires a little bit of setup, so it's not something you would likely use on a daily basis. But if you are making a very high resolution or high quality final image it can be useful to distribute the load across several systems to reduce render time.

- Oshyan

miqtidar

Thanks Oshyan,
That was the great answer i wanted to know it helped alot.

By the way Thanks for the new update.

Njen

For help on submitting your actual files to backburner using the commandline (as long as your environment variables are set correctly), you can use the following line and modify it to suit your needs:

exec cmdjob -jobname:$jobName -manager:$managerAddress -priority:$priority -description:$description -tp_start:$firstFrame -numTasks:$numTasks -taskname:1 $tgdExe -x $file %tp1

Where:
$jobName = The name of your job.
$managerAddress = The IP address of your manager, most probably something similar to 192.168.10.1.
$priority = The priority value of your job.
$firstFrame = The first frame of your animation, typically "1".
$numTasks = The number of frames in your animation. If it's a single frame, it will be "1".
$tgdExe = The path to the Terragen executable.
$file = The path and name of the file to render, eg: "S:\Terragen\file.tgd".

An example:
exec cmdjob -jobname:"Sunset Field" -manager:192.168.10.1 -priority:50 -description:"crop1" -tp_start:1 -numTasks:1 -taskname:1 "D:\Program Files (32 bit)\Planetside Software\Terragen 2 Deep Edition\tgd.exe" -x "S:\Terragen\file.tgd" %tp1


FlynnAD

#7
Hi all,

This is an old thread, but still seems to be the most relevant. Oshyan referenced it just a couple months ago: (topic 15739).

I am using Backburner v.2012 and TG2.5.5.0. Using njen's code, I revised it to:

cmdjob -jobname:"Sunset Field" -tp_start:1 -taskname:1 "C:\Program Files\Planetside Software\Terragen 2 Deep Edition\tgd.exe" "D:\file.tgd" %tp1.

The portions of the command for the $manageraddress, $priority, $description are not required if you're sending it to the default Backburner manager. It still works fine.

I also got an error when using "-x" before the .tgd file; Terragen 2 said that it couldn't open the file. So I took this off, and there were no errors opening the file.

Now the file loaded into Backburner's queue properly, TG2 booted up, then opened the file, but then did not do anything further. Nothing rendered. Are there more commands needed in cmdjob to run the renderer?

Also, if you have numerous Render nodes in your scene (Full Render, Quick Render, Animation Fast Test Render, etc), does this cmdjob code by default use the checked Master Render node?

If you want to render an animation (not through Backburner), you have to click on the Render node, then the Sequence/Output tab, then on Render Sequence. Just hitting "Render Image" will never save the output; the user has to do that himself. How can you make sure Backburner saves the file and doesn't just render without saving?

Lastly, in a recent TG3 post, Oshyan wrote that "Node rendering on Mac/Win is done through the existing CLI version. You can use a commandline flag to hide the UI if desired.". What is the CLI version of node rendering? Is it easier than Backburner?

Attached is a list of the Backburner cmdjob commands and a test tgd file.

Thanks for the help,
-Matt


Matt

Hi Matt,

Following the name of the Terragen executable and project file, you need to pass additional switches and parameters to tell Terragen to render a frame (or set of frames). Here are some examples taken from the win_command_line.txt document in the docs folder of your installation:

Quote
Run Terragen without the GUI, render frame 42, then close:

    "%TERRAGEN_PATH%/tgdcli" -p myproject.tgd -hide -exit -r -f 42

Run Terragen without the GUI, render frames 1,4,51,53,55,57,59, then close:

    "%TERRAGEN_PATH%/tgdcli" -p myproject.tgd -hide -exit -r -f 1,4,51-60/2

What you should take away from the above is the use of "-hide -exit -r -f" followed by the frame (or set of frames) that you want to render. Without these, Terragen will simply load the project and sit there waiting for you to do something.

You should probably also use tgdcli instead of tgd (on Windows). The differences are minimal, but I think tgdcli.exe handles returning of control to the calling process in a different way to tgd.exe.

For more information and other options available on the command line, refer to the docs folder of your installation.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

FlynnAD

Quote from: Matt on June 15, 2013, 06:43:21 AM
<...>
For more information and other options available on the command line, refer to the docs folder of your installation.

Matt,

Thank you for the script and location of the docs folder. Really helpful.

-Matt

stevesideas

This thread has really helped me but I need some additional help if you don't mind.

I have 4 render nodes each with Terragen 2 installed.

I have this .bat file setup:

cmdjob -jobname:"terragentest1" -manager:192.168.0.4 -tp_start:1 -taskname:1 "c:\Program Files\Planetside Software\Terragen 2 Deep Edition\tgdcli.exe" "\\MAINCOMP\graphics files\MAXSCENES\aircraft_test\terragen_files\landscape_.tgd" -exit -r -f 1-250

This seems to work to an extent but only sends one task (which I assume is the full 1-250 frames) to one render node. How do I split the animation between the nodes and render a sequence where backburner allocates a frame depending on the node availability? Similar to the way 3dsmax renders are handled.

Any help appreciated

Matt

I am not familiar enough with Backburner to answer the question. But I can give some pointers. Backburner will somehow need to be told the frame range in its own syntax. I don't know what that syntax is, but it doesn't appear to be in your example. The "1-250" in your example is probably just being sent directly to Terragen. That might need to be replaced by some Backburner variable so that Backburner tells Terragen a different frame each time it calls Terragen.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Matt

From what I can piece together from the above information, I think you might need to add -numTasks:250 after -tp_start:1 and then add -f %tp1 at the very end of the Terragen part. I can't test it from here though.

So, if I modify your code it would be this:

cmdjob -jobname:"terragentest1" -manager:192.168.0.4 -tp_start:1 -numTasks:250 -taskname:1 "c:\Program Files\Planetside Software\Terragen 2 Deep Edition\tgdcli.exe" "\\MAINCOMP\graphics files\MAXSCENES\aircraft_test\terragen_files\landscape_.tgd" -exit -r -f %tp1

I'm really not sure though.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

stevesideas

Thanks for this. I'll let you know how things go.

stevesideas

Quote from: Matt on June 28, 2013, 03:32:24 AM
From what I can piece together from the above information, I think you might need to add -numTasks:250 after -tp_start:1 and then add -f %tp1 at the very end of the Terragen part. I can't test it from here though.

So, if I modify your code it would be this:

cmdjob -jobname:"terragentest1" -manager:192.168.0.4 -tp_start:1 -numTasks:250 -taskname:1 "c:\Program Files\Planetside Software\Terragen 2 Deep Edition\tgdcli.exe" "\\MAINCOMP\graphics files\MAXSCENES\aircraft_test\terragen_files\landscape_.tgd" -exit -r -f %tp1

I'm really not sure though.

Matt

Brilliant ! This is working a treat. Thank you very much !

Just a couple more questions if possible. Is it possible to 1. Just show the render window on each render node so I can see the progression per frame ? and 2. I have added the path to terragen in the environment variables but when I set the terragen path as "tgdcli.exe" in the BAT file there is an error when the nodes try to batch render. They can't see terragen path for some reason. I have to set it to the full path for it to work.