TGD Batch for Terragen 2 – V7

Had an idea to make a community renderfarm system for Terragen 2.
I already have the TGD_Batch program and if I refactor it right, then it seems like a good start.
Renaming it to Batch_TG2 seems like a good idea. Maybe there is a better name to use…?

SO this is the refactor – later there will be the server to manage the community farm.

It lets you:
– Break up a large image into smaller tiles for spreading the render load
– Create Panorama images in Equirectangular projection for reflection and environment maps.
– Blend between values of parameters to create wedges. Makes single, two and three axis blends. Annotates these images and montage into grids so they can be easily understood.

You need to have a licensed copy of Terragen2 for the commandline version to work. This will not work on the free version.

What’s happened is:
– The older Pythoncard UI has been swapped out for a more modern QT based UI.
– General refactoring and cleanup has occurred especially the cruft to support notebooks in pythonCard (which did not work that well) has been removed.
– A render thread has been added so the UI doesn’t block when it goes off to render locally
– All renders are processed in two passes
– one gathers them all into a new Task class containing individual RenderActions for each and every image
– the second renders each image (RenderAction) one at a time.
– When its later extended to send Renderactions to the farm – they can be split up
– All scripts to recombine now work on these finished frames, once they all come in.
– Logging, guestimating finish times, and tracking of progress has all been added
– some refinements like; triaxial blends (interp 3 parameters at the same time) and allowing loading of the same TGD file several times with different settings, have been added.

The QT is a really nice and simple UI to build with. I am very pleased its so stable now. Also using Pyside as the python binding.

The following packages are needed to make it work:
– Pyside – the python wrapper for QT. downloading Pyside automatically brings in the QT dlls so this is all you need for the UI
– psutil – a simple Python module which is used when cancelling a render to kill the tgdcli process.
– Hugin – a very cool Panorama making program. We only use Nona.exe to stitch the panoramas together but its worth downloading the entire app, its so good.
– Imagemagick – a commandline based image processing tool. It does the clipping, annotating and creates montages.

So here it is..

– no clever installer instead you have to follow these simple instructions:

1. Choose 32 or 64 bit. Tested with 32bit winxp SP3 and 64bit Win7.
– IT IS CRITICAL that you choose the right packages below so they all match.
– if you choose 64bit you MUST choose python 2.7 (psutil is only available in 64bit Python 2.7)

2. Choose python 2.6 or 2.7 (not 3.0)
– if you already have Python 2.6 on your system. Then use it. Else 2.7 is recomended.
– Either will work on 32bit. You MUST choose 2.7 if you have a 64bit system

3. Download the following
– make sure to only get the proper version (2.6, or 2.7, and 32 or 64bit when downloading)
– Pyside

– Psutil

– Hugin
32bit —-…
64bit —-…

– Imagemagick
– 16 bit versions of Imagemagick supposedly support OpenEXR but cannot find a binary with it built in.
– This is unfortunate because if there was one – we could make EXR panoramas for HDRI lighting use in other programs.

If we had Ham, we could have Ham and Eggs.. if we had eggs….

4. Install them. Only critical order is Python first.

5. unzip the Batch_TG2 archive into a handy folder you make somewhere and put a shortcut to on your desktop.

6. Test by running
– Double click should work.
Choose a simpe TGD to start with so renders are short. You can override the width, height to 200,150 and lower the Quality to 0.1 for fast test renders.

Try to break it…
Tell me about the breaks…

I’m hoping the layout is self evident…..?
– Organise Tab is where you load and setup what you want to do.
– Render Tab is where you go to Render
– “Render Farm” and “Render Local” do the same thing right now…. Get used to using “Render Farm” 🙂