<?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>macouno.com &#187; Python scripts</title>
	<atom:link href="http://www.macouno.com/category/python-scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.macouno.com</link>
	<description>The shenanigans of Dolf J. Veenvliet</description>
	<lastBuildDate>Tue, 31 Jan 2012 13:37:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Self shadow</title>
		<link>http://www.macouno.com/2011/04/08/self-shadow/</link>
		<comments>http://www.macouno.com/2011/04/08/self-shadow/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 10:19:41 +0000</pubDate>
		<dc:creator>macouno</dc:creator>
				<category><![CDATA[Blender 2.5x]]></category>

		<guid isPermaLink="false">http://www.macouno.com/?p=1501</guid>
		<description><![CDATA[Downloadable Filesmesh_self_shadow.py&#160;(236)The self shadow script creates vertex colours based on the angles of your mesh. It has been quite a while since Campbell Barton wrote the original Self Shadow script (it was included in Blender 2.45). Around the same time I wrote the &#8220;Ma Baker&#8221; script that did something similar. We then cooperated in writing [...]]]></description>
			<content:encoded><![CDATA[<div class="fields"><div class="field"><h4>Downloadable Files</h4><ul><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2011/04/mesh_self_shadow.py' title='mesh_self_shadow.py'>mesh_self_shadow.py</a>&nbsp;<span title="downloads">(236)</span></li></ul></div><div class="claro"></div></div><p>The self shadow script creates vertex colours based on the angles of your mesh.</p>
<p>It has been quite a while since Campbell Barton wrote the original Self Shadow script (it was included in <a href="http://download.blender.org/release/Blender2.45/">Blender 2.45</a>). Around the same time I wrote the &#8220;<a href="http://www.macouno.com/2010/03/17/ma-baker/">Ma Baker</a>&#8221; script that did something similar. We then cooperated in writing the &#8220;<a href="http://www.macouno.com/2010/03/17/ma-self/">Ma Self</a>&#8221; script which was an optimised version of a third method.</p>
<h3>The new addon</h3>
<p><a href="http://www.macouno.com/wp-content/uploads/2011/04/Self_shadow.jpg"><img title="Self_shadow" src="http://www.macouno.com/wp-content/uploads/2011/04/Self_shadow.jpg" alt="" width="700" height="386" /></a></p>
<p>Because I&#8217;m currently working on growing <a href="http://www.macouno.com/category/projects/entoforms/">Entoforms</a> with colours, I also wanted some shading and this method is perfect for it. I decided to rewrite the scripts as a Blender 2.5 addon.</p>
<p>After placing the script in your addons folder and enabling it through the user preferences (mesh/self shadow). You can find the function in the vertex paint mode under the paint menu.</p>
<p>I will probably do a rewrite with more refined options soon, but I thought I&#8217;d share this version already since it works rather well.</p>
<p>An added functionality is that it generates shadows in HSV colour mode. This means that even if you already painted your mesh&#8230; the original vertex colour data is retained&#8230; only the &#8220;lightness&#8221; is altered by the script.</p>
<div class="gallery"><ul><li><a href="http://www.macouno.com/wp-content/uploads/2011/04/Self_shadow.jpg" class="thumb" title="Self_shadow" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2011/04/Self_shadow-80x320.jpg" alt="Self_shadow" title="Self_shadow" /></a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.macouno.com/2011/04/08/self-shadow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert to Empty</title>
		<link>http://www.macouno.com/2010/03/21/convert-to-empty/</link>
		<comments>http://www.macouno.com/2010/03/21/convert-to-empty/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 18:25:19 +0000</pubDate>
		<dc:creator>macouno</dc:creator>
				<category><![CDATA[Blender 2.5x]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[Python script]]></category>

		<guid isPermaLink="false">http://www.macouno.com/?p=702</guid>
		<description><![CDATA[Downloadable FilesConvertToEmpty_1&#160;(256)I just now needed this to replace a bunch of objects with empties so I can use &#8220;Dupligroups&#8221; in stead. I thought I&#8217;d publish it&#8230; but no more info for now&#8230; perhaps later. It&#8217;s meant to work in Blender 2.5 Now Blender 2.5 still isn&#8217;t stable so don&#8217;t expect it to work as is [...]]]></description>
			<content:encoded><![CDATA[<div class="fields"><div class="field"><h4>Downloadable Files</h4><ul><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/ConvertToEmpty_1.py' title='ConvertToEmpty_1'>ConvertToEmpty_1</a>&nbsp;<span title="downloads">(256)</span></li></ul></div><div class="claro"></div></div><p>I just now needed this to replace a bunch of objects with empties so I can use &#8220;Dupligroups&#8221; in stead. I thought I&#8217;d publish it&#8230; but no more info for now&#8230; perhaps later. It&#8217;s meant to work in Blender 2.5</p>
<p>Now Blender 2.5 still isn&#8217;t stable so don&#8217;t expect it to work as is forever&#8230; I found it usefull though.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.macouno.com/2010/03/21/convert-to-empty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selection to view cursor</title>
		<link>http://www.macouno.com/2010/03/18/selection-to-view-cursor/</link>
		<comments>http://www.macouno.com/2010/03/18/selection-to-view-cursor/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 23:13:38 +0000</pubDate>
		<dc:creator>macouno</dc:creator>
				<category><![CDATA[Blender 2.4x]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[Python script]]></category>

		<guid isPermaLink="false">http://www.macouno.com/?p=678</guid>
		<description><![CDATA[Downloadable FilesSelToViewCursor.1.py&#160;(181)VertsToViewCursor.1.py&#160;(211)This script moves your current selection to the cursor relative to the current view. Requirements This script is written for blender 2.45 Running the script There are no settings for this script. It acts on your currently active object, or if you are in edit mode on the verts in your mesh. Of course [...]]]></description>
			<content:encoded><![CDATA[<div class="fields"><div class="field"><h4>Downloadable Files</h4><ul><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/SelToViewCursor.1.py' title='SelToViewCursor.1.py'>SelToViewCursor.1.py</a>&nbsp;<span title="downloads">(181)</span></li><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/VertsToViewCursor.1.py' title='VertsToViewCursor.1.py'>VertsToViewCursor.1.py</a>&nbsp;<span title="downloads">(211)</span></li></ul></div><div class="claro"></div></div><p>This script moves your current selection to the cursor relative to the current view.</p>
<hr />
<h3>Requirements</h3>
<p>This script is written for blender 2.45</p>
<hr />
<h3>Running the script</h3>
<p>There are no settings for this script. It acts on your currently active object, or if you are in edit mode on the verts in your mesh.</p>
<p>Of course you can just open the script in your text window, but I find it&#8217;s nicer from the menus. If you added the script to your scripts folder it shows up in the Object menu of your 3d view as well so you can just select it there.</p>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/objectmenu.jpg" border="1" alt="" /></p>
<p>But since you may also want it to be in the mesh menu I made a second version. This second version is exactly the same as the original, but with a different header.</p>
<p>You can download that version by clicking here: <a href="http://www.macouno.com/wp-content/uploads/2010/03/VertsToViewCursor.1.py">VertsToViewCursor.1.py</a> (put that in your scripts folder as well)</p>
<p>If you did you&#8217;ll find it in the Mesh menu as well</p>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/meshmenu.jpg" border="1" alt="" /></p>
<hr />
<h3>The practial use of the script</h3>
<p>Lets give a small practical example. Say I have two suzannes in my scene like this.</p>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/monkeys1.jpg" border="1" alt="" /></p>
<p>They have completely different positions, but now lets say that I want them right next to each other. So I put the cursor at the position of the left monkey by doing the normal &#8220;cursor to selection&#8221; (ctrl+s).</p>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/monkeys2.jpg" border="1" alt="" /></p>
<p>Now if I would select the other suzanne and did a &#8220;selection to cursor&#8221; their positions would be completely identical&#8230; and that&#8217;s not what I want&#8230; so I go into side view and run the script.</p>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/monkeys3.jpg" border="1" alt="" /></p>
<p>And this is the result as seen from the side.</p>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/monkeys4.jpg" border="1" alt="" /></p>
<p>But if we go to the front view you can see they are still next to each other (the x position of the second suzanne is not influensed, since that was the view vector). And we can do this from any angle, it doesn&#8217;t have to be just the front or side.</p>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/monkeys5.jpg" border="1" alt="" /></p>
<p>And we can do this with verts in a mesh as well! Think of it as a tool to align things!</p>
<hr />
<p>That&#8217;s it for now.. I hope it&#8217;s as usefull to you as it is to me.</p>
<p>Dolf</p>
<div class="gallery"><ul><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/meshmenu.jpg" class="thumb" title="meshmenu" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/meshmenu-97x100.jpg" alt="meshmenu" title="meshmenu" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/monkeys1.jpg" class="thumb" title="monkeys1" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/monkeys1-100x48.jpg" alt="monkeys1" title="monkeys1" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/monkeys2.jpg" class="thumb" title="monkeys2" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/monkeys2-100x48.jpg" alt="monkeys2" title="monkeys2" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/monkeys3.jpg" class="thumb" title="monkeys3" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/monkeys3-100x83.jpg" alt="monkeys3" title="monkeys3" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/monkeys4.jpg" class="thumb" title="monkeys4" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/monkeys4-100x48.jpg" alt="monkeys4" title="monkeys4" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/monkeys5.jpg" class="thumb" title="monkeys5" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/monkeys5-100x48.jpg" alt="monkeys5" title="monkeys5" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/objectmenu.jpg" class="thumb" title="objectmenu" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/objectmenu-97x100.jpg" alt="objectmenu" title="objectmenu" /></a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.macouno.com/2010/03/18/selection-to-view-cursor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Really big render</title>
		<link>http://www.macouno.com/2010/03/18/really-big-render/</link>
		<comments>http://www.macouno.com/2010/03/18/really-big-render/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 23:06:26 +0000</pubDate>
		<dc:creator>macouno</dc:creator>
				<category><![CDATA[Blender 2.4x]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[Python script]]></category>

		<guid isPermaLink="false">http://www.macouno.com/?p=660</guid>
		<description><![CDATA[Downloadable FilesReallyBigRender.3&#160;(453)ReallyBigRender.2&#160;(220)ReallyBigRender.2.1&#160;(197)ReallyBigRender.1&#160;(189)This script helps you render to sizes so large that blender can&#8217;t normally handle them. Requirements This script is written for Blender 2.47, but should work in older versions. If you want to use the new Composite function you need to have a full python install and the PIL library. You can get the [...]]]></description>
			<content:encoded><![CDATA[<div class="fields"><div class="field"><h4>Downloadable Files</h4><ul><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/ReallyBigRender.3.py' title='ReallyBigRender.3'>ReallyBigRender.3</a>&nbsp;<span title="downloads">(453)</span></li><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/ReallyBigRender.2.py' title='ReallyBigRender.2'>ReallyBigRender.2</a>&nbsp;<span title="downloads">(220)</span></li><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/ReallyBigRender.2.1.py' title='ReallyBigRender.2.1'>ReallyBigRender.2.1</a>&nbsp;<span title="downloads">(197)</span></li><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/ReallyBigRender.1.py' title='ReallyBigRender.1'>ReallyBigRender.1</a>&nbsp;<span title="downloads">(189)</span></li></ul></div><div class="claro"></div></div><p>This script helps you render to sizes so large that blender can&#8217;t normally handle them.</p>
<hr />
<h3>Requirements</h3>
<p>This script is written for Blender 2.47, but should work in older versions.</p>
<p>If you want to use the new Composite function you need to have a full python install and the PIL library.</p>
<p>You can get the PIL library here: <a href="http://www.pythonware.com/products/pil/">http://www.pythonware.com/products/pil/</a></p>
<hr />
<h3>Running the script</h3>
<p>The script will render to 2, 3, 4, or 5 times your original rendersize. You can select the multiplier you want from a popup window. So say your rendersettings are 800 x 600 and you select 3X multiplication, then the script will render nine images at 800 x 600. If you combine these images in your favoured image editor the end result will be a single image of 3200 x 1800 pixels. Make sure that Blender can render at your current render settings! If it can&#8217;t then it won&#8217;t render the tiles either! The tiles are rendered left to right, top to bottom and numbered as such, so 0_0 will be the left top, and 1_1 the right bottom (for a 4 tile render).</p>
<hr />
<h3>Step one, setting the filename/location to render to</h3>
<p>The first thing you see when you run the script is a file window that comes up. Here you set what directory you want your images to be saved in. Set the filename to only the name, without the directory as in the example below.</p>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/setimage.png" border="1" alt="" width="451" height="346" /></p>
<hr />
<h3>Step two, setting the number of tiles you want (multiplier)</h3>
<p>After the file selection window you will get a popup asking you how many tiles you want to render, as seen below here.</p>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/sizesetting.png" border="1" alt="" width="150" height="122" /></p>
<hr />
<h3>Step three, composite or not</h3>
<p>If you have the PIL library installed your last option is whether you want a composite created or not.</p>
<p><strong>If the script can not find the library, you will not see this option.</strong></p>
<p>Be aware that the script could easily fail during this action. It all depends on how much memory PIL can use.</p>
<p>But even if PIL can not create your composite for you, you will still have the tiles.</p>
<p>The limit for my system (32bit vista) is somewhere between 15k and 20k, which is still bigger than I can render in Blender internally.</p>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/compositesetting.png" border="1" alt="" width="166" height="62" /></p>
<hr />
<h3>Things to know</h3>
<p>Some texturing methods are dependant on the &#8216;screen&#8217; which means they don&#8217;t work well with lens shift and this script. Try to avoid material textures mapped to &#8220;win&#8221;, and world textures with &#8220;paper&#8221; switched on.</p>
<p><strong>Update</strong>: I just found out that the script won&#8217;t work if you have manually set a border. So if you have a border set to your camera&#8230; add a new/fresh camera and use that.</p>
<hr />
<h3>Example</h3>
<p>Here I rendered cornelius at 320 x 240 pixels.</p>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/cornelius_small.jpg" border="1" alt="" width="320" height="240" /></p>
<p>Then I ran the script, and made it render twice the size by creating the following 4 tiles.</p>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/cornelius_tiled.jpg" border="1" alt="" width="640" height="480" /></p>
<hr />
<h3>And a much nicer example by Cujo13</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/cujo31.jpg" border="1" alt="" /></p>
<p>He rendered this at 10.000 by 12.000 pixels, and it was used to create a mural 8.5feet by 10feet in size.</p>
<p>You can visit his site at <a href="http://www.greatlakesgraphics.net/">http://www.greatlakesgraphics.net/</a></p>
<hr />
<h3>That&#8217;s all</h3>
<p>If you have any questions or comments please contact me through the <a class="link" href="http://www.blenderartists.org" target="_blank">blenderartists.org forums</a></p>
<p>Enjoy macouno</p>
<p><a class="link" href="http://www.alienhelpdesk.com/project-b/files/download.php?file=ReallyBigRender.1.py"></a></p>
<div class="gallery"><ul><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/sizesetting.png" class="thumb" title="sizesetting" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/sizesetting-100x81.png" alt="sizesetting" title="sizesetting" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/setimage.png" class="thumb" title="setimage" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/setimage-100x76.png" alt="setimage" title="setimage" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/cujo31.jpg" class="thumb" title="cujo31" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/cujo31-76x100.jpg" alt="cujo31" title="cujo31" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/cornelius_tiled.jpg" class="thumb" title="cornelius_tiled" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/cornelius_tiled-100x75.jpg" alt="cornelius_tiled" title="cornelius_tiled" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/cornelius_small.jpg" class="thumb" title="cornelius_small" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/cornelius_small-100x75.jpg" alt="cornelius_small" title="cornelius_small" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/compositesetting.png" class="thumb" title="compositesetting" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/compositesetting-100x37.png" alt="compositesetting" title="compositesetting" /></a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.macouno.com/2010/03/18/really-big-render/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Raytrace baker</title>
		<link>http://www.macouno.com/2010/03/17/raytrace-baker/</link>
		<comments>http://www.macouno.com/2010/03/17/raytrace-baker/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 22:53:20 +0000</pubDate>
		<dc:creator>macouno</dc:creator>
				<category><![CDATA[Blender 2.4x]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[Python script]]></category>

		<guid isPermaLink="false">http://www.macouno.com/?p=603</guid>
		<description><![CDATA[Downloadable FilesBRayBaker.3.5&#160;(198)BRayBaker.3.3&#160;(179)BRayBaker.2&#160;(169)BRayBaker.1.2&#160;(154)BakerChecker.1&#160;(164)Important information Be aware that baking has been added to blender&#8217;s source! This basicly means that this script has become outdated. Find the official information about it here. I will keep this script online, but I won&#8217;t be updating it Blender Raytrace Baker Originally written by macouno 31-05-2005 (current release version 16-07-2006 for blender [...]]]></description>
			<content:encoded><![CDATA[<div class="fields"><div class="field"><h4>Downloadable Files</h4><ul><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/BRayBaker.3.52.py' title='BRayBaker.3.5'>BRayBaker.3.5</a>&nbsp;<span title="downloads">(198)</span></li><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/BRayBaker.3.3.py' title='BRayBaker.3.3'>BRayBaker.3.3</a>&nbsp;<span title="downloads">(179)</span></li><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/BRayBaker.2.py' title='BRayBaker.2'>BRayBaker.2</a>&nbsp;<span title="downloads">(169)</span></li><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/BRayBaker.1.2.py' title='BRayBaker.1.2'>BRayBaker.1.2</a>&nbsp;<span title="downloads">(154)</span></li><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/BakerChecker.1.py' title='BakerChecker.1'>BakerChecker.1</a>&nbsp;<span title="downloads">(164)</span></li></ul></div><div class="claro"></div></div><p><strong>Important information</strong><br />
Be aware that baking has been added to blender&#8217;s source!</p>
<p>This basicly means that this script has become outdated.</p>
<p><a class="link" href="http://www.blender3d.org/cms/Render_Baking.827.0.html" target="blank">Find the official information about it here.</a></p>
<p>I will keep this script online, but I won&#8217;t be updating it</p>
<hr />
<h3>Blender Raytrace Baker</h3>
<p>Originally written by macouno 31-05-2005</p>
<p>(current release version 16-07-2006 for blender 2.42)</p>
<p>This page explains a bit about what this script does and how you can use it.</p>
<hr />
<h3>Requirements</h3>
<p>Version 3.4 is written for the blender 2.42 official release. You can still download version 3 for older blender versions (3.4 should be fine but just to be sure I left it on here) The scripts uses both the os and math modules, which means that you need a full python install.</p>
<hr />
<h3>The gui</h3>
<p><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_gui.gif"><img class="alignnone size-full wp-image-644" title="blender_bray_gui" src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_gui.gif" alt="" width="249" height="396" /></a></p>
<hr />
<h3>The use and functions of the script</h3>
<h3>Top details</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_top.gif" border="1" alt="blender_bray_top.gif" /></p>
<p>At the top of the gui you can read what version you are currently using.</p>
<p><strong>Regular data</strong></p>
<p>On the top line you can read how many mesh objects are available in the current scene. On the second line you can read what object you have selected now. On the third line you can read how many faces your current object has.</p>
<p><strong>Warnings</strong></p>
<p>If you don&#8217;t get the above you&#8217;ll get a message saying: <span class="comment">No object with faces selected! Select one and press reset!</span> Which I suggest you do ;)</p>
<hr />
<h3>Layer selection</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_layer.gif" alt="blender_bray_layer.gif" /></p>
<p>Here you can select what layers you want to be rendered. Thus you can for instance have an object selected on layer one that you want to create a new baked texture for. But you can have the script render a higher poly version of the object on another layer.</p>
<hr />
<h3>Camera settings</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_cdist.gif" alt="blender_bray_cdist.gif" /></p>
<p>In these 3 number fields you can set your basic camera settings. For normal use I advise you to keep them as is.</p>
<p><strong>c-start</strong></p>
<p><strong> </strong>Sets the clipstart of your camera in the same way the Clipsta setting in your blender settings does. If you set this too small or too close to the c-dist value you may get clipping of faces.</p>
<p><strong>c-dist</strong></p>
<p><strong> </strong>Sets the distance buffer from the closest vert to the camera. The script calculates the absolute minimal distance from the midpoint between the verts to the camera. This will put it right at the closest vert. But blender needs a slight buffer for it to register a face. Thus we set the camera a little bit further away. This value should be bigger than the c-start value and smaller than the c-end value.</p>
<p><strong>c-end</strong></p>
<p><strong> </strong>This one&#8217;s simple&#8230; It sets the Clipend for your camera in the same way the ClipEnd can be set in your normal camera settings. The clipend must be big enough to not only reach the distance of the first vert but the furthest vert in the face&#8230; thus we like to keep it large. Set it lower for quicker renders but usually you can leave it as is.</p>
<hr />
<h3>Frame selection</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_frame.gif" alt="blender_bray_frame.gif" /></p>
<p>In this number field you can set what frame you want to render. It&#8217;s really only helpfull in case you want to render a specific frame in an animated sequence.</p>
<hr />
<h3>Uv layout</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_touv.gif" alt="blender_bray_touv.gif" /></p>
<p>Here&#8217;s one to think hard about. When there are no uv coords available you will see a message in place of this toggle. <span class="comment">No uv coords set!</span> In normal modes it means that texface (edit buttons) is not enabled for this mesh. And normally this means there is not yet a uv layout to render to. In &#8220;all mesh&#8221; mode it means that one or more of your meshes do not have an available uv layout. When not selected the script will create all new uv coordinates for your mesh. The texture will be rendered onto a grid of squares. When selected the script will attempt to render to your uv layout. Be aware that if you have overlapping uv&#8217;s you will get unsatisfactory results.</p>
<hr />
<h3>Resetting</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_resetting.gif" alt="blender_bray_resetting.gif" /></p>
<p>Here you have two options for resetting which are normally selected. <strong>R scn</strong> When selected the new scene that&#8217;s created for tile to image conversion is not removed. Thus if you are getting errors you can use this to see if anything went wrong there. It&#8217;s really mostly there for me to see what&#8217;s happened. When in &#8220;all mesh&#8221; mode the button will be hidden and you can see the following text. <span class="comment">Resetting!</span> This because your blend file would get far too messy if left on. <strong>X tiles</strong> When selected all the temporary tile images created by the script will be removed after the render is complete. For testing purposes it can be handy to see everything that got done. I can come up with other applications but as a standard leave it selected.</p>
<hr />
<h3>Estimation</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_estimate.gif" alt="blender_bray_estimate.gif" /></p>
<p>When this button is selected the script will estimate optimal tile/image sizes every time you change one of their values. When you are in &#8220;all mesh&#8221; mode the button will disappear and the following text will be visible. <span class="comment">Estimation is on!</span> This means that reset has been switched on. This because setting tile sizes for all meshes according to the one you have selected is not practical (more on this later) You can of course swith estimation on to see what values it gives you, then switch it off and set the image size values to whatever you like.</p>
<hr />
<h3>Tile size relativity</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_relative.gif" alt="blender_bray_relative.gif" /></p>
<p>Here you have 3 options for how you want your tile size to be calculated when estimation is switched on.</p>
<p><strong>Edge length</strong></p>
<p><strong> </strong>The tile size will be calculated relative to the longest edge&#8217;s length of each face. Use this mode if you have a lot of &#8216;non square&#8217; faces. Long and thin faces may not have a large area which would normally mean they get rendered quite small. In this mode that won&#8217;t be such an issue.</p>
<p><strong>Face area</strong></p>
<p><strong> </strong>The tile size will be calculated relative to the face area of your mesh. If you render to an existing uv layout it calculates the maximum face area relative to the maximum uv area. Then it calculates the minimum face area relative to that. If you don&#8217;t render to an existing uv layout the maximum tile and minimum tile sizes will be calculated relative to the total area of your mesh.</p>
<p><strong>Uv area</strong></p>
<p><strong> </strong>The tile size will be calculated relative to the uv layout of your mesh. If you have no available uv layout it will result in the same as a Non relative render. This mode calculates the face&#8217;s uv areas relative to the total uv area that&#8217;s available, not the total uv area that&#8217;s used.</p>
<p><strong>Non relative</strong></p>
<p><strong> </strong>When tile size is non relative all your tile images are the same exact size. The difference between the total image and tile images is calculated using the total number of faces in your mesh. This is the optimal setting for rendering to a new uv grid.</p>
<hr />
<h3>Normal image sizes</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_tilesizes.gif" alt="blender_bray_tilesizes.gif" /></p>
<p>Here you can set the size of your renders. There are 3 available sliders.</p>
<p><strong>tile min</strong></p>
<p><strong> </strong>This slider is only available when your render to relative image sizes. It sets the absolute smallest tile that will be rendered.</p>
<p><strong>tile max</strong></p>
<p><strong> </strong>In non relative render mode this slider sets the size of your tiles. In relative render mode it sets the absolute maximum size for your tiles.</p>
<p><strong>image</strong></p>
<p><strong> </strong>This sets the size of the total compilation uv texture image that will be rendered.</p>
<hr />
<h3>All mesh image sizes</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_minmax.gif" alt="blender_bray_minmax.gif" /></p>
<p>When you select &#8220;all mesh&#8221; mode the normal image size sliders are replaced by these 2 sliders. The size for each image will be calculated relative to the total face area of your mesh. You can still select what estimation mode you want to use. But for practical purposes we&#8217;ll let the script calculate all the tile sizes. To see what those tile sizes will be for an object leave &#8220;all mesh&#8221; mode and select that object, then press reset.</p>
<p><strong>min image</strong></p>
<p>The minimum size for the final uv textures.</p>
<p><strong>max image</strong></p>
<p>The maximum size for the final uv textures.</p>
<hr />
<h3>The render path</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_path.gif" alt="blender_bray_path.gif" /></p>
<p>Here you set the path where you want the files to be saved. You need a total path and filename without extention. So you can set: <span class="comment">c:myfoldermyfilename</span> But not: <span class="comment">c:myfoldermyfilename.png</span> The extention and frame nr will be added to the filename. In &#8220;all mesh&#8221; mode the object name will be added as well. If you don&#8217;t change the frame your default final imagefile name format will look like: <span class="comment">myfilename0001.png</span> If you are in &#8220;all mesh&#8221; mode it will look something like: <span class="comment">myfilenametheboject0001.png</span></p>
<hr />
<h3>Image types</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_image.gif" alt="blender_bray_image.gif" /></p>
<p>This one should be easy. You can select three image types.</p>
<p><span class="comment">PNG</span></p>
<p>Targa</p>
<p>JPG</p>
<p>Do not use jpg if you want to render with an alpha channel. I advise you to use PNG since it&#8217;s lossless but not as huge as Targa.</p>
<hr />
<h3>Rendermodes</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_modes.gif" alt="blender_bray_modes.gif" /><strong> </strong></p>
<p><strong> </strong>There are three render modes available.</p>
<p><strong>All faces</strong></p>
<p><strong> </strong>All faces of your current mesh will be rendered</p>
<p><strong>Selected faces</strong></p>
<p><strong> </strong>Only the selected faces (in face mode) will be rendered. Be aware that when you render in this mode to an existing uv layout it will also create the copies of this face needed for seamlesnes. So your image may look strange but it will be correct.</p>
<p><strong>All meshes</strong></p>
<p><strong> </strong>All the mesh objects in this scene will be rendered. Reset of scene will be enabled. Estimation will be enabled. To uv layout rendering will only be possible if all your meshes have a uv layout assigned. The image sliders will be set to minimum and maximum total image.</p>
<hr />
<h3>Bottom menu</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_bottom.gif" alt="blender_bray_bottom.gif" /><strong> </strong></p>
<p><strong> </strong>Here you have 3 options:</p>
<p><strong>Run the script</strong></p>
<p><strong> </strong>Will start the rendering of your tiles.</p>
<p><strong>Reset</strong></p>
<p><strong> </strong>Will try to reaquire the mesh you have selected. Will recalculate relative rendersizes relative to the total image size.</p>
<p><strong>Exit</strong></p>
<p><strong> </strong>Exits the script.</p>
<hr />
<h3>Do&#8217;s and dont&#8217;s</h3>
<h3>Pitfalls and things to do before using the script</h3>
<p>There is a flaw in the windows dirname function when you haven&#8217;t saved your current file before. This only impacts the script if you set a relative render path. So if your renderpath was //render It may print out ./render To solve it&#8230; either just type in the full path or save your blend file (and reopen the script). The bug is solved now (so I&#8217;m told) so if you have something more current than 2.37 this should be fine. The script will get errors if you have loose verts floating around in your mesh. For finding these problems I wrote the <a href="http://www.alienhelpdesk.com/mesh_checker">Mesh Checker</a> script. Also you may want to run the script on a copy of your object. This because in regular mode (not original uv) it changes all the object&#8217;s uv coordinates. I advise against using specularity! The camera angle is different for each face so it&#8217;ll never match!</p>
<hr />
<h3>Straight edges and long faces</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_edges.gif" border="1" alt="blender_bray_edges.gif" /><strong> </strong></p>
<p><strong> </strong>In the example on the left you can see the model on the left and the created uv layout on the right. As you can see the blue face only uses a small portion of the square part of the uv layout it resides in. Thus as a rule of thumb&#8230; try to make your faces as square as possible. In the example on the right you can see a small white edge in the black circle. On the right you can see that that&#8217;s where the uv image borders on the white background. This is because we&#8217;re using a true ortho camera straight in front of the face. It&#8217;s not an error in the script. All I can do is advise you to use rounded or beveled objects as much as possible. Or try to set a background color that matches your object somewhat</p>
<hr />
<h3>See through faces</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_drawmode.jpg" border="1" alt="blender_bray_drawmode.jpg" /><strong> </strong></p>
<p><strong> </strong>If after rendering when you enter textured view mode you see slightly transparent faces like above. This means some faces are set with an alpha drawmode. To fix it select them all in face select mode (f) and click on the copy drawmode button in your edit buttons (texture face tab).</p>
<hr />
<h3>A nice example</h3>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_suzanne.jpg" border="1" alt="blender_bray_suzanne.jpg" /></p>
<p>I rendered this texture in a half hour. The tiles are only between 20 x 20 and 40 x 40 in size and I let it render relative to face area. Rendering this model shadeless with a high osa only takes around 2 seconds now&#8230; that&#8217;s a lot quicker than the 5 minutes it would take to raytrace it every time.</p>
<p><strong>That means that after baking I can render my model 150X faster!</strong></p>
<p><img src="http://www.macouno.com/wp-content/uploads/2010/03/sketchy.jpg" border="1" alt="sketchy.jpg" /></p>
<p>This is a figure by <a href="http://cs.unm.edu/~sketch/gallery" target="_blank">Sketchy</a>&#8230; also baked ;) If anyone else has some nice examples that they want to show, please send them to me.</p>
<hr />
<h3>That&#8217;s all for now.</h3>
<p>Enjoy<br />
Dolf</p>
<div class="gallery"><ul><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/sketchy.jpg" class="thumb" title="sketchy" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/sketchy-60x100.jpg" alt="sketchy" title="sketchy" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_touv.gif" class="thumb" title="blender_bray_touv" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_touv-100x24.gif" alt="blender_bray_touv" title="blender_bray_touv" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_top.gif" class="thumb" title="blender_bray_top" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_top-100x24.gif" alt="blender_bray_top" title="blender_bray_top" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_tilesizes.gif" class="thumb" title="blender_bray_tilesizes" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_tilesizes-100x35.gif" alt="blender_bray_tilesizes" title="blender_bray_tilesizes" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_suzanne.jpg" class="thumb" title="blender_bray_suzanne" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_suzanne-100x72.jpg" alt="blender_bray_suzanne" title="blender_bray_suzanne" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_resetting.gif" class="thumb" title="blender_bray_resetting" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_resetting-100x24.gif" alt="blender_bray_resetting" title="blender_bray_resetting" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_relative.gif" class="thumb" title="blender_bray_relative" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_relative-100x69.gif" alt="blender_bray_relative" title="blender_bray_relative" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_path.gif" class="thumb" title="blender_bray_path" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_path-100x11.gif" alt="blender_bray_path" title="blender_bray_path" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_modes.gif" class="thumb" title="blender_bray_modes" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_modes-100x69.gif" alt="blender_bray_modes" title="blender_bray_modes" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_minmax.gif" class="thumb" title="blender_bray_minmax" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_minmax-100x23.gif" alt="blender_bray_minmax" title="blender_bray_minmax" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_layer.gif" class="thumb" title="blender_bray_layer" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_layer-100x16.gif" alt="blender_bray_layer" title="blender_bray_layer" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_image.gif" class="thumb" title="blender_bray_image" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_image-100x79.gif" alt="blender_bray_image" title="blender_bray_image" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_gui.gif" class="thumb" title="blender_bray_gui" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_gui-62x100.gif" alt="blender_bray_gui" title="blender_bray_gui" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_frame.gif" class="thumb" title="blender_bray_frame" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_frame-100x23.gif" alt="blender_bray_frame" title="blender_bray_frame" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_estimate.gif" class="thumb" title="blender_bray_estimate" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_estimate-100x23.gif" alt="blender_bray_estimate" title="blender_bray_estimate" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_edges.gif" class="thumb" title="blender_bray_edges" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_edges-100x45.gif" alt="blender_bray_edges" title="blender_bray_edges" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_drawmode.jpg" class="thumb" title="blender_bray_drawmode" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_drawmode-100x77.jpg" alt="blender_bray_drawmode" title="blender_bray_drawmode" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_cdist.gif" class="thumb" title="blender_bray_cdist" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_cdist-100x70.gif" alt="blender_bray_cdist" title="blender_bray_cdist" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_bottom.gif" class="thumb" title="blender_bray_bottom" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/blender_bray_bottom-100x22.gif" alt="blender_bray_bottom" title="blender_bray_bottom" /></a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.macouno.com/2010/03/17/raytrace-baker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project cursor</title>
		<link>http://www.macouno.com/2010/03/17/project-cursor-2/</link>
		<comments>http://www.macouno.com/2010/03/17/project-cursor-2/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 21:02:09 +0000</pubDate>
		<dc:creator>macouno</dc:creator>
				<category><![CDATA[Blender 2.5x]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[Python script]]></category>

		<guid isPermaLink="false">http://www.macouno.com/?p=542</guid>
		<description><![CDATA[Downloadable FilesProjectCursor_3&#160;(225)Blender 2.5 is at this point still highly experimental, so this script may well change. This script places the cursor at the intersection of the vertex normals of selected vertexes. Requirements This script is written for blender 2.5 and is currently highly experimental. Usage Place the script in your .blender/scripts/op/ folder and when you [...]]]></description>
			<content:encoded><![CDATA[<div class="fields"><div class="field"><h4>Downloadable Files</h4><ul><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/ProjectCursor_3.py' title='ProjectCursor_3'>ProjectCursor_3</a>&nbsp;<span title="downloads">(225)</span></li></ul></div><div class="claro"></div></div><p>Blender 2.5 is at this point still highly experimental, so this script may well change.</p>
<p>This script places the cursor at the intersection of the vertex normals of selected vertexes.</p>
<hr />
<h3>Requirements</h3>
<p>This script is written for blender 2.5 and is currently highly experimental.</p>
<h3>Usage</h3>
<p>Place the script in your <em>.blender/scripts/op/</em> folder and when you reload the scripts using F8 or reopen Blender you can add the tool in the Tool shelf.</p>
<hr />I will add more information when Blender 2.5 becomes more stable. For now you can see the previous version for details on what the script does.</p>
<p>Dolf</p>
]]></content:encoded>
			<wfw:commentRss>http://www.macouno.com/2010/03/17/project-cursor-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project cursor</title>
		<link>http://www.macouno.com/2010/03/17/project-cursor/</link>
		<comments>http://www.macouno.com/2010/03/17/project-cursor/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 20:51:35 +0000</pubDate>
		<dc:creator>macouno</dc:creator>
				<category><![CDATA[Blender 2.4x]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[Python script]]></category>

		<guid isPermaLink="false">http://www.macouno.com/?p=534</guid>
		<description><![CDATA[Downloadable FilesProjectCursor.2&#160;(196)ProjectCursor.1&#160;(152)This script places the cursor at the intersection of the vertex normals of selected vertexes. Requirements This script is written for blender 2.45 but should work with older versions as well Usage There are no settings for the script. Simply select the required verts in your mesh and run the script. Here&#8217;s an example [...]]]></description>
			<content:encoded><![CDATA[<div class="fields"><div class="field"><h4>Downloadable Files</h4><ul><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/ProjectCursor.2.py' title='ProjectCursor.2'>ProjectCursor.2</a>&nbsp;<span title="downloads">(196)</span></li><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/ProjectCursor.1.py' title='ProjectCursor.1'>ProjectCursor.1</a>&nbsp;<span title="downloads">(152)</span></li></ul></div><div class="claro"></div></div><p>This script places the cursor at the intersection of the vertex normals of selected vertexes.</p>
<hr />
<h3>Requirements</h3>
<p>This script is written for blender 2.45 but should work with older versions as well</p>
<hr />
<h3>Usage</h3>
<p>There are no settings for the script.</p>
<p>Simply select the required verts in your mesh and run the script.</p>
<p><strong>Here&#8217;s an example of what I use the script for</strong></p>
<p><strong> </strong>Here we have part of a uvsphere and neither the object centre nor the cursor are where the centre of the full sphere would be.</p>
<p><a href="http://www.macouno.com/wp-content/uploads/2010/03/project-1.jpg"><img class="alignnone size-full wp-image-536" title="project-1" src="http://www.macouno.com/wp-content/uploads/2010/03/project-1.jpg" alt="" width="500" height="250" /></a></p>
<p>Now say that you wanted to move or resize this mesh as if it was a full sphere.</p>
<p>You&#8217;d normally put the cursor at the centre of the sphere, but this won&#8217;t work here.</p>
<p>So we select a bunch of verts and run the script&#8230; <strong>see where the cursor ends up?</strong></p>
<p><a href="http://www.macouno.com/wp-content/uploads/2010/03/project-2.jpg"><img class="alignnone size-full wp-image-537" title="project-2" src="http://www.macouno.com/wp-content/uploads/2010/03/project-2.jpg" alt="" width="500" height="250" /></a></p>
<p>Now the cursor is where it would be if we set it to the centre if the sphere were full!</p>
<p><strong>Remember that it uses vertex normals&#8230; so in this case&#8230; you don&#8217;t want to select the outer edge of the mesh&#8230; cause we really don&#8217;t know where those vert normals point.</strong></p>
<p><strong> </strong></p>
<hr /><strong> </strong></p>
<h3>That&#8217;s all</h3>
<p>Nothing much to it&#8230; but usefull. Enjoy&#8230;<br />
Dolf</p>
<div class="gallery"><ul><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/project-2.jpg" class="thumb" title="project-2" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/project-2-100x50.jpg" alt="project-2" title="project-2" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/project-1.jpg" class="thumb" title="project-1" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/project-1-100x50.jpg" alt="project-1" title="project-1" /></a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.macouno.com/2010/03/17/project-cursor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pivot constraint</title>
		<link>http://www.macouno.com/2010/03/17/pivot-constraint/</link>
		<comments>http://www.macouno.com/2010/03/17/pivot-constraint/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 20:46:12 +0000</pubDate>
		<dc:creator>macouno</dc:creator>
				<category><![CDATA[Blender 2.4x]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[Python script]]></category>

		<guid isPermaLink="false">http://www.macouno.com/?p=525</guid>
		<description><![CDATA[Downloadable FilesPivotConstraint.1&#160;(200)PivotConstraintExample&#160;(232)This script helps you to use a bone in an armature as an animated pivot point. It can be very helpfull in making things like a heel/toe rig for a foot. Requirements This script is written for blender versions newer than 2.45 Setting up your rig for the script You will basicly need 2 bones for [...]]]></description>
			<content:encoded><![CDATA[<div class="fields"><div class="field"><h4>Downloadable Files</h4><ul><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/PivotConstraint.1.py' title='PivotConstraint.1'>PivotConstraint.1</a>&nbsp;<span title="downloads">(200)</span></li><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/PivotConstraintExample.blend' title='PivotConstraintExample'>PivotConstraintExample</a>&nbsp;<span title="downloads">(232)</span></li></ul></div><div class="claro"></div></div><p>This script helps you to use a bone in an armature as an animated pivot point.</p>
<p>It can be very helpfull in making things like a heel/toe rig for a foot.</p>
<hr />
<h3>Requirements</h3>
<p>This script is written for blender versions newer than 2.45</p>
<hr />
<h3>Setting up your rig for the script</h3>
<p>You will basicly need 2 bones for the script to work.</p>
<p>1. the bone that the script is assigned to (this bone is affected by the script)</p>
<p>2. the pivot bone that manipulates bone nr 1.</p>
<p>You want both bones to be in exactly the same location/rotation in edit mode when you create them.</p>
<p>In the example file I named the pivot bone <strong>pivot </strong>and the bone that the script is assigned to <strong>foot</strong>.</p>
<p>I also made a parent bone for the both of them called location, that way you can move them together, but it&#8217;s not nessecary for the script to work.</p>
<p><a href="http://www.macouno.com/wp-content/uploads/2010/03/pivotrig.jpg"><img class="alignnone size-full wp-image-531" title="pivotrig" src="http://www.macouno.com/wp-content/uploads/2010/03/pivotrig.jpg" alt="" width="320" height="240" /></a></p>
<hr />
<h3>Assigning the script</h3>
<p>You have to have the script open in blender to be able to assign it.</p>
<p>So open it in a text editor window.</p>
<p>Now you can select the bone you want to assign the script to andOadd a script constraint.</p>
<p>The script should be available in the script dropdown box.</p>
<p>Set the spaces to <strong>local space </strong>and assign the pivot bone as the target.</p>
<p><a href="http://www.macouno.com/wp-content/uploads/2010/03/pivotconstraint.jpg"><img class="alignnone size-full wp-image-528" title="pivotconstraint" src="http://www.macouno.com/wp-content/uploads/2010/03/pivotconstraint.jpg" alt="" width="279" height="201" /></a></p>
<hr />
<h3>Options</h3>
<p>If you click on <strong>Options </strong>you will get a small popup with one setting.</p>
<p>If you have <strong>Only location</strong> selected the rotation of the bone that the script is assigned to isn&#8217;t affected by the script.</p>
<p>Normally you want the location and rotation both to be affected, but I thought it might be nice to have the option.</p>
<p>I didn&#8217;t add an <strong>Only rotation</strong> option because then it would just be a copy rotation constraint, and we already have one of those.</p>
<p><a href="http://www.macouno.com/wp-content/uploads/2010/03/pivotoptions.jpg"><img class="alignnone size-full wp-image-530" title="pivotoptions" src="http://www.macouno.com/wp-content/uploads/2010/03/pivotoptions.jpg" alt="" width="215" height="48" /></a></p>
<hr />
<h3>Animating with the pivot setup</h3>
<p>The idea is that now you have your pivot bone, you don&#8217;t need to animate/rotate/move your foot bone anymore. All you use is the pivot bone, and/or the parent(s) of the foot/pivot bones.</p>
<p>For a step simpy think like this&#8230; move the location bone (the parent) to where the ground is, then move the pivot to the point the foot rotates around&#8230; then rotate the pivot to the angle you need&#8230; voila.</p>
<p>If you&#8217;re not carefull you can make some really strange things happen, but I purposely left everything simple (script wise). This way it&#8217;s up to you to make it usefull ;)</p>
<hr />
<h3>That&#8217;s all</h3>
<p>It can be a bit tricky to get the hang of this functionality, but I&#8217;m sure it&#8217;ll prove usefull to some.</p>
<p>enjoy<br />
Dolf</p>
<div class="gallery"><ul><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/pivotconstraint.jpg" class="thumb" title="pivotconstraint" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/pivotconstraint-100x72.jpg" alt="pivotconstraint" title="pivotconstraint" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/pivotoptions.jpg" class="thumb" title="pivotoptions" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/pivotoptions-100x22.jpg" alt="pivotoptions" title="pivotoptions" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/pivotrig.jpg" class="thumb" title="pivotrig" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/pivotrig-100x75.jpg" alt="pivotrig" title="pivotrig" /></a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.macouno.com/2010/03/17/pivot-constraint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Normal smooth</title>
		<link>http://www.macouno.com/2010/03/17/normal-smooth/</link>
		<comments>http://www.macouno.com/2010/03/17/normal-smooth/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 20:26:17 +0000</pubDate>
		<dc:creator>macouno</dc:creator>
				<category><![CDATA[Blender 2.4x]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[Python script]]></category>

		<guid isPermaLink="false">http://www.macouno.com/?p=491</guid>
		<description><![CDATA[Downloadable FilesNormalSmooth.6&#160;(300)NormalSmooth.5&#160;(174)NormalSmooth.1&#160;(161)This script is an alternative to the mesh smooth function in blender. The mesh smooth function in blender uses only vertex position.This script uses vertex normals, which is why it&#8217;s called normal smoothing.In version 6 the code has been cleaned (versions 2, 3, and 4 were never released). The script now no longer needs you to [...]]]></description>
			<content:encoded><![CDATA[<div class="fields"><div class="field"><h4>Downloadable Files</h4><ul><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/NormalSmooth.6.py' title='NormalSmooth.6'>NormalSmooth.6</a>&nbsp;<span title="downloads">(300)</span></li><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/NormalSmooth.5.py' title='NormalSmooth.5'>NormalSmooth.5</a>&nbsp;<span title="downloads">(174)</span></li><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/NormalSmooth.1.py' title='NormalSmooth.1'>NormalSmooth.1</a>&nbsp;<span title="downloads">(161)</span></li></ul></div><div class="claro"></div></div><p>This script is an alternative to the mesh smooth function in blender. The mesh smooth function in blender uses only vertex position.This script uses vertex normals, which is why it&#8217;s called normal smoothing.In version 6 the code has been cleaned (versions 2, 3, and 4 were never released). The script now <strong>no longer</strong> needs you to have part of the mesh selected, and part unselected. So you can run it on an entire mesh, but it still works best for a few edge loops/verts. I also solved the cases in which it made &#8216;flat surfaces&#8217; &#8220;wavy&#8221;. You may need more iterations than in older versions.</p>
<hr />
<h3>Requirements</h3>
<p>This script is written for blender 2.45 but should work with older versions as well</p>
<hr />
<h3>Example meshes the script was used on (parts of them)</h3>
<p><a href="http://www.macouno.com/wp-content/uploads/2010/03/smooth-example.jpg"><img class="alignnone size-full wp-image-497" title="smooth-example" src="http://www.macouno.com/wp-content/uploads/2010/03/smooth-example.jpg" alt="" width="455" height="277" /></a></p>
<hr />
<h3>Comparison</h3>
<p>Before we get going&#8230;. Here is a comparison between blender&#8217;s internal function and the script.</p>
<p><a href="http://www.macouno.com/wp-content/uploads/2010/03/smooth-comparison.jpg"><img class="alignnone size-full wp-image-496" title="smooth-comparison" src="http://www.macouno.com/wp-content/uploads/2010/03/smooth-comparison.jpg" alt="" width="280" height="300" /></a></p>
<hr />
<h3>Settings</h3>
<p>There is only one setting which shows up in a popup when you run the script.</p>
<p><a href="http://www.macouno.com/wp-content/uploads/2010/03/smooth-iterations.gif"><img class="alignnone size-full wp-image-499" title="smooth-iterations" src="http://www.macouno.com/wp-content/uploads/2010/03/smooth-iterations.gif" alt="" width="167" height="30" /></a></p>
<p>The number of iterations is the total ammount of times the script will run one after the other&#8230; normally a value of one or two is enough.</p>
<hr />
<h3>Usage</h3>
<p>Select the verticles you want smoothed and run the script.</p>
<p>Pre script example:</p>
<p><a href="http://www.macouno.com/wp-content/uploads/2010/03/smooth-select.jpg"><img class="alignnone size-full wp-image-501" title="smooth-select" src="http://www.macouno.com/wp-content/uploads/2010/03/smooth-select.jpg" alt="" width="455" height="277" /></a></p>
<p>Post script example:</p>
<p><a href="http://www.macouno.com/wp-content/uploads/2010/03/smooth-result.jpg"><img class="alignnone size-full wp-image-500" title="smooth-result" src="http://www.macouno.com/wp-content/uploads/2010/03/smooth-result.jpg" alt="" width="455" height="277" /></a></p>
<hr />
<h3>That&#8217;s it</h3>
<p>That&#8217;s all for now&#8230; I hope someone can help solve the large area issue&#8230; untill then it&#8217;s already quite usefull to me ;)<br />
Dolf</p>
<div class="gallery"><ul><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/smooth-select.jpg" class="thumb" title="smooth-select" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/smooth-select-100x60.jpg" alt="smooth-select" title="smooth-select" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/smooth-result.jpg" class="thumb" title="smooth-result" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/smooth-result-100x60.jpg" alt="smooth-result" title="smooth-result" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/smooth-iterations.gif" class="thumb" title="smooth-iterations" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/smooth-iterations-99x17.gif" alt="smooth-iterations" title="smooth-iterations" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/smooth-example.jpg" class="thumb" title="smooth-example" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/smooth-example-100x60.jpg" alt="smooth-example" title="smooth-example" /></a></li><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/smooth-comparison.jpg" class="thumb" title="smooth-comparison" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/smooth-comparison-93x100.jpg" alt="smooth-comparison" title="smooth-comparison" /></a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.macouno.com/2010/03/17/normal-smooth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ma Self</title>
		<link>http://www.macouno.com/2010/03/17/ma-self/</link>
		<comments>http://www.macouno.com/2010/03/17/ma-self/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 20:19:45 +0000</pubDate>
		<dc:creator>macouno</dc:creator>
				<category><![CDATA[Blender 2.4x]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Blender]]></category>
		<category><![CDATA[Python script]]></category>

		<guid isPermaLink="false">http://www.macouno.com/?p=479</guid>
		<description><![CDATA[Downloadable FilesMaSelf.0.1&#160;(194)This script creates vertex colours based on the angle between the vertex&#8217;s normal and the edges connected to it. It is written as a faster alternative to the Ma Baker script. It is also a lot like Campbell Barton&#8216;s Self shadow script. Hence the name. The big difference is that this script has no [...]]]></description>
			<content:encoded><![CDATA[<div class="fields"><div class="field"><h4>Downloadable Files</h4><ul><li class="local_download"><a href='http://www.macouno.com/wp-content/uploads/2010/03/MaSelf.0.1.py' title='MaSelf.0.1'>MaSelf.0.1</a>&nbsp;<span title="downloads">(194)</span></li></ul></div><div class="claro"></div></div><p>This script creates vertex colours based on the angle between the vertex&#8217;s normal and the edges connected to it.</p>
<p>It is written as a faster alternative to the Ma Baker script.</p>
<p>It is also a lot like <span class="link">Campbell Barton</span>&#8216;s Self shadow script.</p>
<p>Hence the name.</p>
<p>The big difference is that this script has no settings, and thus should be really fast.<a class="link" href="http://www.alienhelpdesk.com/files/download.php?file=MaSelf.0.1.py"><br />
</a></p>
<hr />
<h3>Requirements</h3>
<p>This script is written for blender 2.42</p>
<hr />
<h3>Running the script</h3>
<p>There are no settings for this script and there is no interface! It is written to be quick and simple. If you have no mesh selected it will give an error message. Loose verts and edges will be ignored!</p>
<hr />
<h3>A nice comparison between the three scripts</h3>
<p><a href="http://www.macouno.com/wp-content/uploads/2010/03/selfma_vs_selfshadow_vs_mabaker.jpg"><img class="alignnone size-full wp-image-481" title="selfma_vs_selfshadow_vs_mabaker" src="http://www.macouno.com/wp-content/uploads/2010/03/selfma_vs_selfshadow_vs_mabaker.jpg" alt="" width="640" height="240" /></a></p>
<p>The times it takes for the math part to run in the scripts on the suzanne model on my system (1ghz amd 768MB ram):</p>
<ul>
<li><strong>MaBaker:</strong> 0.5991s</li>
<li><strong>SelfShadow:</strong> 0.1182s</li>
<li><strong>MaSelf:</strong> 0.0944s</li>
</ul>
<hr />
<h3>That&#8217;s all</h3>
<p>Enjoy<br />
Dolf</p>
<div class="gallery"><ul><li><a href="http://www.macouno.com/wp-content/uploads/2010/03/selfma_vs_selfshadow_vs_mabaker.jpg" class="thumb" title="selfma_vs_selfshadow_vs_mabaker" rel="lightbox[thumbs]"><img src="http://www.macouno.com/wp-content/uploads/2010/03/selfma_vs_selfshadow_vs_mabaker-100x37.jpg" alt="selfma_vs_selfshadow_vs_mabaker" title="selfma_vs_selfshadow_vs_mabaker" /></a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.macouno.com/2010/03/17/ma-self/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

