compoZ a compositing script (creates batch files for ImageMagick )

mCasualmCasual Posts: 4,607
edited January 2013 in Freebies

you can get the script and detailed instructions here:
http://sites.google.com/site/mcasualsdazscripts/compoz-for-ds2

this script was initially released February 2nd 2008 for use in daz studio 2

it was improved and made compatible with DS 1, 3, 4 on January 10th 2013

It's another one of those scripts intended for slightly nerdy users

Initially i wanted to write a script that rendered an animation frame by frame
and changed the background image for each rendered frame, so we would get animated backgrounds.

But Neon22 pointed out that using imagemagick (freeware imaging utilities) could be used to composite foreground/background images. Excellent compositing results can be obtained since the images rendered by DazStudio contain an Alpha Channel, which is like a transparency mask.

So i wrote a Daz script that creates a batch file that repeatedly calls ImageMagick to combine 2 series of numbered images

If you dont know what's a batch file is, then you should not use this script.
Because there's probabilities that you'll accidentally destroy precious images

the animated image below is an example of compositing achieved with the help of compoZ

the second image shows the settings i used

my sequence of images for the foreground were located in c:\tmp
they were rendered by Daz Studio and include an alpha (transparency) mask
wak000.png, wak001.png ... wak148.png

my sequence of images for the background were located in c:\tmp
they were rendered in Blender-Cycles and dont need/have an alpha mask
image0030.jpg, inage0031.jpg ... image070.jpg

i had installed imagemagick in c:\imagemagick

the batch file created was c:\tmp\comp001.bat

this batch file with the help of imagemagick
created the output images in c:\tmp
compoz0.jpg, compoz1.jpg . . . compoz149.jpg

all input and output images were all 800x600

wawawai.png
546 x 465 - 35K
compozdemo.gif
300 x 225 - 690K
Post edited by mCasual on

Comments

  • mjc1016mjc1016 Posts: 15,001
    edited December 1969

    I bet it would be possible to convert the batch file to a shell script and use the Linux native imagemagik instead of installing the Windows version under WINE...(now, I see your 'geekiness' and double it...:P)

    And I just went and grabbed all the updates that I could find, last night...and now you have another one. Nice!

  • mCasualmCasual Posts: 4,607
    edited December 1969

    mjc1016 said:
    I bet it would be possible to convert the batch file to a shell script and use the Linux native imagemagik instead of installing the Windows version under WINE...(now, I see your 'geekiness' and double it...:P)

    And I just went and grabbed all the updates that I could find, last night...and now you have another one. Nice!

    the batch files produced look like seen below
    the mix of frontslashes / backslashes may cause problems in linux, but it can be solved quickly using a text editor


    
    C:/imagemagick\composite -compose atop -geometry 800x600 "C:/tmp\wak000.png" "C:/tmp\image0030.jpg" "C:/tmp\woo0.jpg"
    C:/imagemagick\composite -compose atop -geometry 800x600 "C:/tmp\wak001.png" "C:/tmp\image0031.jpg" "C:/tmp\woo1.jpg"
    ...
    C:/imagemagick\composite -compose atop -geometry 800x600 "C:/tmp\wak148.png" "C:/tmp\image0055.jpg" "C:/tmp\woo148.jpg"
    C:/imagemagick\composite -compose atop -geometry 800x600 "C:/tmp\wak149.png" "C:/tmp\image0056.jpg" "C:/tmp\woo149.jpg"
    
Sign In or Register to comment.