TGD Batch for Terragen 2 – V4

Here is a program to help automate the rendering of several aspects of Terragen 2 files.
Terragen 2 is a program from Planetside that renders very realistic outdoor naturalistic imagery.
The announcement and discussion about this app is here:
http://forums.planetside.co.uk/index.php?topic=5251.msg54258#msg54258

It will only work for purchased versions of TG2 as it requires the command line option to work.

This is Version 4. The previous versions are on the Planetside forums. Here: http://forums.planetside.co.uk/index.php?topic=2816.0

Features:
– Creation of panoramas (6 auto views with tiling)
– Tiled renders for very large images (with overlaps)
– batch renders for remote rendering (but no Renderfarm Manager)
– wedge tests for all parameters in TGD files
– tested in version 1.10.23.1
– renders animations one frame at a time (to facilitate remote batch rendering)

Please fell free to make suggestions for improvements of any kind.

Panoramas
– are generated using Nona – part of the Hugin project (which replaces PTStitcher with an opensource alternative)
– an Imagemagick script recombines all rendered views into a single image and Nona turns it into an equirectangular projection ready for Quicktime or Environment maps
– currently does not work for the HDRI EXR format because Imagemagick needs a custom compile.
However – using new version of hugin, manually with the 6 images, will create the EXR end result.

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.0
Thanks BigBen.

Tiled rendering:
– has overlaps to help deal with the GI problems and to ensure that antialiasing does not create edge artifacts.
– I use Imagemagick scripts to recombine the tiles into a single image.
– these scripts are automatically generated.
– the individual frames are well named for manual identification

Wedge Tests:
– Blends can be one dimensional or two dimensional
– The resulting images will be grouped into a single image grid
– the user can control the shape of the grid for one dimensional blends
– all blends are labeled with their parameters and values

Installing
Alas – I have not packaged it up in an installer. sorry about that 🙁
You need to load (in this order):
– Python (2.5.2 or 2.6)
– wxPython (version based on your version of Python)
– Pythoncard
– Imagemagick
– Hugin – if you want Panoramas (tested in 0.7 beta4 and release 0.7.0)

I built it using stable features of python 2.5.2 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 . I tested in 2.5.2 and 2.6
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 16bit 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.html

Install Python
Install wxpython
Install Pythoncard
Install Imagemagick
Install (just unpack really) Hugin
– see where Nona is located and manually enter its proper location into the top of Batch_TG2.py
– the location is defined in a global variable at the head of the file

Operation:
Once 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 _recombine.bat
Panoramas will create the recombine scripts, as well as a script that calls them all and create an Equirectangular mapped image for a panorama.
(Quicktime style but equally useful for environment maps)
– Scripts will be named _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: _recombine.bat (It will be in the image directory)
To recombine tiles and build a panorama – run the script: _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 execute them.

Summary:
I find it useful for:
– doing wedge tests (blends) of parameter ranges
– 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 mods:
You 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
– support HDR options for panoramas and tiled images
– bundle all referenced files into a zip file for easy remote rendering
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

Inkscape – making an extension (plug-in)

I’ve been making some extensions in Inkscape recently and learned some things.
So here’s the first in a series about making an extension to help creating files for the Ponoko laser cutting service.

What we want is to make it easy to set the line color and style for the various kinds of Laser lines ponoko supports.
E.g. cutting line is blue and 0.1mm in width. Heavy Vector lines are red.

Its fairly easy to do it all manually but then sometimes you forget to set the line width or to check that every single line is the right “color”.

So it would be useful to have a couple of tools to help:
Validate:
1. check that all paths have one of the legal colours and have the right stroke width.
2. check all are paths and no text etc – prompt if there is.

Working:
1. set the selected paths to be one of the legal colors (7 of them, 8 including comment)
2. toggle the line widths between the proper width and a larger width.
This tool is useful when you work on the larger sheets – the lines are so small that when zoomed out the entire drawing looks blank.

So we are going to make several posts showing how to get this done.

Light Panel for Daz Studio 2.2

Here is a new version of the Light Panel. (works in 1.8 and 2.2)
In addition it now does:
– works with 3rd Party shader based lights as well as regular Daz Lights
– can swap lights from Raytraced shadows to Shadow Maps and back
– can set color of groups of lights
– can choose size of Panel – (how many lights displayed in a Tab)

Still to come:
– display more parameters for Shader based lights like Pendragon’s and UberLights, and Daz extended lights

I need your help. I want to expose the new parameters of the lights that people are using.
If you have any suggestions for what you want – please reply in the thread on Daz Forums.
http://forum.daz3d.com/viewtopic.php?p=1274921#1274921

This plugin replaces the existing LightPanel-10.dsb file (originally for DazStudio 1.8)

This will not work in Daz Studio 1.7
(Use version 9 for that.)

Installation:
1. Unzip it – it contains two files.
2. Drop both files into studio/content/scripts (delete any old ones if you have installed it before)
3. Open Daz Studio and find it in the Content Tab
3. Right click on it and select “Create Custom Action”
It will then appear on your top level menu under a new item (next to Tools) called Scripts.

If you try it in earlier versions than 2.2 it might not appear to work. We are not sure why.
If this happens to you – it appears you can use the .ds file also attached instead of the .dsb.
This seems to make it OK.

Operation:
– Each light will be in a horizontal Block on the right side of the panel.
– All aspects of the default lights can be controlled from here.
– Some aspects of the 3rd Party shader based lights can be controlled.
– The left side contains global controls for affecting ALL or groups of lights
– E.g. adjusting a groups intensity or switching them all to Raytraced shadows
– Groups are automatically assigned on the basis of similar color

LightPanel-18

Show Render times

DeltaX15 has a very useful script that shows you the log file from Daz. You generally only need to look at this when the system does something wrong.

However it does include the duration of renders and where you save them. So I modified the Showlog script to add a “Filter Render Info” button so this could be shown more clearly.

So here is version 1.1 of Showlog – originally by DeltaX15.
Cheers…
ShowLog2 Script

Installation
1. unzip the file (only has two files in it – the code and an icon)
Ideally place both files here in your file system:
…\DAZ\Studio\content\Scripts\
Then you can easily find it in the Content Browser.

2. Click R on the Showlog icon and choose “Create Custom Action”
This will place it on the Scripts menu at the top of the DazStudio Screen between “Tools” and “Help”

3. When you want to see the log – just select it from there.
If you click on the button labeled “Filter Render Info” then the log will change to only show the lines relevant to Rendering and Saving Last Render operations.

E.g.

    Finished Rendering

 

    Total Rendering Time: 11 minutes 55.46 seconds

 

    Saved image: C:\Documents and Settings\User\Desktop\Movies Temp\Aliens\previz-2 _18min.jpg

Finished Rendering
Total Rendering Time: 17 minutes 26.95 seconds

Light Panel for Daz Studio 1.8

Here is an updated Light Panel for Daz Studio 1.8
It uses the new UI layouts for sliders and so is more compact.
I fixed the odd minor bug too.

Not yet working with custom shader lights – but soon

(LightPanel-9.dsb is no longer needed – please delete it)

This will not work in Daz Studio 1.7
Use the older version for that

Operation
Basically:
– Pane on the Right shows – controls for all lights
– Pane on the Left shows – Global control and main camera.

Global controls can:
– turn all shadows off (and remember settings) toggle
– adjust intensity of groups of lights with slider

For each light:
– you have same controls as in Parameters tab +
– add light to a group – so can control with global slider +
– view from lights POV +
– toggle bright garish color for light – so you can easily see it in scene.

Installation
1. drop it in studio/content/scripts (delete the old one if you have it installed)
2. Open Daz Studio and find it in the Content Tab
3. Right click on it and select “Create Custom Action”

It will then appear on your top level menu under a new item (next to Tools) called Scripts.
Click away…(make some lights first :-))

LightPLightPanel-10anel-10

Simple Compositor Compoz

Casual and I have collaborated on the Daz forum to produce a script that allows a simple composite to occur. (2008)

Use case is this:
1. User has a background (BG) image that they want a rendered sequence to be composited on top of.
2. User has a short background sequence that they want to loop in the background while the foreground (FG) rendered frames lie on top.
3. User has a sequence of BG and FG frames that are the same length and wants to composite them together into a single image sequence.

The script “Compoz” does this. I am hosting it here for easy access. Its also on Casual’s site:
http://www.geocities.com/mcasualjacques/ with instructions.

With his permission I will probably enhance it a bit more over time.
The newer versions will be here.

compozFeb0220088pm