<?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>harkyman.com &#187; Development</title>
	<atom:link href="http://www.harkyman.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.harkyman.com</link>
	<description>FEEL THE LOVE</description>
	<lastBuildDate>Fri, 03 Feb 2012 15:39:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Maintaining bone volume, a new constraint</title>
		<link>http://www.harkyman.com/2010/03/16/maintaining-bone-volume-a-new-constraint/</link>
		<comments>http://www.harkyman.com/2010/03/16/maintaining-bone-volume-a-new-constraint/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 13:14:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.harkyman.com/?p=128</guid>
		<description><![CDATA[Under the Transform section of the Add Constraint menu is a new one called Maintain Volume.
I developed the constraint (which is extremely simple) to help with adding squash and stretch to characters. There are a number of ways to do this already, but as I&#8217;m not the world&#8217;s greatest rigger and don&#8217;t have a lot [...]]]></description>
			<content:encoded><![CDATA[<p>Under the <strong>Transform</strong> section of the <strong>Add Constraint</strong> menu is a new one called <strong>Maintain Volume</strong>.</p>
<p>I developed the constraint (which is extremely simple) to help with adding squash and stretch to characters. There are a number of ways to do this already, but as I&#8217;m not the world&#8217;s greatest rigger and don&#8217;t have a lot of patience for layering several tiers of controls on top of each other, I wanted an easier way. First, I tried doing it with Drivers. I figured that if I could drive the X and Z scale of a bone as a function of its Y scale that would do the trick (the equation btw is: X (or Z) scale equals the square root of the constant volume divided by the Y scale). Unfortunately, Blender didn&#8217;t like this and considered it a cyclic dependency. So, I moved on to using the Transform constraint.</p>
<p>Another user (mtracer) said that he&#8217;d done just such a thing with the Transform constraint, and it seems like that&#8217;s the case. I just couldn&#8217;t get it to work. I find those types of value-mapping interfaces horrible to deal with. I could have tried to do this with a PyConstraint, and in fact something like this was done by Cessen in Big Buck Bunny. Unfortunately, I&#8217;ve never done a PyConstraint before and didn&#8217;t feel like learning the new API for what should be a relatively simple effect.</p>
<p>So, I was at the point where most users find themselves. Yes, I could have brute-forced any of the previous four solutions (complex rig, drivers, transform constraint, py constraint). However, that doesn&#8217;t solve the problem for everyone else. We can&#8217;t expect people to be programmers just to use the software. So, I did the easiest thing for me, which was to add a constraint. You can see the effect below:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=10180503&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=10180503&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/10180503">Blender 2.5 &#8220;Maintain Volume&#8221; constraint</a> from <a href="http://vimeo.com/user712188">Roland Hess</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>It&#8217;s in trunk, so update, compile and have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harkyman.com/2010/03/16/maintaining-bone-volume-a-new-constraint/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Project from Camera: Done</title>
		<link>http://www.harkyman.com/2009/12/14/project-from-camera-done/</link>
		<comments>http://www.harkyman.com/2009/12/14/project-from-camera-done/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 02:30:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.harkyman.com/?p=119</guid>
		<description><![CDATA[After discussions with Matt and Brecht, I took their advice and just rolled the functionality into the &#8220;UV Project from View&#8221; operation. So, if you&#8217;re in a camera view and use Project from View now for your UV coordinates, it actually works like you&#8217;d expect. Before, this resulted in a nasty mapping that had to [...]]]></description>
			<content:encoded><![CDATA[<p>After discussions with Matt and Brecht, I took their advice and just rolled the functionality into the &#8220;UV Project from View&#8221; operation. So, if you&#8217;re in a camera view and use Project from View now for your UV coordinates, it actually works like you&#8217;d expect. Before, this resulted in a nasty mapping that had to be scaled, skewed and tweaked by hand to even get close to working. Now it works as is.</p>
<p>The whole point is that if you want to do some quick camera mapping for 2.5D matte work and don&#8217;t want to deal with the UV Project modifier, you can just blast it to UVs from camera view now. The nice part is that you don&#8217;t have to do anything special to use it &#8212; just jump into edit mode, press the U-key for the Unwrap menu and choose &#8220;Project from View.&#8221; If you&#8217;re in a camera view, it&#8217;ll do it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harkyman.com/2009/12/14/project-from-camera-done/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Similar Surface Modifier Complete (sort of)</title>
		<link>http://www.harkyman.com/2009/11/29/similar-surface-modifier-complete-sort-of/</link>
		<comments>http://www.harkyman.com/2009/11/29/similar-surface-modifier-complete-sort-of/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 04:30:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.harkyman.com/?p=114</guid>
		<description><![CDATA[If you&#8217;ve been following this blog, you saw my proposal and skeleton code for a surface deform modifier that would allow you to, for example, do cloth sim on a basic shirt form, then use that to deform a more complex shirt model. I had proposed it to utilize the shrink wrap code for initial [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve been following this blog, you saw my proposal and skeleton code for a surface deform modifier that would allow you to, for example, do cloth sim on a basic shirt form, then use that to deform a more complex shirt model. I had proposed it to utilize the shrink wrap code for initial pinning, and the internals of the old-style hook code for actual deformation.</p>
<p>The other day, Brecht committed an addition to the Cage Deform modifier which performs this same task. I believe it uses the heat weighting algorithm for pinning, followed by the cage deform method of deformation. I haven&#8217;t tried it yet, but it sounds like it will do exactly what was needed!</p>
<p>In the end, I had absolutely nothing to do with it. I&#8217;m just happy that there&#8217;s now a way to pin one entire mesh&#8217;s surface to that of another.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harkyman.com/2009/11/29/similar-surface-modifier-complete-sort-of/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Dev: Project from Camera</title>
		<link>http://www.harkyman.com/2009/11/18/new-dev-project-from-camera/</link>
		<comments>http://www.harkyman.com/2009/11/18/new-dev-project-from-camera/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 20:11:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.harkyman.com/?p=109</guid>
		<description><![CDATA[If you want to do camera mapping in Blender, you have two choices: Sticky coordinates or the UV Project modifier. Sticky coordinates are easy to generate, but they tend to fall apart at the slightest provocation. In theory, you just drop into a camera view, put up your background image, line up your objects and [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to do camera mapping in Blender, you have two choices: Sticky coordinates or the UV Project modifier. Sticky coordinates are easy to generate, but they tend to fall apart at the slightest provocation. In theory, you just drop into a camera view, put up your background image, line up your objects and make Sticky coords. They are a special kind of vertex-based uv coordinate. The problem with them is that if you move the camera in any useful fashion, they go crazy, making the stuff you&#8217;d normally like to do with camera projection not very do-able. The old solution was to use a script that baked the Sticky coords to standard UV coordinates.</p>
<p>I&#8217;m working on the surfacing chapter of my book, and needed to use camera projection. Sticky coordinates were not back in Blender 2.5, so I reattached them to an operator. Sticky worked again, but the old grief remained. I&#8217;ve tried the UV Project modifier, and did the tutorials, etc., again but still I just didn&#8217;t like the work flow. I&#8217;ve heard from people who certainly know better that it&#8217;s great, works right, yes yes. However, nothing is quite as intuitive to me as lining your objects up in camera view.</p>
<p>So, after some feedback from Brecht and Matt Ebb, I wrote a new UV unwrap type: Project from Camera. Basically, it works the way that Stickies do. Camera view + background image + tweak your objects right there in perspective. Now, instead of adding stickies, you unwrap the mesh using Project from Camera. That&#8217;s it! Now you have a UV unwrap that you can tweak if you need to, and we can get rid of stickies forever!</p>
<p>If you&#8217;re interested in trying it out before it&#8217;s in trunk (hopefully), bop on over to:</p>
<p><a href="http://projects.blender.org/tracker/?func=detail&amp;aid=19862">http://projects.blender.org/tracker/?func=detail&amp;aid=19862</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.harkyman.com/2009/11/18/new-dev-project-from-camera/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Multi-Cut back in Loop Cut for 2.5</title>
		<link>http://www.harkyman.com/2009/10/01/multi-cut-back-in-loop-cut-for-2-5/</link>
		<comments>http://www.harkyman.com/2009/10/01/multi-cut-back-in-loop-cut-for-2-5/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 16:50:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.harkyman.com/?p=82</guid>
		<description><![CDATA[I had griped on one of the mailing developer lists a couple of weeks ago that the recently added &#8220;Loop Cut&#8221; tool wasn&#8217;t in fact a loop cut at all. It was an edge loop selector. After you made the selection, you could of course use the Subdivide tool to make the cut. That was [...]]]></description>
			<content:encoded><![CDATA[<p>I had griped on one of the mailing developer lists a couple of weeks ago that the recently added &#8220;Loop Cut&#8221; tool wasn&#8217;t in fact a loop cut at all. It was an edge loop selector. After you made the selection, you could of course use the Subdivide tool to make the cut. That was functional, but not nearly as elegant as the tool in Blender 2.49 (and previous). You would hit Ctrl-R, select your cut interactively, use the mousewheel to determine the number of cuts, possibly slide a single cut along the edge, then LMB click to actually finish the cut.</p>
<p>A couple of days after my gripe, Joe Eager added a more convenient Loop Cut tool that was activated with Ctrl-R. You could make a single cut.</p>
<p>I was working on the modeling basics chapter of the new book and really missed multi-cut. I figured it was already there for Subdivide, so how hard could it be? Turned out it wasn&#8217;t too hard. Multi-cut is now back in the Ctrl-R loop cut tool. If I have some more time, I&#8217;m going to see if I can do the edge slide too, although Joe indicated in his notes on this that it wasn&#8217;t possible with the current structure. As he&#8217;s about 100x the programmer I am (i.e. a real coder, not a hacky dilettante), I&#8217;m probably chasing the wrong cat, but I suppose it&#8217;s worth at least a look.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harkyman.com/2009/10/01/multi-cut-back-in-loop-cut-for-2-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Soft Light Mix Mode is in 2.5</title>
		<link>http://www.harkyman.com/2009/09/10/soft-light-mix-mode-is-in-2-5/</link>
		<comments>http://www.harkyman.com/2009/09/10/soft-light-mix-mode-is-in-2-5/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 15:24:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.harkyman.com/?p=78</guid>
		<description><![CDATA[The Soft Light (and Linear Light) mix modes that I coded for The Beast&#8217;s web edition are finally into an official release. They were just added to 2.5 last night. What does this mean? Let&#8217;s take a look:



Big Buck Bunny splash screen


Above, we see a 50% reduction (with a little sharpening) of one of the [...]]]></description>
			<content:encoded><![CDATA[<p>The Soft Light (and Linear Light) mix modes that I coded for <em>The Beast</em>&#8217;s web edition are finally into an official release. They were just added to 2.5 last night. What does this mean? Let&#8217;s take a look:</p>
<p><span id="more-78"></span><img title="Big Buck Bunny splash screen" src="http://www.harkyman.com/images/bbb-splash.jpg" alt="Big Buck Bunny splash screen" width="960" height="540" /></p>
<div class="mceTemp">
<dl class="wp-caption alignnone" style="width: 970px;">
<dd class="wp-caption-dd">Big Buck Bunny splash screen</dd>
</dl>
</div>
<p>Above, we see a 50% reduction (with a little sharpening) of one of the final frames of <em>Big Buck Bunny</em>. It&#8217;s obviously already undergone a fine degree of post-processing. However, what if we want to give it a different mood? Color grade? Sure, you can do that with existing tools, but the Soft Light mix mode in the compositor (it&#8217;s also available in materials, textures, etc.) lets you do this quickly, easily and with great results. The following images can be clicked to larger sized versions. My recommendation is to open both the above original and each of these full size links in their own tabs so you can easily switch between them for comparison.</p>
<p>Here&#8217;s what that image looks like when Soft Light mixed at 50% strength with pure red:</p>
<div class="wp-caption alignnone" style="width: 310px"><a href="http://www.harkyman.com/images/50purered.jpg"><img title="50% Red Soft Light Mix" src="http://www.harkyman.com/images/50purered_t.jpg" alt="50% Red Soft Light Mix" width="300" height="188" /></a><p class="wp-caption-text">50% Red Soft Light Mix</p></div>
<p>Note how it maintains the overall color variation, highlights and shadows, while casting the image nicely into a red space.</p>
<p>Here&#8217;s blue mixed at 100%:</p>
<div class="wp-caption alignnone" style="width: 310px"><a href="http://www.harkyman.com/images/100blue.jpg"><img title="100% Blue Soft Light Mix" src="http://www.harkyman.com/images/100blue_t.jpg" alt="100% Blue Soft Light Mix" width="300" height="188" /></a><p class="wp-caption-text">100% Blue Soft Light Mix</p></div>
<p>That&#8217;s pretty extreme, but you get the picture. Even something as simple as blending an RGB Black (0,0,0) into an image at 100% produces a neat effect:</p>
<div class="wp-caption alignnone" style="width: 310px"><a href="http://www.harkyman.com/images/100black.jpg"><img title="100% Black Soft Light Mix" src="http://www.harkyman.com/images/100black_t.jpg" alt="100% Black Soft Light Mix" width="300" height="188" /></a><p class="wp-caption-text">100% Black Soft Light Mix</p></div>
<p>It gives the image a completely different feel.</p>
<p>And finally, if you take your original image, map it to black and white, pump that result through a color ramp filter and remix it with Soft Light as so:</p>
<div class="wp-caption alignnone" style="width: 1290px"><img title="Node network for creating a color ramped blend image" src="http://www.harkyman.com/images/compositor.jpg" alt="Node network for creating a color ramped blend image" width="1280" height="512" /><p class="wp-caption-text">Node network for creating a color ramped blend image</p></div>
<p>You get this:</p>
<div class="wp-caption alignnone" style="width: 310px"><a href="http://www.harkyman.com/images/colorramp.jpg"><img title="Color Ramp Soft Light Mix" src="http://www.harkyman.com/images/colorramp_t.jpg" alt="Color Ramp Soft Light Mix" width="300" height="188" /></a><p class="wp-caption-text">Color Ramp Soft Light Mix</p></div>
<p>When you go to the higher resolution version, check out how the red from the color ramp cast the shadows and darker portions of the image warmer, while the highlights bled a bit green. In my opinion, this technique adds a lot of visual depth to an image.</p>
<p>Now that Soft Light is in, I&#8217;ll also be posting my node network that creates a pretty good &#8220;film look&#8221; from rendered imagery. Look for it here in the next couple of days!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harkyman.com/2009/09/10/soft-light-mix-mode-is-in-2-5/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>In the works&#8230;</title>
		<link>http://www.harkyman.com/2008/12/31/in-the-works/</link>
		<comments>http://www.harkyman.com/2008/12/31/in-the-works/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 22:49:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.harkyman.com/2008/12/31/in-the-works/</guid>
		<description><![CDATA[Currently in the works&#8230;

Starting in to help with Blender 2.5 development. The RNA system is very, very neat. I&#8217;ll probably be a &#8220;coding buddy&#8221; on the animation tools.
Scripting and storyboarding for a short promo animated spot to help get some animation gigs;
Tech editing an upcoming book on using Blender&#8217;s node compositor as part of the [...]]]></description>
			<content:encoded><![CDATA[<p>Currently in the works&#8230;</p>
<ul>
<li>Starting in to help with Blender 2.5 development. The RNA system is very, very neat. I&#8217;ll probably be a &#8220;coding buddy&#8221; on the animation tools.</li>
<li>Scripting and storyboarding for a short promo animated spot to help get some animation gigs;</li>
<li>Tech editing an upcoming book on using Blender&#8217;s node compositor as part of the video production pipeline.</li>
</ul>
<p>And Happy New Year, everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harkyman.com/2008/12/31/in-the-works/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CMU Open Source Research Project</title>
		<link>http://www.harkyman.com/2008/08/26/cmu-open-source-research-project/</link>
		<comments>http://www.harkyman.com/2008/08/26/cmu-open-source-research-project/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 15:11:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.harkyman.com/2008/08/26/cmu-open-source-research-project/</guid>
		<description><![CDATA[I was recently interviewed by the heads of a research project at CMU that aims to assist people working in highly distributed development environments &#8212; just like Blender! In fact, it was my affiliation with Blender that lead them to me in the first place.
The tool they are working on is a very cool visualizer [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently interviewed by the heads of a research project at <a href="http://www.cmu.edu/index.shtml">CMU</a> that aims to assist people working in highly distributed development environments &#8212; just like Blender! In fact, it was my affiliation with Blender that lead them to me in the first place.</p>
<p>The tool they are working on is a very cool visualizer for developers and managers that creates linked networks (much like Blender&#8217;s Oops schematic) of files and developers, using commit and mailing list messages as a database. The main tool shows two sides of the screen: one with clusters of files, and one with developers. The file clusters have lines that link them, giving you the quick ability to see what files are related to others. The cool thing is that it doesn&#8217;t do this through code analysis, but commit analysis, as in: these five files are very often committed together.</p>
<p>Clicking on a file highlights it&#8217;s links to other files, and creates a visualization on the right of the screen of developers who have contributed to that file. The developers are likewise linked to one another based on their levels of communication on the official mailing lists.</p>
<p>The very cool thing about the project is that it would be a goldmine for people working on a project like Blender who either want to get started coding, or want to work on something that is a little out of their normal area of knowledge. If you want to work on constraints, but have never done so, you can tell at a glance that you&#8217;ll probably need to dig into, for example, files <em>a</em>, <em>b</em> and <em>c</em>, and that the people who normally commit to those files are <em>x</em>, <em>y</em> and <em>z</em>.</p>
<p>That gives the new dev a great resource for beginning their work, and for making the proper contacts when problems or questions arise. It is a fairly simple, but very powerful concept.</p>
<p>The project itself doesn&#8217;t have a website, so I won&#8217;t throw a link, but if they read this, here&#8217;s hoping that this cool tool becomes available someday in the not-to-distant future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harkyman.com/2008/08/26/cmu-open-source-research-project/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>New compositor mix types</title>
		<link>http://www.harkyman.com/2008/08/21/new-compositor-mix-types/</link>
		<comments>http://www.harkyman.com/2008/08/21/new-compositor-mix-types/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 02:38:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.harkyman.com/2008/08/21/new-compositor-mix-types/</guid>
		<description><![CDATA[As I prepare The Beast for its web release, I&#8217;ve been looking for a way to make the standard Blender render look a bit more film-like through the compositor. I came across a great method using Photoshop that was devised for making digital stills appear more like their film-based counterparts. I prepped a couple of [...]]]></description>
			<content:encoded><![CDATA[<p>As I prepare <em>The Beast</em> for its web release, I&#8217;ve been looking for a way to make the standard Blender render look a bit more film-like through the compositor. I came across a great method using Photoshop that was devised for making digital stills appear more like their film-based counterparts. I prepped a couple of frames directly in Photoshop, and it gave a nice effect. Unfortunately, Blender&#8217;s compositor was lacking one very important Blender method: Soft Light. A little Google-fu turned up the proper equations and a little poking around in the sources and begging on irc turned up the proper portion of the code with which to fiddle.</p>
<p><strong>Soft Light</strong> is a blend method that is particularly suited to colorizing and grading images. It has other uses (balancing luminosity, for example), but I&#8217;ve mostly used it for tinting in my career as a Photoshop professional. The &#8220;film look&#8221; procedure called for heavy use of this blend method, and I found that there was no decent way to simulate it in the compositor. So, a little work and it was done. Pictures are below the fold&#8230;</p>
<p><span id="more-55"></span>Patch in the tracker:</p>
<p><a href="http://projects.blender.org/tracker/index.php?func=detail&amp;aid=17504">Soft Light patch&#8230;</a></p>
<p>Here&#8217;s a raw frame from <em>The Beast </em>(click for 720p HD)<em>:</em></p>
<p><a href="http://www.harkyman.com/animprop/sl_base.png"><img src="http://www.harkyman.com/animprop/sl_base.jpg" /></a></p>
<p>Here is that same frame colorized by blending a solid RGB blue (in the first) and orange (in the second) into the image with a <strong>Soft Light </strong>mix node (once again, click for 720p HD):</p>
<p><a href="http://www.harkyman.com/animprop/sl_colorized_blue.png"><img src="http://www.harkyman.com/animprop/sl_colorized_blue.jpg" /></a>  <a href="http://www.harkyman.com/animprop/sl_colorized.png"><img src="http://www.harkyman.com/animprop/sl_colorized.jpg" /></a></p>
<p>Other blend methods tend to ruin the existing color. Soft Light does a great job of retaining the look of the original while tinting it. If you&#8217;re considering any serious color grading with the compositor, a Soft Light blend will be give more natural looking results than pulling curves.</p>
<p>And now, consider this node network:</p>
<p><img src="http://www.harkyman.com/animprop/sl_nodes.png" /></p>
<p>This takes the RGB image and tone-maps it so that shadows are purple and highlights are orange. Blended back into the original image with a <strong>Soft Light</strong> mix node, the result is this really cool color graded image:</p>
<p><a href="http://www.harkyman.com/animprop/sl_colorized_ramp.png"><img src="http://www.harkyman.com/animprop/sl_colorized_ramp.jpg" /></a></p>
<p>And finally, another raw frame from <em>The Beast</em>, followed by the more filmish effect I&#8217;ve been experimenting with. Note that, as complex as it is already, this effect really wouldn&#8217;t be possible without the convenience and natural color blending ability of <strong>Soft Light</strong>.</p>
<p>Raw:</p>
<p><a href="http://www.harkyman.com/animprop/sl_raw_frame.png"><img src="http://www.harkyman.com/animprop/sl_raw_frame.jpg" /></a></p>
<p>Composite:</p>
<p><a href="http://www.harkyman.com/animprop/sl_film_frame.png"><img src="http://www.harkyman.com/animprop/sl_film_frame.jpg" /></a></p>
<p>If you didn&#8217;t click for HD on the earlier ones, you should really click on these two. The difference is substantial.</p>
<p>Okay &#8212; the odds are the none of you have been clamoring for a <strong>Soft Light</strong> mix type, but hopefully this little set of samples may have awakened you to its super useful&#8230; um&#8230; usefulness. So, if you think this is cool, you could do worse than bug someone to make a build with the patch, give it a shot, and post your artwork.</p>
<p>Next on my list (tomorrow if I get time), is to add the Linear Light blend type. That&#8217;s a necessary pre-requisite for a true <strong>High Pass</strong> filter group in the compositor, which I&#8217;m sure lots of people would find useful (high pass is an image, inverted and blurred, then recombined with Linear Light at 50%).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harkyman.com/2008/08/21/new-compositor-mix-types/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Controllable shadow intensity and color</title>
		<link>http://www.harkyman.com/2008/08/06/controllable-shadow-intensity-and-color/</link>
		<comments>http://www.harkyman.com/2008/08/06/controllable-shadow-intensity-and-color/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 18:12:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.harkyman.com/2008/08/06/controllable-shadow-intensity-and-color/</guid>
		<description><![CDATA[Usually the Blender development projects that I work on are a direct response to a production problem I&#8217;ve encountered. BlenderPeople created animation baking, the Floor Constraint, Visual Keying and Python API enhancements. The Beast birthed Sequencer and Action Editor selection method upgrades. One other problem I ran into during The Beast was shadow control, but [...]]]></description>
			<content:encoded><![CDATA[<p>Usually the Blender development projects that I work on are a direct response to a production problem I&#8217;ve encountered. BlenderPeople created animation baking, the Floor Constraint, Visual Keying and Python API enhancements. <em>The Beast</em> birthed Sequencer and Action Editor selection method upgrades. One other problem I ran into during <em>The Beast</em> was shadow control, but didn&#8217;t have time to address it in the sources during production. Often, I would get my light placement and intensity just right only to discover that shadows were just too dark in one or two places. As the balance between materials and lamps is tricky to get just right, I was loathe to start adding lamps (the standard method of fixing too-shadowed areas) or altering lamp intensity.</p>
<p>Wouldn&#8217;t it be easier, and better for the overall shading and looked that you&#8217;ve struggled to craft, if you could just turn down the intensity of the shadow of the offending lamp?</p>
<p>Of course it would!</p>
<p>Now you can.</p>
<p><span id="more-52"></span>This patch allows you to assign an RGB color to a lamp&#8217;s shadow. Although this isn&#8217;t a feature support &#8220;in the real world,&#8221; the world of 3D is full of time saving tricks and tools that allow artists to bypass the restrictions of the physical world, ironically, in order to present a more realistic view of it in their work.</p>
<p>The technical stuff is first for &#8220;proof of functionality&#8221; review, followed by a couple of images for the artists, and to show its utility.</p>
<p><strong>The Technical Side</strong></p>
<p>This annotated image (click on all images for full size) shows a 5 x 3 array of spheres between shadowing spot lamps and a textured plane. The top row is default shadowing (RGB 0,0,0). The middle row is a shadow value set to RGB 0.5,0.5,0.5, or, half intensity. The bottom row is a very yellow shadow color, RGB 1,1,0.</p>
<p>The columns, from left to right, show:</p>
<ul>
<li>Two shadow lamps, classic buffered, light energy set to red and blue, respectively, offset and crossing.</li>
<li>One shadow lamp, classic buffered, white light. Sphere has Alpha 0.5, with zTransp activated.</li>
<li>One shadow lamp, classic buffered, white light. Sphere is set to OnlyCast.</li>
<li>One shadow lamp, ray shadows, white light. Sphere has Alpha 0.5 with Ray Transp enabled.</li>
<li>One shadow lamp, irregular buffer, white light. Sphere has Alpha 0.3 with ATrans enabled at 0.3.</li>
</ul>
<p>The plane has a simple texture applied, as well as TraShad to receive true transparent shadows from the Irregular and Ray shadow lamps.</p>
<p><a href="http://harkyman.com/animprop/light_demo_notated.png" target="_blank"><img src="http://harkyman.com/animprop/light_demo_notatedt.jpg" title="Notated colored lamp tech demo" alt="Notated colored lamp tech demo" height="300" width="300" /></a></p>
<p>Points of interest in this figure:</p>
<ul>
<li>Half-intensity shadow further lightens that already attenuated shadow from the irregular buffer and ray transp examples, as it should.</li>
<li>Yellow shadow shades the already blue shadow from the ray column toward green, as it should.</li>
<li>Colored shadows mix properly with the colors of other lamp&#8217;s illumination as seen in the dual-lamp column.</li>
<li>OnlyCast, the center column, appears at it should.</li>
</ul>
<p>The default shadow density (RGB 0,0,0) should appear exactly as it did before this addition to the render code. Indeed it does. The following image (click for full size) shows both the sphere example from above and a reference image rendered in Blender 2.46 superimposed in Photoshop with the Difference algorithm. The contrast has been radically boosted in order to show even slight differences. As you can see, the top row of cast light is completely absent, indicating that the renders are identical between the reference and the new method.</p>
<p><a href="http://harkyman.com/animprop/light_demo_difference_boosted.png" target="_blank"><img src="http://harkyman.com/animprop/light_demo_difference_boostedt.jpg" title="Reference image differencing" alt="Reference image differencing" height="300" width="300" /></a></p>
<p>The changes to the Blender sources to achieve this utility are minimal. I found that the shadow handling code was organized well enough that I only had to add any real calculations to two locations. There were a small number of places that gate logic had to be enhanced a bit, and of course the addition of the RGB variables to the lamp structure, but overall, changes were surprisingly minor. Here&#8217;s the real engine of the thing, stuck into the portion of the code where shadows are determined:</p>
<blockquote><p>if (i_noshad&gt;i &amp;&amp; !(lashdw[0]==0 &amp;&amp; lashdw[1]==0 &amp;&amp; lashdw[2]==0)) {<br />
add_to_diffuse(shr-&gt;shad, shi, is, lashdw[0]*(i_noshad-i)*lacol[0], lashdw[1]*(i_noshad-i)*lacol[1], lashdw[2]*(i_noshad-i)*lacol[2]);<br />
}</p></blockquote>
<p>Basically, this just says that if there is some shadow here and the shadow isn&#8217;t set to default conditions (0,0,0), add a little bit of light back onto the surface that corresponds to the shadow color. Where this code is placed, it works with irregular transparent shadows, ray transparency and even textured lamps.</p>
<p>Render times are nearly equivalent, with a very small bump seen in the test file that contained fifteen shadow casting lamps.</p>
<p>Render time of scene in 2.46, averaged over 5 renders: 24.34 seconds.</p>
<p>Render time of scene in patched, averaged over 5 renders:  24.54 seconds.</p>
<p>Both the 2.46 and the patched version were built on the same machine with the same compiling options, etc. The only difference between the binaries is the patched code.</p>
<p>The original renders and .BLEND for this exercise can be accessed here:</p>
<p><a href="http://harkyman.com/animprop/colored_shadow_demo.blend">.BLEND file</a></p>
<p><a href="http://harkyman.com/animprop/light_demo_regression.png" target="_blank">Rendered in 2.46</a></p>
<p><a href="http://harkyman.com/animprop/light_demo_colored.png">Rendered in Trunk + Patch </a></p>
<p><strong>The Artistic Side</strong></p>
<p>While I&#8217;m sure that people making psychedelic videos and other kinds of wacky things will get a kick out of the colored (and textured) shadows, the feature&#8217;s real usefulness lies in the lighting of scenes for production work. As I mentioned before, getting the right look to your renders is a balancing act between the shaders and options of your materials and the intensity, color and type of your lamps. It has often occurred in my work (and others&#8217;!) that I can get everything just right, with the exception of shadow density. The shading looks good, the overall intensity of lamps is perfect. But the shadows are just too dark. The addition of a hemi lamp, sphere lamps, an ambient value or even Ambient Occlusion, the usual fixes for this, will change the overall shading/lighting for the worse.</p>
<p>The beauty of this solution is that it accomplishes the desired effect &#8212; less density in shadows &#8212; without adding light to anything that is not within a cast shadow.</p>
<p>In the following three examples, you can see a production frame, a promotional shot, and a set render from <em>The Beast</em>. In both the promotional shot and the production frame, the previously mentioned problem was encountered: undesirable shadow density but otherwise good lighting.</p>
<p>In the case of the production frame, seen below, the eventual solution was to simply add a Sphere Point Lamp and carefully adjust it&#8217;s distance and intensity to light the deeply shadowed area. In the end, this worked well enough for the deadline I was on. However, the shot still suffered from another area of problem shadow that I did not have time to address, and too much light in the original problem area. The first image shows the problem. The second image shows the same frame rendered with the patch in place and the shadow set to a medium intensity blue. Time for that fix: 10 seconds and one re-render. Time to add an additional lamp that screwed things up: 10 seconds and ten re-renders to try to get it right.</p>
<p><a href="http://harkyman.com/animprop/production_raw.png"><img src="http://harkyman.com/animprop/production_rawt.jpg" title="Raw Production Frame" alt="Raw Production Frame" height="167" width="250" /> Standard shadows</a></p>
<p><a href="http://harkyman.com/animprop/production_patch.png"><img src="http://harkyman.com/animprop/production_patcht.jpg" /> Colored shadows</a></p>
<p>The next example is from a promotional shot for my book. Even tweaking lighting for a still, the strands of the character&#8217;s hair cast a shadow that was just too deep on her face. For initial forays into this shot, I had to fall back on rendering two versions of the shot: one with shadows and without, then hand-combining them Photoshop for a realistic shadow density. I ended up having to re-render later and decided to try it with the colored shadow feature. I simply attenuated the shadowing of the main spot lamp and the result was a perfect out-of-the-box render that needed no special treatment or retouching. As it was, it saved me twenty minutes on a tight deadline, and, had it been part of an animation, would have made the impossible possible. The renders you see here are a recreated example, though, as those original high res renders are not available to me at the moment.</p>
<p><a href="http://harkyman.com/animprop/promo_raw.png" target="_blank"><img src="http://harkyman.com/animprop/promo_rawt.jpg" title="Production Still" alt="Production Still" /></a>   <a href="http://harkyman.com/animprop/promo_patch.png" target="_blank"><img src="http://harkyman.com/animprop/promo_patcht.jpg" title="Same shot using colored shadows" alt="Same shot using colored shadows" /></a></p>
<p>In the two preceding examples, it is important to note how this effect is different from simply upping an ambient value or adding another non-shadow spot lamp to fill in the dark areas. With this technique, all other shadows remain at their full value. Areas not touched by the lamp with a colored shadow do not have to &#8220;suffer&#8221; its effects. In fact, it&#8217;s almost like using a spot lamp as a local, directional ambient value. Notice in both examples how strong shadows which were created by arms close to bodies have been toned down.</p>
<p>Additionally, it becomes obvious that the best use of this feature is when dealing with objects or characters that are in close proximity. Often, one object will cast a strong shadow on the other, and this is a simple and quick way for the artist to mitigate their strength to something more realistic to the situation.</p>
<p>Finally, an interior shot. Because of the nature of the set&#8217;s mesh structure (lots of long thin faces), Approximate Ambient Occlusion did not work well, so the entire set had to be lit with carefully placed shadow lamps. The differences between the two renders are subtle, as I had already done a great deal of work to achieve a passable interior lighting feel. However, the &#8220;difference&#8221; image below shows the mathematical difference between the renders.</p>
<p><a href="http://harkyman.com/animprop/set_ambiance_raw.png" target="_blank"><img src="http://harkyman.com/animprop/set_ambiance_rawt.jpg" title="Raw Set" alt="Raw Set" height="167" width="250" /></a>   <a href="http://harkyman.com/animprop/set_ambiance_patch.png" target="_blank"><img src="http://harkyman.com/animprop/set_ambiance_patcht.jpg" title="Set with Colored Shadows" alt="Set with Colored Shadows" /></a></p>
<p><a href="http://harkyman.com/animprop/set_ambiance_difference.png" target="_blank"><img src="http://harkyman.com/animprop/set_ambiance_differencet.jpg" /></a></p>
<p><strong>Conclusions</strong></p>
<p>Colored shadows, though not physically accurate, have been included in professional 3D packages other than Blender for years for the simple fact that they are a useful tool for the production artist. They have already saved time and produced a better result for me in my own production work. If the user does not care about them, they are in no way bothered by the new feature, as its interface consists of a single RGB color picker on the Shadow panel of the lamp buttons. With no interaction, the feature defaults to black shadows, which is the functional and visual equivalent of Blender&#8217;s current shadowing procedure.</p>
<p>From a technical standpoint, the changes to the sources to achieve this functionality are rather minor, due to existing shadow code&#8217;s fairly clear and clever setup.</p>
<p>If you are in favor of seeing this feature included in the official distribution of Blender at some point, the best thing to do is to use a build with colored shadows in your production work flow, and to forward some of the result of that work onto Ton Roosendal, as well as a small testimonial on how colored shadows helped you/saved your dog from drowning/etc. This patch affects the main shading code, so Ton is the ultimate arbiter of whether or not this one makes it in.</p>
<p>Thanks for taking the time!</p>
<p><a href="http://projects.blender.org/tracker/?func=detail&amp;aid=13422">Link to patch in the patch tracker&#8230; </a></p>
<p>If you&#8217;d like to make a build and put it up on graphicall.org, please post a link in the comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harkyman.com/2008/08/06/controllable-shadow-intensity-and-color/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.933 seconds -->

