Digital Art Zone

 
     
compoZ a compositing script (creates batch files for ImageMagick )
Posted: 10 January 2013 08:10 PM   [ Ignore ]
Power Member
Avatar
RankRankRank
Total Posts:  1992
Joined  2006-01-19

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

Image Attachments
compozdemo.gifwawawai.png
Profile
 
 
Posted: 10 January 2013 09:26 PM   [ Ignore ]   [ # 1 ]
Addict
Avatar
RankRankRankRank
Total Posts:  4545
Joined  2007-09-13

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!

 Signature 

1432 old posts

My ShareCG gallery.

Just because something costs a lot, doesn’t mean it’s the best…

It just means it’s expensive.

Profile
 
 
Posted: 10 January 2013 10:13 PM   [ Ignore ]   [ # 2 ]
Power Member
Avatar
RankRankRank
Total Posts:  1992
Joined  2006-01-19
mjc1016 - 10 January 2013 09:26 PM

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" 

 

Profile