Attached (and in file sharing) is a Pythoncard program to help automating rendering bundles of TGD files.
This is Version 3.
This allows creation of panoramas as well as tiled renders (with overlaps).
The tiles are well named and Imagemagick scripts are created to composite the tiles into final images.
The panorama is also automatically made using Imagemagick scripts, if Nona (from Hugin project) is downloaded.
Also does animations.
It will only work for purchased versions of TG2 as it requires the command line option to work.For Panoramas I am using Nona instead of PTStitcher. Big Ben supplied an excellent workflow and scripts using PTStitcher which I have learnt a lot from.
http://forums.planetside.co.uk/index.php?topic=853.0 http://forums.planetside.co.uk/index.php?topic=972.0Thanks BigBen. I hope this tool helps with the tiled image collating.
Screenshot below.
Please feel free to use and abuse this code.
Please fell free to make suggestions for improvements of any kind.
InstallingAlas - I have not packaged it up in an installer. sorry about that :-(
You need to load Pythoncard and its dependencies (Python and wxpython) as well as Imagemagick, Hugin
I built it using stable features of python 2.4 and wxpython 2.8
Later versions should work. earlier versions may not. (You must not use wxpython 2.6 - notebook is faulty)
Get Python from
http://www.python.org/download/ choose the latest or I used 2.4 (because I already had it)
Get wxpython from:
http://www.wxpython.org/download.php#binaries Use a matching installer for your version of Python
Get Hugin from:
http://hugin.sourceforge.net/download/ we only use Nona (replaces PTStitcher for panoramas) but its all bundled together.
Get Imagemagick from
http://www.imagemagick.org/script/binary-releases.php#windows the 16bit version does not support exr :-( so choose either the 16 or 8bit windows version
Get PythonCard 0.8.2 from
http://pythoncard.sourceforge.net/ - Specifically download from:
http://sourceforge.net/project/showfiles.php?group_id=19015 - Installation Instructions (
seven steps including dependent packages) are here:
http://pythoncard.sourceforge.net/windows_installation.htmlInstall Python ( I used 2.4 )
Install wxpython ( I used 2.8.7.1 )
Install Pythoncard ( I used 0.8.2 )
Install Imagemagick ( I used 6.3.7 )
Install (just unpack really) Hugin ( I used 0.7 beta4)
- see where Nona is located and enter its proper location into Batch_TG2.py
- the location is defined in a global variable at the head of the file
OperationOnce PythonCard is installed.
- Unzip the attached zipfile into any directory you like.
- Double click on the file Batch_TG2.py
It will open a dialog prompting you to select a TGD file (or files).
You may deactivate ones you do not wish to render.
Adding a Tile will allow you to tile or make a panorama
Scripts will be made that will composite the tiles into a single image.
- Scripts will be named <imagename>_recombine.bat
Panoramas will create the recombine scripts, as well as a script that calls them all and creates an Equirectangular mapped image for a panorama.
(Quicktime style but equally useful for environment maps)
- Scripts will be named <imagename>_Collate_and_Build_Pano.bat
Panoramas can be viewed directly in panoglview (part of hugin install)
The log window will show you progress output from TGD as it runs in the background.
Animation is done by repeatedly opening the file and rendering single frames (see
http://forums.planetside.co.uk/index.php?topic=954.0)
You can edit:
- size of image, quality settings, antialiasing, GI Settings, motion blur
- if animating - range, step-size
- many key settings - see screenshot
The program will make a temporary copy of your tgd file so as not to modify your original. It will prefix all these new TGD files with the prefix "tmp" so they are easy to find and delete after rendering.
Choose a rendering destination directory to collect frames - then render.
To recombine the tiles - run the script: <imagename>_recombine.bat
To recombine tiles and build a panorama - run the script: <imagename>_Collate_and_Build_Pano.bat
Your original rendered images will not be edited or deleted.
Your original tgd files will not be edited or deleted.
You will have to remove the surplus files manually (its just safer this way and they are well named)
Using "Batch" instead of "Render" will create the files to run but not run them.
SummaryI find it useful for:
- making up a batch of renders to run overnight (locally or on remote machines),
- setting off long animation sequences,
- making tiled renders for really large images (not HDR yet),
- Panoramas (not hdr yet)
Your original tgd files will not be edited or deleted.
User modsYou may wish to change the default starting directory.
- Its defined at the head of the file: Batch_TG2.py
You may wish to change the "tmp" prefix for temporary TGD files.
- Its defined at the head of the file: Batch_TG2_class.py
You will want to set the default location of the Nona.exe (if you make Panoramas)
- Its defined at the head of the file: Batch_TG2.py
Next version may
- do wedge tests of user selected parameters
- support HDR options for panoramas and tiled images
I need help (see about box) to get a version of Imagemagick compiled with OpenEXR support. Any takers ?
If we can do that then I will alter it to make HDR panos and tiled images
Good luck - Please let me know how you get on.