<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Creative Workflow Hacks &#187; After Effects </title>
	<atom:link href="http://www.creative-workflow-hacks.com/category/after-effects/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.creative-workflow-hacks.com</link>
	<description>Sharing tips, scripts and hacks for your creative workflow.</description>
	<lastBuildDate>Mon, 10 May 2010 17:40:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Todd Kopriva posts scripting changes in After Effects CS5</title>
		<link>http://www.creative-workflow-hacks.com/2010/05/05/todd-kopriva-posts-scripting-changes-in-after-effects-cs5/</link>
		<comments>http://www.creative-workflow-hacks.com/2010/05/05/todd-kopriva-posts-scripting-changes-in-after-effects-cs5/#comments</comments>
		<pubDate>Wed, 05 May 2010 20:59:08 +0000</pubDate>
		<dc:creator>Dale</dc:creator>
				<category><![CDATA[After Effects ]]></category>

		<guid isPermaLink="false">http://www.creative-workflow-hacks.com/?p=171</guid>
		<description><![CDATA[Not sure how I missed this when he first posted, but Todd Kopriva has posted a nice rundown on all of the scripting changes made in After Effects CS5.  Also glad to hear there will be an update to the Scripting Reference docs that were getting long in the tooth. Todd and Jeff Almasol [...]]]></description>
			<content:encoded><![CDATA[<p>Not sure how I missed this when he first posted, but Todd Kopriva has posted a nice rundown on all of the <a href="http://blogs.adobe.com/toddkopriva/2010/04/scripting-changes-in-after-eff.html">scripting changes made in After Effects CS5</a>.  Also glad to hear there will be an update to the Scripting Reference docs that were getting long in the tooth. Todd and <a href="http://www.redefinery.com">Jeff Almasol</a> do a great job with supporting the scripting community around After Effects. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.creative-workflow-hacks.com/2010/05/05/todd-kopriva-posts-scripting-changes-in-after-effects-cs5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A PixelBender Rounded Rect Generator for After Effects</title>
		<link>http://www.creative-workflow-hacks.com/2010/04/15/a-pixelbender-rounded-rect-generator-for-after-effects/</link>
		<comments>http://www.creative-workflow-hacks.com/2010/04/15/a-pixelbender-rounded-rect-generator-for-after-effects/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 18:43:18 +0000</pubDate>
		<dc:creator>Dale</dc:creator>
				<category><![CDATA[After Effects ]]></category>
		<category><![CDATA[PixelBender]]></category>

		<guid isPermaLink="false">http://www.creative-workflow-hacks.com/?p=147</guid>
		<description><![CDATA[Why Rounded Rects? Because Steve Jobs says they are everywhere. And because a cursory search didn&#8217;t find anything for Pixel Bender. Use this plugin to generate a solid color rounded rect or sample footage to easily add rounded corners to your footage.


Tip of the Hat to David Van Brink for his Pixel Bender efforts and [...]]]></description>
			<content:encoded><![CDATA[<p>Why Rounded Rects? Because <a href="http://www.folklore.org/StoryView.py?story=Round_Rects_Are_Everywhere.txt">Steve Jobs says they are everywhere</a>. And because a cursory search didn&#8217;t find anything for <strong>Pixel Bender</strong>. Use this plugin to generate a solid color rounded rect or sample footage to easily add <strong>rounded corners</strong> to your footage.</p>
<p><a href="http://www.creative-workflow-hacks.com/wp-content/uploads/2010/04/RoundedRectInWindow-e1271355783751.png"><img class="aligncenter size-full wp-image-150" title="RoundedRectInWindow" src="http://www.creative-workflow-hacks.com/wp-content/uploads/2010/04/RoundedRectInWindow-e1271355783751.png" alt="" width="498" height="271" /></a></p>
<p><a href="http://www.creative-workflow-hacks.com/wp-content/uploads/2010/04/RoundedRectInterface2.png"><img src="http://www.creative-workflow-hacks.com/wp-content/uploads/2010/04/RoundedRectInterface2.png" alt="" title="RoundedRectInterface" width="321" height="129" class="aligncenter size-full wp-image-162" /></a></p>
<p>Tip of the Hat to David Van Brink for his <a href="http://omino.com/pixelblog/category/pixel-bender/">Pixel Bender efforts</a> and especially for making me think of the <a href="http://omino.com/pixelblog/2008/10/28/pixel-bender-circles-squares-lines-metadata/">generative possibilities</a> of Pixel Bender in addition to image processing. And to Greg Best whose <a href="http://www.mail-archive.com/quartzcomposer-dev@lists.apple.com/msg02328.html">Core Image Kernel</a> is the basis for this.<br />
<code></p>

<div class="wp_syntax"><div class="code"><pre class="pixelbender" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>languageVersion <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">1.0</span>;<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
<span style="color: #0033ff;">kernel</span> RoundedRect
<span style="color: #000000; font-weight: bold;">&lt;</span>
    <span style="color: #666666;">namespace</span> <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #990000;">&quot;&quot;</span>;
    <span style="color: #666666;">vendor</span> <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #990000;">&quot;Creative Workflow Hacks: Dale Bradshaw, http://creative-workflow-hacks.com&quot;</span>;
    <span style="color: #666666;">version</span> <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">1</span>;
    <span style="color: #666666;">description</span> <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #990000;">&quot;Generates a Rounded Rect given an Upper Left coordinate, a Bottom Right coordinate, a Corner radius, and a Color or Sampled Footage&quot;</span>;
    displayname<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #990000;">&quot;Rounded Rect&quot;</span>;
<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0033ff; font-weight: bold;">input</span> <span style="color: #0033ff;">image4</span> image;
    <span style="color: #0033ff; font-weight: bold;">output</span> <span style="color: #0033ff;">pixel4</span> result;
&nbsp;
    <span style="color: #0033ff; font-weight: bold;">parameter</span> <span style="color: #0033ff;">float4</span> color
  <span style="color: #000000; font-weight: bold;">&lt;</span>defaultValue<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #0033ff;">float4</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">1</span>,<span style="color: #000000; font-weight:bold;">1</span>,<span style="color: #000000; font-weight:bold;">1</span>,<span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span>;
   aeDisplayName<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #990000;">&quot;Rect Color&quot;</span>;
   aeUIControl<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #990000;">&quot;aeColor&quot;</span>;<span style="color: #000000; font-weight: bold;">&gt;</span>;
&nbsp;
   <span style="color: #0033ff; font-weight: bold;">parameter</span> <span style="color: #0033ff;">bool</span> transfer<span style="color: #000000; font-weight: bold;">&lt;</span>defaultValue<span style="color: #000000; font-weight: bold;">:</span> false;aeUIControl<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #990000;">&quot;aeCheckbox&quot;</span>;aeDisplayName<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #990000;">&quot;Sample Footage&quot;</span>;<span style="color: #000000; font-weight: bold;">&gt;</span>;
   <span style="color: #0033ff; font-weight: bold;">parameter</span> <span style="color: #0033ff;">float</span> radius<span style="color: #000000; font-weight: bold;">&lt;</span>defaultValue<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">25.0</span>;minValue<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">0.0</span>;maxValue<span style="color: #000000; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">100.0</span>;<span style="color: #000000; font-weight: bold;">&gt;</span>;
   <span style="color: #0033ff; font-weight: bold;">parameter</span> <span style="color: #0033ff;">float2</span> upperLeft<span style="color: #000000; font-weight: bold;">&lt;</span>aePointRelativeDefaultValue<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #0033ff;">float2</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0.01</span>, <span style="color: #000000; font-weight:bold;">0.01</span><span style="color: #000000;">&#41;</span>;aeDisplayName<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #990000;">&quot;Upper Left&quot;</span>;aeUIControl<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #990000;">&quot;aePoint&quot;</span>;<span style="color: #000000; font-weight: bold;">&gt;</span>;
   <span style="color: #0033ff; font-weight: bold;">parameter</span> <span style="color: #0033ff;">float2</span> bottomRight<span style="color: #000000; font-weight: bold;">&lt;</span>aePointRelativeDefaultValue<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #0033ff;">float2</span><span style="color: #000000;">&#40;</span>.98,.98<span style="color: #000000;">&#41;</span>;aeDisplayName<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #990000;">&quot;Bottom Right&quot;</span>;aeUIControl<span style="color: #000000; font-weight: bold;">:</span> <span style="color: #990000;">&quot;aePoint&quot;</span>;<span style="color: #000000; font-weight: bold;">&gt;</span>;
&nbsp;
   <span style="color: #0033ff;">void</span>
    <span style="color: #0033ff; font-weight: bold;">evaluatePixel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
&nbsp;
        <span style="color: #0033ff;">float2</span> p <span style="color: #000000; font-weight: bold;">=</span> <span style="color: #333333;">outCoord</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
        <span style="color: #0033ff;">float</span> dist <span style="color: #000000; font-weight: bold;">=</span> <span style="color: #000000; font-weight:bold;">0.0</span>;
&nbsp;
        dist <span style="color: #000000; font-weight: bold;">+=</span> <span style="color: #000000;">&#40;</span>p.<span style="color: #000000;">x</span> <span style="color: #000000; font-weight: bold;">&lt;</span> upperLeft.<span style="color: #000000;">x</span> <span style="color: #000000; font-weight: bold;">+</span> radius<span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">?</span> <span style="color: #333333;">pow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>upperLeft.<span style="color: #000000;">x</span> <span style="color: #000000; font-weight: bold;">+</span> radius<span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">-</span> p.<span style="color: #000000;">x</span>, <span style="color: #000000; font-weight:bold;">2.0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">0.0</span>;
        dist <span style="color: #000000; font-weight: bold;">+=</span> <span style="color: #000000;">&#40;</span>p.<span style="color: #000000;">y</span> <span style="color: #000000; font-weight: bold;">&lt;</span> upperLeft.<span style="color: #000000;">y</span> <span style="color: #000000; font-weight: bold;">+</span> radius<span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">?</span> <span style="color: #333333;">pow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>upperLeft.<span style="color: #000000;">y</span> <span style="color: #000000; font-weight: bold;">+</span> radius<span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">-</span> p.<span style="color: #000000;">y</span>, <span style="color: #000000; font-weight:bold;">2.0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">0.0</span>;
        dist <span style="color: #000000; font-weight: bold;">+=</span> <span style="color: #000000;">&#40;</span>p.<span style="color: #000000;">x</span> <span style="color: #000000; font-weight: bold;">&gt;</span> bottomRight.<span style="color: #000000;">x</span> <span style="color: #000000; font-weight: bold;">-</span>radius<span style="color: #000000;">&#41;</span>   <span style="color: #000000; font-weight: bold;">?</span> <span style="color: #333333;">pow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>bottomRight.<span style="color: #000000;">x</span> <span style="color: #000000; font-weight: bold;">-</span>radius<span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">-</span> p.<span style="color: #000000;">x</span>, <span style="color: #000000; font-weight:bold;">2.0</span><span style="color: #000000;">&#41;</span>   <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">0.0</span>;
        dist <span style="color: #000000; font-weight: bold;">+=</span> <span style="color: #000000;">&#40;</span>p.<span style="color: #000000;">y</span> <span style="color: #000000; font-weight: bold;">&gt;</span> bottomRight.<span style="color: #000000;">y</span> <span style="color: #000000; font-weight: bold;">-</span> radius<span style="color: #000000;">&#41;</span>  <span style="color: #000000; font-weight: bold;">?</span> <span style="color: #333333;">pow</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>bottomRight.<span style="color: #000000;">y</span> <span style="color: #000000; font-weight: bold;">-</span>radius<span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">-</span> p.<span style="color: #000000;">y</span>, <span style="color: #000000; font-weight:bold;">2.0</span><span style="color: #000000;">&#41;</span>   <span style="color: #000000; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">0.0</span>;
&nbsp;
        dist <span style="color: #000000; font-weight: bold;">=</span> <span style="color: #333333;">sqrt</span><span style="color: #000000;">&#40;</span>dist<span style="color: #000000;">&#41;</span>;
        dist <span style="color: #000000; font-weight: bold;">=</span> <span style="color: #333333;">clamp</span><span style="color: #000000;">&#40;</span>radius <span style="color: #000000; font-weight: bold;">-</span> dist, <span style="color: #000000; font-weight:bold;">0.0</span>, <span style="color: #000000; font-weight:bold;">1.0</span><span style="color: #000000;">&#41;</span>;
&nbsp;
        <span style="color: #9900cc; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>transfer<span style="color: #000000;">&#41;</span>
        result <span style="color: #000000; font-weight: bold;">=</span> <span style="color: #333333;">sampleNearest</span><span style="color: #000000;">&#40;</span>image,p<span style="color: #000000;">&#41;</span> <span style="color: #000000; font-weight: bold;">*</span> dist;
        <span style="color: #9900cc; font-weight: bold;">else</span>
        result <span style="color: #000000; font-weight: bold;">=</span> color <span style="color: #000000; font-weight: bold;">*</span> dist;
&nbsp;
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p></code></p>
<p><a href="http://www.creative-workflow-hacks.com/downloads/db_roundedRect.pbk">Download  db_roundedRect.pbk Pixel Bender kernel</a></p>
<p>This Kernel is set up as <strong>After Effects plugin</strong>, but it should be relatively easy to setup for Flash. I&#8217;ll update it when I get a chance to check it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creative-workflow-hacks.com/2010/04/15/a-pixelbender-rounded-rect-generator-for-after-effects/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ProRes, After Effects, Final Cut And Gamma Shifts</title>
		<link>http://www.creative-workflow-hacks.com/2009/12/04/prores-after-effects-final-cut-and-gamma-shifts/</link>
		<comments>http://www.creative-workflow-hacks.com/2009/12/04/prores-after-effects-final-cut-and-gamma-shifts/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 02:26:56 +0000</pubDate>
		<dc:creator>Dale</dc:creator>
				<category><![CDATA[After Effects ]]></category>
		<category><![CDATA[Final Cut Pro]]></category>

		<guid isPermaLink="false">http://www.creative-workflow-hacks.com/?p=128</guid>
		<description><![CDATA[Todd Kopriva posts a handy guide on how to avoid gamma shifts in an After Effects/Final Cut workflow using ProRes 4444. Gamma shifts have been the bane of my existence over the years and Todd gives a nice step-by-step and points to some good supporting resources.
]]></description>
			<content:encoded><![CDATA[<p>Todd Kopriva posts a <a href="http://blogs.adobe.com/toddkopriva/2009/12/prores-4444-colors-and-gamma-s.html">handy guide</a> on how to avoid gamma shifts in an After Effects/Final Cut workflow using ProRes 4444. Gamma shifts have been the bane of my existence over the years and Todd gives a nice step-by-step and points to some good supporting resources.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creative-workflow-hacks.com/2009/12/04/prores-after-effects-final-cut-and-gamma-shifts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UV Mapping and After Effects</title>
		<link>http://www.creative-workflow-hacks.com/2009/08/06/uv-mapping-and-after-effects/</link>
		<comments>http://www.creative-workflow-hacks.com/2009/08/06/uv-mapping-and-after-effects/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 15:49:13 +0000</pubDate>
		<dc:creator>Dale</dc:creator>
				<category><![CDATA[After Effects ]]></category>
		<category><![CDATA[flash/actionscript]]></category>

		<guid isPermaLink="false">http://www.creative-workflow-hacks.com/?p=116</guid>
		<description><![CDATA[Jerzy Drozda (maltaanon), in his usual understated way, introduced Youveelizer his plugin for integrating UV Mapping in After Effects via a Pixel Bender plugin. It&#8217;s a really nice, tightly integrated plugin/workflow/training in the maltaannon style.
If you&#8217;d like to explore the UV Mapping concept in a developer style with a little less hyperbole, take a look [...]]]></description>
			<content:encoded><![CDATA[<p>Jerzy Drozda (maltaanon), in his usual understated way, introduced <a href="http://maltaannon.com/articles/after-effects/youveelizer/" target="_blank">Youveelizer</a> his plugin for integrating UV Mapping in After Effects via a <a href="http://labs.adobe.com/technologies/pixelbender/" target="_blank">Pixel Bender</a> plugin. It&#8217;s a really nice, tightly integrated plugin/workflow/training in the maltaannon style.</p>
<p>If you&#8217;d like to explore the UV Mapping concept in a developer style with a little less hyperbole, take a look at <a href="http://omino.com/pixelblog/2009/05/23/ae-projecting-a-movie-onto-a-complex-surface/" target="_blank">AE: Projecting a Movie onto a Complex Surface</a> where David van Brink walks you through his experiments and includes a sample AE project.</p>
<p>Pixel Bender is really exciting. A very accessible kernel-style image processing platform without the baggage and overhead of digging into the <a href="http://www.adobe.com/devnet/aftereffects/sdk/cs4/" target="_blank">AE SDK</a>. There is also a useful subset of the kernel language that works in Flash, like these <a href="http://feedproxy.google.com/~r/NeuroProductions/~3/ia_e5ExwXIk/" target="_blank">3D Normal Mapping</a> experiments. Give it a try.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creative-workflow-hacks.com/2009/08/06/uv-mapping-and-after-effects/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oustanding geekery at omino.com</title>
		<link>http://www.creative-workflow-hacks.com/2007/11/20/oustanding-geekery-at-ominocom/</link>
		<comments>http://www.creative-workflow-hacks.com/2007/11/20/oustanding-geekery-at-ominocom/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 17:45:45 +0000</pubDate>
		<dc:creator>Dale</dc:creator>
				<category><![CDATA[After Effects ]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.creative-workflow-hacks.com/2007/11/20/oustanding-geekery-at-ominocom/</guid>
		<description><![CDATA[Looks like I&#8217;m a little late to the party, but I&#8217;m catching up with some great posts at omino.com. I&#8217;ve always admired David Van Brink&#8217;s qt_tools project, A great open source command-line set of tools for dealing with Quicktime, and it looks like he&#8217;s now sharing more quick hits of his pixel, motion and scripting explorations. Very fun David.
]]></description>
			<content:encoded><![CDATA[<p>Looks like I&#8217;m a little late to the party, but I&#8217;m catching up with some great posts at <a href="http://omino.com/pixelblog" title="omino.com">omino.com</a>. I&#8217;ve always admired David Van Brink&#8217;s <a href="http://omino.com/sw/qt_tools/" title="qt_tools">qt_tools</a> project, A <span class="Apple-style-span" style="font-weight: bold">great open source command-line set of tools</span> for dealing with <span class="Apple-style-span" style="font-weight: bold">Quicktime</span>, and it looks like he&#8217;s now sharing more quick hits of his <span class="Apple-style-span" style="font-weight: bold">pixel, motion and scripting explorations</span>. Very fun David.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creative-workflow-hacks.com/2007/11/20/oustanding-geekery-at-ominocom/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Doing something interesting with our Socket Object and XML; A slightly flawed Flickr reader for AE CS3 on the Mac</title>
		<link>http://www.creative-workflow-hacks.com/2007/11/07/doing-something-interesting-with-our-socket-object-and-xml-a-slightly-flawed-flickr-reader-for-ae-cs3-on-the-mac/</link>
		<comments>http://www.creative-workflow-hacks.com/2007/11/07/doing-something-interesting-with-our-socket-object-and-xml-a-slightly-flawed-flickr-reader-for-ae-cs3-on-the-mac/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 23:22:00 +0000</pubDate>
		<dc:creator>Dale</dc:creator>
				<category><![CDATA[After Effects ]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.creative-workflow-hacks.com/2007/11/07/doing-something-interesting-with-our-socket-object-and-xml-a-slightly-flawed-flickr-reader-for-ae-cs3-on-the-mac/</guid>
		<description><![CDATA[Last time, we talked about using a Socket Object in After Effects CS3 to parse a data feed with E4X XML parsing. There are a lot of useful workflow operations I can think of that could make use of data feeds, but After Effects is a visual medium, so let&#8217;s do something visual, let&#8217;s import [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.creative-workflow-hacks.com/2007/11/03/using-the-socket-object-to-fetch-xml-for-parsing-in-after-effects-cs3/">Last time</a>, we talked about using a <strong>Socket Object</strong> in <strong>After Effects CS3</strong> to parse a data feed with<strong> E4X XML</strong> parsing. There are a lot of useful workflow operations I can think of that could make use of data feeds, but <strong>After Effects</strong> is a visual medium, so let&#8217;s do something visual, let&#8217;s import a set of <strong>flickr photos</strong> matching a tag. This is a proof of concept script, and before you plunge into experimenting you should check the terms of service of the web feed provider and respect the use of images you download. That said, let&#8217;s take a look at some code.<br />
<span id="more-77"></span></p>
<p>First of all, we create a <strong>Socket Object</strong>, and connect to our web feed. In this case we are looking for all photos tagged red referenced by this line</p>
<pre>
<code>
webConnect.write (' GET /services/feeds/photos_public.gne?tags=red HTTP/1.0\n\n');
</code>
</pre>
<p>We then fetch and parse the XML, and loop through looking for a link element with an enclosure attribute like so</p>
<pre>
<code>
for(entry in elements)
{

	if(elements[entry].localName() == "entry")
	{
		var entryNodes = elements[entry].elements();
		for(x = 0; x < entryNodes.length(); x++){
				if(entryNodes[x].localName() == 'link')
				{
					if(entryNodes[x].@rel.toString() == "enclosure")
					{
						pictureArray.push(entryNodes[x].@href.toString());
					}
				}
		}

	}
}
</code>
</pre>
<p>Once we've gathered up an array of links, we download the photos using <strong>system.callSystem() </strong>and a command line app called <strong>curl</strong>. There is probably a Windows version of curl, but it probably won't be installed on your machine which makes this a mostly <strong>Mac script</strong>. This code handles the download and import. Note, my version of <strong>Wordpress</strong> is really upset about using the keyword <strong>system</strong> in code listing, thus there is extra whitespace around the <strong>system.callSystem()</strong> call in the code listing below. </p>
<pre>
<code>
for(y =0; y < pictureArray.length; y++)
{

	var picNameSet = pictureArray[y].split("/");
	var picName = "/" +  picNameSet[picNameSet.length -1];

	var curlString  = "curl -O " + pictureArray[y];
	var retVal = sys  tem.callSyste  m(curlString);

	var fileToImport = new File(picName);
	var myProject = app.project;

	if(fileToImport.exists)
	{

			var my_io = new ImportOptions(fileToImport);

			if(my_io.canImportAs(ImportAsType.FOOTAGE)){
				try{
					myItem = myProject.importFile(my_io);

				}catch(e){
					alert('couldn\'t import flickr item with error: \r' + e.toString())
				}

			}
	}

}
</code>
</pre>
<p>I mentioned this code was slightly flawed. Network activities are by their nature <strong>asynchronous</strong>, our tasks go out into the ether and we don't now when or how they return. In this case I start the download and quickly check to see if the file is available. If it's not, I just skip it. In the real world of network activities this will never do. AE scripting by it's nature is a pretty<strong> synchronous</strong> activity, we do one thing and then another. As I explore this style of scripting I'm investigating work arounds on how to mesh the two styles of programming a bit better. For now, I just ignore it. grin.  If you've got ideas about <strong>smart ways to handle asynch network scripting in After Effects</strong>, I'd love to hear about it.</p>
<p>Anyway, I run the script and import 20 or so photos matching the tag red. In this case I'm just discarding all the  metadata and context information that make the photos really interesting, but it's a fun experiment and I get to see a bunch of cool photos. As I continue to explore, hopefully I'll come up with more robust network programming and more concrete tools for using web feeds in an interesting way.</p>
<p><a href="http://www.creative-workflow-hacks.com/downloads/db_flickrExperiment.zip">zip download of db_flickrExperiment</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.creative-workflow-hacks.com/2007/11/07/doing-something-interesting-with-our-socket-object-and-xml-a-slightly-flawed-flickr-reader-for-ae-cs3-on-the-mac/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using the Socket Object to fetch XML for parsing in After Effects CS3</title>
		<link>http://www.creative-workflow-hacks.com/2007/11/03/using-the-socket-object-to-fetch-xml-for-parsing-in-after-effects-cs3/</link>
		<comments>http://www.creative-workflow-hacks.com/2007/11/03/using-the-socket-object-to-fetch-xml-for-parsing-in-after-effects-cs3/#comments</comments>
		<pubDate>Sat, 03 Nov 2007 20:23:46 +0000</pubDate>
		<dc:creator>Dale</dc:creator>
				<category><![CDATA[After Effects ]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.creative-workflow-hacks.com/2007/11/03/using-the-socket-object-to-fetch-xml-for-parsing-in-after-effects-cs3/</guid>
		<description><![CDATA[I had an email conversation with Matt, who wanted to fetch some xml to play with the new E4X XML parsing in AE CS3. We&#8217;re still waiting for the ExtendScript HttpConnection Object to show up in After Effects, but we do have access to the Socket Object. The Socket Object is a little low level, [...]]]></description>
			<content:encoded><![CDATA[<p>I had an email conversation with <a href="http://mographwiki.net" target="_blank">Matt</a>, who wanted to fetch some xml to play with the new <strong>E4X XML</strong> parsing in <strong>AE CS3</strong>. We&#8217;re still waiting for the ExtendScript <strong>HttpConnection</strong> Object to show up in After Effects, but we do have access to the<strong> Socket</strong> Object. The <strong>Socket</strong> Object is a little low level, but if you are using web feeds and don&#8217;t need authentication it&#8217;s actually pretty easy.</p>
<p>This code segment outlines the basics.</p>
<pre>
<code>
webConnect = new Socket;
response = new String;

if(webConnect.open("feeds.feedburner.com:80","UTF-8")) {

webConnect.write('GET /current/currentpicks?format=xml HTTP/1.0nn');

response    =  webConnect.read(100000);

response = response.toString();

var xmlStart = response.indexOf("&lt;?xml");
var xmlString = response.substring(xmlStart, response.length);

alert(xmlString)

webConnect.close();

} else {

alert (""unable to open webConnect via Socket"")

}</code></pre>
<p>We open a <strong>Socket</strong> and connect to, in this case, a feedburner feed. We use the <strong>read()</strong> method to read in the XML, and since the<strong> Socket </strong>object includes the header we use <strong>indexOf </strong>to find the beginning of the <strong>XML</strong> and <strong>substring </strong>to read to the end of the line.</p>
<p>A couple of gotchas in the code. In this case the header tells us the document encoding is <strong>utf-8 </strong>so we explicity set it with</p>
<pre><code>webConnect.open("feeds.feedburner.com:80","UTF-8")</code></pre>
<p>Also, when Matt and I were initially exploring this we were just getting the header. It looks like a <strong>GET </strong>request with</p>
<pre>response    =  webConnect.read()</pre>
<p>allows a block response, and the later content was going off into the ether, If we used</p>
<pre>response    =  webConnect.read(100000);</pre>
<p>with a sufficiently large number to include all of the <strong>XML</strong> we got all of the contents of the <strong>XML</strong> file. This seems like a really bad idea, since we&#8217;ll never know the size of the <strong>XML</strong> file unless we munge some headers and setting it arbitrarily high also seems like a bad idea. Can someone who&#8217;s spent more time with the <strong>Socket </strong>object leave a comment or email me on how to handle the block response or alternatives to setting a big count for the <strong>read()</strong> method? I&#8217;d appreciate it.</p>
<p>Anyway, that&#8217;s the basic idea. You&#8217;d then parse the xmlString variable and do fun stuff with it. One heads up, the sample above includes <strong>namespaces,</strong> so be sure to read the section on <strong>namespaces</strong> in the Scripting Guide.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creative-workflow-hacks.com/2007/11/03/using-the-socket-object-to-fetch-xml-for-parsing-in-after-effects-cs3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FCPToAE going (mostly) CS3 Only</title>
		<link>http://www.creative-workflow-hacks.com/2007/09/20/fcptoae-going-mostly-cs3-only/</link>
		<comments>http://www.creative-workflow-hacks.com/2007/09/20/fcptoae-going-mostly-cs3-only/#comments</comments>
		<pubDate>Thu, 20 Sep 2007 20:15:38 +0000</pubDate>
		<dc:creator>Dale</dc:creator>
				<category><![CDATA[After Effects ]]></category>
		<category><![CDATA[Final Cut Pro]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.creative-workflow-hacks.com/2007/09/20/fcptoae-going-mostly-cs3-only/</guid>
		<description><![CDATA[Just a quick heads up that I&#8217;ve decided to focus my efforts on FCPToAE and related tools to the CS3 Suite only. With a strong subset of  ECMA-357 (E4X) (pdf link) parsing in  Extendscript 2, it doesn&#8217;t make a lot of sense to keep inventing workarounds to FCP-XML parsing. I do plan on [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick heads up that I&#8217;ve decided to focus my efforts on <a href="http://www.creative-workflow-hacks.com/2007/04/15/final-cut-pro-to-after-effects-scripting-without-the-hassle/">FCPToAE</a> and related tools to the <strong>CS3 Suite</strong> only. With a strong subset of <a href="http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-357.pdf"> ECMA-357 (E4X)</a> (pdf link) parsing in <strong> Extendscript 2</strong>, it doesn&#8217;t make a lot of sense to keep inventing workarounds to <strong>FCP-XML</strong> parsing. I do plan on incorporating bug fixes to the scripting side of the equation to the <strong>AE 7</strong> app, so it&#8217;ll stay feature compliant to the current state, but I won&#8217;t be updating new features. </p>
<p>This will definitely make things a lot easier to develop tools, and it opens up a whole new slew of possibilites for <strong>Web 2.0 mashup tools and explorations</strong> when combined with <strong>After Effects</strong> Socket or new HttpConnection support. <a href="http://kuler.adobe.com">kuler explorer</a> anyone? If you&#8217;re a scripter, you owe it to yourself to check out the <a href="http://www.adobe.com/devnet/bridge/">ExtendScript Toolkit (ESTK) 2.0</a> there are a lot of features that sort of &#8220;hide&#8221; in Extendscript that aren&#8217;t obvious in the <a href="http://www.adobe.com/products/aftereffects/pdfs/aftereffectscs3_scripting_guide.pdf">After Effects CS3 scripting guide</a>(pdf link).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creative-workflow-hacks.com/2007/09/20/fcptoae-going-mostly-cs3-only/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>More fun with sampleImage(): Ascii animation in After Effects</title>
		<link>http://www.creative-workflow-hacks.com/2007/08/27/more-fun-with-sampleimage-ascii-animation-in-after-effects/</link>
		<comments>http://www.creative-workflow-hacks.com/2007/08/27/more-fun-with-sampleimage-ascii-animation-in-after-effects/#comments</comments>
		<pubDate>Mon, 27 Aug 2007 21:44:52 +0000</pubDate>
		<dc:creator>Dale</dc:creator>
				<category><![CDATA[After Effects ]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.creative-workflow-hacks.com/2007/08/27/more-fun-with-sampleimage-ascii-animation-in-after-effects/</guid>
		<description><![CDATA[


More experimentation with sampleImage(). This one relies on this expression.


target = thisComp.layer("layerToSample.mov");
samples = new Array();

var spacing = 10;
var w = target.width / spacing ;
var layerOrder = 1;
var h = 10 * layerOrder;

letters = "   .,:!-+=;iot76x0s&#038;8%#@$";

for(x= 0; x < w; x++){
	samples[x] = target.sampleImage([x* spacing ,h],[spacing , spacing], false, time);
}

var string = '';

for(z = 0; [...]]]></description>
			<content:encoded><![CDATA[<div style="height: 270px">
<object width="360" height="260" codebase="http://www.apple.com/qtactivex/qtplugin.cab" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"><param name="src" value="http://www.creative-workflow-hacks.com/sampleImage/ascii-click.mov"  /><param name="target" value="myself"  /><param  name="href" value="http://www.creative-workflow-hacks.com/sampleImage/ascii.mov" /><param value="http://www.apple.com/quicktime/download/" name="pluginspage" /><embed width="360" height="260"  target = "myself" href="http://www.creative-workflow-hacks.com/sampleImage/ascii.mov" src="http://www.creative-workflow-hacks.com/sampleImage/ascii-click.mov" pluginspage="http://www.apple.com/quicktime/download/indext.html"></embed></object>
</div>
<p>More experimentation with <strong>sampleImage()</strong>. This one relies on this expression.</p>
<pre>
<code>
target = thisComp.layer("layerToSample.mov");
samples = new Array();

var spacing = 10;
var w = target.width / spacing ;
var layerOrder = 1;
var h = 10 * layerOrder;

letters = "   .,:!-+=;iot76x0s&#038;8%#@$";

for(x= 0; x < w; x++){
	samples[x] = target.sampleImage([x* spacing ,h],[spacing , spacing], false, time);
}

var string = '';

for(z = 0; z < samples.length; z++){
	var y = Math.round((0.299 * samples[z][0] + 0.587 * samples[z][1] + 0.114* samples[z][2]) * 100)/ 4;
	string = string + letters.substring(y,y + 1);

}
</pre>
<p></code></p>
<p>We loop through the row of pixels and place the <strong>sampled RGB pixels</strong> in the <strong>samples array</strong>, convert the <strong>RGB samples to YUV</strong> and grab the <strong>Y or brightness value</strong> for comparison against a <strong>rough gradient of ASCII values</strong>. For best results, use a <strong>monospace</strong> font to retain proper spacing. A more complete script/expression and breakdown to come.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creative-workflow-hacks.com/2007/08/27/more-fun-with-sampleimage-ascii-animation-in-after-effects/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
<enclosure url="http://www.creative-workflow-hacks.com/sampleImage/ascii-click.mov" length="45350" type="video/quicktime" />
<enclosure url="http://www.creative-workflow-hacks.com/sampleImage/ascii.mov" length="1004540" type="video/quicktime" />
		</item>
		<item>
		<title>sampleImage() is fun</title>
		<link>http://www.creative-workflow-hacks.com/2007/08/17/sampleimage-is-fun/</link>
		<comments>http://www.creative-workflow-hacks.com/2007/08/17/sampleimage-is-fun/#comments</comments>
		<pubDate>Fri, 17 Aug 2007 13:03:40 +0000</pubDate>
		<dc:creator>Dale</dc:creator>
				<category><![CDATA[After Effects ]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.creative-workflow-hacks.com/2007/08/17/sampleimage-is-fun/</guid>
		<description><![CDATA[



sampleImage() is a new layer method expression introduced in After Effects CS3 that allows you to access a layer&#8217;s color pixel data.  Combined with sophisticated particle systems like Particular, I think we&#8217;re likely to see some really interesting designer driven explorations a la Processing, but with more of a tinkering, let&#8217;s try things out [...]]]></description>
			<content:encoded><![CDATA[<div style="height: 270px">
<object width="360" height="260" codebase="http://www.apple.com/qtactivex/qtplugin.cab" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"><param name="src" value="http://www.creative-workflow-hacks.com/sampleImage/sampleImageClick.mov"  /><param name="target" value="myself"  /><param  name="href" value="http://www.creative-workflow-hacks.com/sampleImage/sampleImage.mov" /><param value="http://www.apple.com/quicktime/download/" name="pluginspage" /><embed width="360" height="260"  target = "myself" href="http://www.creative-workflow-hacks.com/sampleImage/sampleImage.mov" src="http://www.creative-workflow-hacks.com/sampleImage/sampleImageClick.mov" pluginspage="http://www.apple.com/quicktime/download/indext.html"></embed></object>
</div>
<p>
<span class="Apple-style-span" style="font-weight: bold">sampleImage()</span> is a new<span class="Apple-style-span" style="font-weight: bold"> layer method expression</span> introduced in <span class="Apple-style-span" style="font-weight: bold">After Effects CS3</span> that allows you to access a layer&#8217;s <span class="Apple-style-span" style="font-weight: bold">color pixel data</span>.  Combined with sophisticated particle systems like <a href="http://www.trapcode.com/products_particular.html">Particular</a>, I think we&#8217;re likely to see some really interesting designer driven explorations a la <a href="http://www.processing.org">Processing</a>, but with more of a tinkering, let&#8217;s try things out approach.
</p>
<p>
I&#8217;ll have more scripts, and automated stuff as I explore further, but until then you might want to take a look at the <a href="http://www.motionscript.com/design-guide/sample-image.html">reference</a> and <a href="http://www.motionscript.com/design-guide/obscuration.html">examples</a> that <span class="Apple-style-span" style="font-weight: bold">Dan Ebberts</span> is posting at the <a href="http://www.motionscript.com/design-guide/collision.html">brilliant</a> <a href="http://www.motionscript.com">MotionScript.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.creative-workflow-hacks.com/2007/08/17/sampleimage-is-fun/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://www.creative-workflow-hacks.com/sampleImage/sampleImage.mov" length="399217" type="video/quicktime" />
<enclosure url="http://www.creative-workflow-hacks.com/sampleImage/sampleImageClick.mov" length="48561" type="video/quicktime" />
		</item>
	</channel>
</rss>
