<?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>Ben McChesney&#039;s Blog &#187; Motion</title>
	<atom:link href="http://www.benmcchesney.com/blog/category/motion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benmcchesney.com/blog</link>
	<description>Making stuff and sharing it.</description>
	<lastBuildDate>Mon, 19 Dec 2011 04:37:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Loading a Collada file in Away3D</title>
		<link>http://www.benmcchesney.com/blog/2010/08/loading-a-collada-file-in-away3d/</link>
		<comments>http://www.benmcchesney.com/blog/2010/08/loading-a-collada-file-in-away3d/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 06:05:32 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Interactive]]></category>
		<category><![CDATA[Motion]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[action]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[cinema4d]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.benmcchesney.com/blog/?p=302</guid>
		<description><![CDATA[Recently I had been doing a little more work in Away3D and I needed to use an object that was more complex than a preset primitive. After looking through some of the Away3D examples I  tried bringing in my own model from Cinema4D. I quickly found that setting up and exporting your file correctly is ...]]></description>
			<content:encoded><![CDATA[<p>Recently I had been doing a little more work in Away3D and I needed to use an object that was more complex than a preset primitive. After looking through some of the Away3D examples I  tried bringing in my own model from Cinema4D. I quickly found that setting up and exporting your file correctly is half the battle. In this tutorial I&#8217;ll explain how to create a primitive in cinema4D export it correctly for Away3D inside flash. Source code is available at the bottom. Use the right/left arrows to switch models and the up/down to change the texture. Below is the final product:</p>
<p><span id="more-302"></span></p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_ColladaExample_832007580"
			class="flashmovie"
			width="800"
			height="600">
	<param name="movie" value="http://www.benmcchesney.com/blog/ColladaExample.swf" />
	<param name="play" value="false" />
	<param name="scale" value="noscale" />
	<param name="allowfullscreen" value="false" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.benmcchesney.com/blog/ColladaExample.swf"
			name="fm_ColladaExample_832007580"
			width="800"
			height="600">
		<param name="play" value="false" />
		<param name="scale" value="noscale" />
		<param name="allowfullscreen" value="false" />
	<!--<![endif]-->
		

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>It all starts in Cinema4D. I&#8217;m using Cinema4D R11. Create a new project and start with a tube primitive.  Below are some of the parameters I used</p>
<div id="attachment_304" class="wp-caption alignnone" style="width: 353px"><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/01_tut_sphereProperties.png"><img class="size-full wp-image-304" title="01_tut_sphereProperties" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/01_tut_sphereProperties.png" alt="" width="343" height="331" /></a><p class="wp-caption-text">Tube Properties</p></div>
<p>Then select the primtive and hit the &#8220;C&#8221; button. This will convert it to a polygon object. Your object manager should now look like this:</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/03_tut_sphereObject.png"><img class="alignnone size-full wp-image-306" title="03_tut_sphereObject" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/03_tut_sphereObject.png" alt="" width="415" height="84" /></a></p>
<p>Now we will add a new material. I downloaded a metal texture off of <a href="http://cgtextures.com">CG Textures </a> and reduced it&#8217;s size to 256 x 256.  In a 3d system inside flash the two biggest things that can quickly bring your project down are the number of vertices in your model and the dimensions of your texture. Some general numbers are that a scene can support around 6,000 vertices give or take. So it&#8217;s great for simple scenes but for anything larger you might want to try another 3d environment like <a href="http://unity3d.com">unity3d.</a></p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/05_tut_textureSettings.png"><img class="alignnone size-full wp-image-308" title="05_tut_textureSettings" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/05_tut_textureSettings.png" alt="" width="518" height="529" /></a></p>
<p>and when you get prompted to copy a version of your texture file to the textures folder hit yes, it will save some hassle later with the file path. Also be sure to rename the texture to something recognizable like &#8220;RingMat&#8221; so that it can be identified later.</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/04_tut_copyPath.png"><img class="alignnone size-full wp-image-307" title="04_tut_copyPath" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/04_tut_copyPath.png" alt="" width="500" height="236" /></a></p>
<p>Now switch over to vertices mode and hit apple + a to select all the points. Then select functions &gt; triangulate. In Cinema4D will default to drawing quads or units of 4 points. Inside Away3D it draws with triangles so we need to make this adjustment.</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/06_tut_triangulate.png"><img class="alignnone size-full wp-image-309" title="06_tut_triangulate" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/06_tut_triangulate.png" alt="" width="701" height="536" /></a>Now we switch over to BodyPaint UV Edit where we can quickly adjust the UV Map so it doesn&#8217;t look quite so hideous. If you are new to UV mapping and 3d in general UV mapping allows you to customize and control how your 2d texture appears on geometry and shapes in 3d. UV Mapping is an art in itself and can take weeks to do perfectly. For this exampl and for other simple tasks the UV Editor inside Cinema4D can take a lot of the work out of it.</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/07_tut_bpUVEdit.png"><img class="alignnone size-full wp-image-310" title="07_tut_bpUVEdit" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/07_tut_bpUVEdit.png" alt="" width="183" height="423" /></a></p>
<p>Now select the UV Mapping wizard.</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/08_tut_iconWizard.png"><img class="alignnone size-full wp-image-311" title="08_tut_iconWizard" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/08_tut_iconWizard.png" alt="" width="660" height="107" /></a></p>
<p>Now just have to go through all the steps of the wizard.</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/09_tut_uvwizard_object.png"><img class="alignnone size-full wp-image-312" title="09_tut_uvwizard_object" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/09_tut_uvwizard_object.png" alt="" width="460" height="396" /></a></p>
<p>We will be using the object option.</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/10_tut_uvwizard_cubic.png"><img class="alignnone size-full wp-image-313" title="10_tut_uvwizard_cubic" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/10_tut_uvwizard_cubic.png" alt="" width="460" height="396" /></a></p>
<p>There are multiple ways you can map coordinates to a texture. Cubic Mapping will work fine in this case. Cubic maps generally make simpler uv coordinate systems. Angle mapping by default will have a collection of smaller more precise parts.</p>
<p><img class="alignnone size-full wp-image-314" title="11_tut_uvwizard_channels" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/11_tut_uvwizard_channels.png" alt="" width="460" height="396" /></p>
<p>Now select the color channel until it has a &#8211; through it&#8217;s check box. Otherwise the UV Wizard will overwrite the texture that we already set. If we had a more complicated texture scheme we&#8217;d want to map other channels too. But for now color will suffice. Now switch over to polygons mode. Hit cmd + a to select all the polygons. If the selected polygons are orange that means their normals are facing the correct direction.</p>
<p>For the non initiated when a 3d renderer draws all the vertices it draws them in order and this order determines which way it faces. The flat solid part drawn between them is also called a face. A 3d engine does not render faces that do not have their normals facing the camera. So they save on resources by only rendering half of what we need too.</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/12_tut_normals.png"><img class="alignnone size-full wp-image-315" title="12_tut_normals" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/12_tut_normals.png" alt="" width="734" height="517" /></a></p>
<p>Now the good part: we export! In this screenshot is also a rendering of what the new UV Map looks like.</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/13_tut_export.png"><img class="alignnone size-full wp-image-316" title="13_tut_export" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/13_tut_export.png" alt="" width="675" height="491" /></a></p>
<p>Export the file in into your project. You will need to also copy the /tex folder into wherever you export your .dae ( collada ) file. This is because inside the Collada file it specifies a URL to it&#8217;s default material. Open up the Collada file in your preferred text editor. TextMate or BBEdit are popular choices: I&#8217;ll be using BBEdit.</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/14_tut_colladaFile_initFrom.png"><img class="alignnone size-full wp-image-317" title="14_tut_colladaFile_initFrom" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/14_tut_colladaFile_initFrom.png" alt="" width="508" height="162" /></a></p>
<p>A Collada file is basically a large XML File with specific nodes for a 3d scene including vertices, UV Coordinates, and texture parameters. Inside &lt;libraray_image&gt; there is the &lt;init_from&gt; that specifies the URL of a UV texture. If you are using Cinema4D 11.5 it will provide an absolute url but you can change it to relative like the screenshot above.</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/15_tut_colladaLibrary.png"><img class="alignnone size-full wp-image-318" title="15_tut_colladaLibrary" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/15_tut_colladaLibrary.png" alt="" width="564" height="188" /></a></p>
<p>Inside the &lt;library_materials&gt; you can spot the texture we named inside Cinema4D. We will use &#8220;ID3&#8243; inside Away3D to get the material info we need.</p>
<p>Now onto the code. The code is written with a .fla and a document class but it will work as pure actionscript. There is nothing linked in the library or any other dependencies. When I use Away3D in a project I usually place all the 3d information inside a seperate class but here the document class should be fine. I always make a createAway3D function()</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/16_tut_away3DCreate.png"><img class="alignnone size-full wp-image-319" title="16_tut_away3DCreate" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/16_tut_away3DCreate.png" alt="" width="870" height="348" /></a></p>
<p>In this function we create a test object to make sure our scene renders. Away3D is composed of a few basic parts. First we have the View3D: think of this as a sprite that will hold and render your 3d scene. The Camera is how the scene will be viewed: it&#8217;s the window to your 3d world. Views are also comprised of scenes which is a holder for all of your 3D Objects. The last component of a view is the renderer: this is what will actually rasterize your 3d scene into a 2d image every frame.  In Away3D when you create an 3d Object you pass in a separate object with all the properties that you want initialized. The x + y properties dictate where the center of the scene is. The view will automatically be full stage size.</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/17_tut_loadCollada.png"><img class="alignnone size-full wp-image-320" title="17_tut_loadCollada" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/17_tut_loadCollada.png" alt="" width="849" height="248" /></a></p>
<p>To call the collada file you create a new Loader3D class and use the static Collada.load() method. In the document class you can see the onLoaderSuccess Method but it&#8217;s fairly straight forward. In a collada file we have to access the material through the MaterialData class. Here we plug in the ID3 that was identified in the Collada .dae file.</p>
<p>One last concept that I used in this code is Bitwise operations. Bitwise operations are quicker ways of doing simple operations. There are a whole slew of bitwise operations that can be quickly googled for. This bitwise operation will cycle through all the items in the array and when it reaches the end will return to zero.</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/18_tut_bitwise.png"><img class="alignnone size-full wp-image-321" title="18_tut_bitwise" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/08/18_tut_bitwise.png" alt="" width="819" height="362" /></a></p>
<p>That&#8217;s it! Full Collada model support. If you are having trouble seeing your model make sure that your normals are correct and try adjust the size drastically. Sometimes my models come out with .25 , 5 , or 90 for the scale. It&#8217;s all relative. The source code is <a href="http://benmcchesney.com/blog/Collada_Tutorial.zip">available here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmcchesney.com/blog/2010/08/loading-a-collada-file-in-away3d/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordDNA: Twitter + Flickr + Away3D</title>
		<link>http://www.benmcchesney.com/blog/2010/03/worddna-twitter-flicker-away3d/</link>
		<comments>http://www.benmcchesney.com/blog/2010/03/worddna-twitter-flicker-away3d/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 15:46:52 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Interactive]]></category>
		<category><![CDATA[Motion]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[away]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[camera movement]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.benmcchesney.com/blog/?p=242</guid>
		<description><![CDATA[Source Code is available here Recently I had been wanting to do some more interactive 3D type of projects. I wanted to create something beyond just a pre-rendered sequence that simulated camera movement. I have previously been using papervision3D but wanted to expand my knowledge and check out the competition. Papervision X has been long ...]]></description>
			<content:encoded><![CDATA[<p>Source Code is <a href="http://benmcchesney.com/blog/wordDNA.zip"> available here </a></p>
<p>Recently I had been wanting to do some more interactive 3D type of projects. I wanted to create something beyond just a pre-rendered sequence that simulated camera movement. I have previously been using <a href="http://www.papervision3d.org"> papervision3D</a> but wanted to expand my knowledge and check out the competition. Papervision X has been long expected but with Ralph Hauwert <a href="http://www.unitZeroOne.com"> Unit Zero One</a> leaving the team I thought it was time to move on. Away3D was very highly recommended by my colleague <a href="http://www.kylebeikirch.com"> Kyle Beikirch</a> for it&#8217;s more frequent updates to SVN and ease of interactivity. Since I was exactly sure what would be interactive when I started: I gave it a shot.</p>
<p><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/03/flitter_screenshot.png"><img class="alignnone size-full wp-image-250" title="flitter_screenshot" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/03/flitter_screenshot.png" alt="Build Animation of wordDNA" width="806" height="702" /></a></p>
<p><span id="more-242"></span></p>
<p>In what I did there wasn&#8217;t really a huge difference between the images but I did like how Away3D uses associative arrays much like <a href="http://www.greensock.com/">Greensock Tweening platform </a> instead of traditional constructors. If I didn&#8217;t want to pre-render as many assets as possible I would need an internet source to grab them from. I thought that combining the antics of twitter with somewhat related photos could yield some interesting results. At first I grabbed XML from the twitter time line, but I wanted to have more control over my results. I used the Tweetr Twitter API, and got a lot of code inspiration from Lindsey Burtner&#8217;s <a href="http://lindsayburtner.com/blog/?p=176" > Word Feeder</a>. Lindsey helped me last year when I first began mashing together the last.fm API, and proved an invaluable resource, so props to her.</p>
<p>Let&#8217;s dive into some of the key functions that make this work:</p>
<p>Once the Flickr and Twitter data has been collected we then insert it into a 2D MovieClip and prepare it for 3D.</p>
<div id="attachment_248" class="wp-caption alignnone" style="width: 895px"><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/03/prepareBitmap.png"><img class="size-full wp-image-248" title="prepareBitmap" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/03/prepareBitmap.png" alt="Dynamic Draw of Movie Clip to Bitmap Material" width="885" height="458" /></a><p class="wp-caption-text">Dynamic Draw of Movie Clip to Bitmap Material</p></div>
<p>We prepare it for 3D by simple flattening it with transparency.</p>
<div id="attachment_246" class="wp-caption alignnone" style="width: 858px"><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/03/makeBitmapFrom.png"><img class="size-full wp-image-246" title="makeBitmapFrom" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/03/makeBitmapFrom.png" alt="Document Class creates Bitmap Material" width="848" height="185" /></a><p class="wp-caption-text">Document Class creates Bitmap Material</p></div>
<p>I wanted to organize the planes in  a Helix and found <ahref="http://theflashblog.com/?p=306" >this post </a> from Lee Brimelow&#8217;s blog and modified it for my needs. The by rotating the scene 360 degrees we get this cool spin effect for the zoom out.</p>
<div id="attachment_247" class="wp-caption alignnone" style="width: 810px"><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/03/makeHelix.png"><img class="size-full wp-image-247" title="makeHelix" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/03/makeHelix.png" alt="Make a Helix" width="800" height="604" /></a><p class="wp-caption-text">Make a Double Helix our of Shapes</p></div>
<p>Now we need a way to navigate between planes, at first it was very linear but that got boring quickly. So I added in a new random index each movement to make it feel more exploratory. Adding a mouse event to planes would have been the next logical step to give users some control.</p>
<div id="attachment_249" class="wp-caption alignnone" style="width: 752px"><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/03/randomIndex.png"><img class="size-full wp-image-249" title="randomIndex" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/03/randomIndex.png" alt="Generating a Random Index from an Array" width="742" height="339" /></a><p class="wp-caption-text">Generating a Random Index from an Array</p></div>
<p>Now the fun part: the camera. First we get the distance to to the next target and tweak it so that that camera movement is smooth for all distances.</p>
<p>The Camera has two tweens:</p>
<p>1) To move away from the plane randomly around it in 3D space</p>
<p>2) To move towards the new target</p>
<p>We change the focus of the camera by tweening an empty displayObject3D this would be our &#8220;null object&#8221; in 3d or After Effects.</p>
<p>The bezier gives the tween a nice smooth and organic feel, something that is lacking with a lot of fully 3d sites.</p>
<p>The newY just calculates which direction the camera should swoop in depending if the target is above or below it.</p>
<div id="attachment_244" class="wp-caption alignnone" style="width: 770px"><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/03/camera_1.png"><img class="size-full wp-image-244" title="camera_1" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/03/camera_1.png" alt="Camera AS3 Text" width="760" height="405" /></a><p class="wp-caption-text">Moving the Camera</p></div>
<p>We save the initial values of our current target so that we can return it to it&#8217;s rightful place the user is done looking at it. In our tweenCameraDone() function we save the coordinates of the camera in case we need to reset it.</p>
<div id="attachment_245" class="wp-caption alignnone" style="width: 890px"><a href="http://www.benmcchesney.com/blog/wp-content/uploads/2010/03/camera_2.png"><img class="size-full wp-image-245" title="camera_2" src="http://www.benmcchesney.com/blog/wp-content/uploads/2010/03/camera_2.png" alt="Moving the Camera pt 2" width="880" height="322" /></a><p class="wp-caption-text">Moving the Camera pt 2</p></div>
<p>That&#8217;s it! I had fun making it and mixing interactivity and 3d Camera. Play with it and let me know what you come up with!</p>
<p>Source Code is <a href="http://benmcchesney.com/blog/wordDNA.zip"> available here </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmcchesney.com/blog/2010/03/worddna-twitter-flicker-away3d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cinema4D Projectionman Tutorial</title>
		<link>http://www.benmcchesney.com/blog/2009/04/cinema4d-projectionman-tutorial/</link>
		<comments>http://www.benmcchesney.com/blog/2009/04/cinema4d-projectionman-tutorial/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 23:44:48 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Motion]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[cinema4d]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[photograph]]></category>
		<category><![CDATA[projection]]></category>
		<category><![CDATA[projectionman]]></category>
		<category><![CDATA[r11]]></category>

		<guid isPermaLink="false">http://www.benmcchesney.com/blog/?p=99</guid>
		<description><![CDATA[I found a lack of resources available to learn cinema 4D&#8217;s new camera mapping module, so I played around with it and created a tutorial so that others could see it power and ease of use. 1.Take a picture of a hallway. a.Hallways are a good starting point for camera mapping, simple geometry to project ...]]></description>
			<content:encoded><![CDATA[<p>I found a lack of resources available to learn cinema 4D&#8217;s new camera mapping module, so I played around with it and created a tutorial so that others could see it power and ease of use.</p>
<p>1.Take a picture of a hallway.<br />
a.Hallways are a good starting point for camera mapping, simple geometry to<br />
project onto itʼs essentially 5 cubes: ﬂoor, ceiling, left wall, right wall, and the end<br />
of the hallway.</p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 44.png" alt="" width="513" height="345" /></p>
<p><a href="hallway.mov">Rendered QT Movie</a></p>
<p><a href="projectionMan_sourceFiles.zip">Project Source Files</a></p>
<p><span id="more-99"></span></p>
<p>2.I ran some adjustment layers to stylize the photo a little bit</p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 2.png" alt="" /></p>
<p>b.ﬁrst I ran a black and white ﬁlter over it.</p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 3.png" alt="" /></p>
<p>c.Then a hue/saturation layer to make it seem a little darker and creepier, I turned the<br />
opacity on the adjustment layer down to get a more subtle effect than just colorizing<br />
the layer.</p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 4.png" alt="" /></p>
<p>d.a simple curves layer to bring out the shadows just a little more<br />
e.duplicate the original photo and set the blending mode to overlay, this produces a<br />
night effect for what weʼre going for a creepy hallway.</p>
<p>2.Now that we are done adjusting the photo save a of the photograph without layers<br />
and bring that into photoshop.<br />
b.split the photograph into layers based on the ﬁve peices of geometry that we will<br />
be projecting this on, naming layers is important once we get into cinema.<br />
ProjectionMan has the ability to read alpha channels so masking will work just<br />
ﬁne. Save this PSD ﬁle with layers to something you can remember like<br />
“hallway_brokenup.psd”</p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 5.png" alt="" width="571" height="574" /></p>
<p>3.Now into cinema4D. The ﬁrst thing weʼre going to do is add a doodle object you can<br />
do this via the menu tools &gt; doodle &gt; add Doodle Frame. Under load bitmap under<br />
Doodle Object properties &gt; then load the PSD broken up into layers.</p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 7.png" alt="" /></p>
<p>4.Add a visibility tag under cinema4D tags and lower the visibility a little bit so you can<br />
see the 3d viewport.</p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 8.png" alt="" /></p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 9.png" alt="" /></p>
<p>5.Alright now a little explanation as to how camera mapping works. Essentially you are<br />
using a stationary camera to “project” textures onto simplistic models, allowing you to<br />
do simple slow camera movements.</p>
<p>6.So we create ﬁve cubes and label them: ﬂoor, ceiling, right wall, left wall, and<br />
backpane. Rotate and scale each cube until they visually line up with the walls in the<br />
photograph. Donʼt worry about getting them exactly just yet weʼll have to do tweaking<br />
once we project textures. Create a camera and position it so that it lines up with the<br />
doodle object, this is camera weʼll be using to project textures. Here is the geometry I<br />
came up with just by eyeballing it.</p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 11.png" alt="" /></p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 12.png" alt="" /></p>
<p>7.Now for texturing, add the PSD ﬁle to the luminance channel.</p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 10.png" alt="" /></p>
<p>8.Apply the texture to any of the cubes and under projection select Camera Mapping<br />
and select the “CameraMap” camera we created. Under size X, Y click calculate and<br />
that will project the material at the correct resolution allowing for a little more<br />
movement and detail.</p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 13.png" alt="" /></p>
<p>9.Under window select “Projection Man” to bring up the new UI for Cinema R11. Drag<br />
each of the cubes under the PSD, under the Camera projection. Select the correct<br />
corresponding layers with their alpha channel IE backPane (cube) should be<br />
assigned backpane (PSD layer), etc etc. Weʼre loading the luminance and alpha<br />
channels for this example.</p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 15.png" alt="" width="693" height="322" /></p>
<p>10. Now render a scene so we can see how everything meshes together, if there are<br />
black streaks near the edges try readjusting the height, width, and depth of each<br />
cube, surprisingly I found that the depth of a cube has the biggest impact in getting<br />
those “stretch marks” around the edges to disappear. Because camera mapping<br />
rendering is so quick, this is actually a relatively painless to make lots of little<br />
adjustments and keep re-rendering the scene. Here is an example of stretching, this<br />
was ﬁxed by decreasing the width of the cube.</p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 16.png" alt="" /></p>
<p>11.Now for the animation:<br />
duplicate the camera mapping camera and rename it “moveCamera” or<br />
something similar. Now weʼre just going to animate this camera slightly over 180<br />
frames to get a nice smooth transition that still maintains that 3d feel.</p>
<p><img src="http://benmcchesney.com/cmMedia/Picture 14.png" alt="" /></p>
<p>12.You may experience more stretching as you animate forward, keep scaling and<br />
changing the geometry, but remember that camera mapping has itʼs limits and can<br />
only go so far with 1 photograph before quality starts to diminish.</p>
<p>13. Viola! Camera mapping using ProjectionMan and PSD layers.</p>
<p><a href="http://www.benmcchesney.com/blog/hallway.mov">Rendered QT Movie</a></p>
<p><a href="http://www.benmcchesney.com/blog/projectionMan_sourceFiles.zip">Project Source Files</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmcchesney.com/blog/2009/04/cinema4d-projectionman-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.benmcchesney.com/blog/hallway.mov" length="1799383" type="video/quicktime" />
		</item>
		<item>
		<title>Squid!</title>
		<link>http://www.benmcchesney.com/blog/2009/02/squid/</link>
		<comments>http://www.benmcchesney.com/blog/2009/02/squid/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 22:47:21 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Motion]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[underwater]]></category>

		<guid isPermaLink="false">http://www.benmcchesney.com/blog/?p=3</guid>
		<description><![CDATA[So my squid started out as &#8220;Design Tag&#8221;, something us RIT kids do when we have free time. I had always wanted to do something underwater with squids so in about 2 hours I quickly came up with this: Building off of the whole underwater theme I had also really wanted to build a diver ...]]></description>
			<content:encoded><![CDATA[<p>So my squid started out as &#8220;Design Tag&#8221;, something us RIT kids do when we have free time. I had always wanted to do something underwater with squids so in about 2 hours I quickly came up with this:</p>
<div id="attachment_6" class="wp-caption alignnone" style="width: 500px"><img class="size-full wp-image-6" title="squid" src="http://www.benmcchesney.com/blog/wp-content/uploads/2009/03/squid.jpg" alt="design tag squid" width="490" height="367" /><p class="wp-caption-text">design tag squid</p></div>
<p><span id="more-3"></span></p>
<p>Building off of the whole underwater theme I had also really wanted to build a diver that could go deep sea mining and I eventually came up with this:</p>
<div id="attachment_8" class="wp-caption alignnone" style="width: 570px"><img class="size-full wp-image-8" title="diver1" src="http://www.benmcchesney.com/blog/wp-content/uploads/2009/03/diver1.jpg" alt="Dive Dive!" width="560" height="420" /><p class="wp-caption-text">Dive Dive!</p></div>
<p>It made sense to bring these two things I love together: underwater deep sea mining + squids, so I quickly got together some style frames for overall look and feel.</p>
<div id="attachment_13" class="wp-caption alignnone" style="width: 570px"><img class="size-full wp-image-13" title="styleframe22" src="http://www.benmcchesney.com/blog/wp-content/uploads/2009/03/styleframe22.jpg" alt="styleframe" width="560" height="420" /><p class="wp-caption-text">styleframe</p></div>
<div id="attachment_14" class="wp-caption alignnone" style="width: 570px"><img class="size-full wp-image-14" title="styleframe31" src="http://www.benmcchesney.com/blog/wp-content/uploads/2009/03/styleframe31.jpg" alt="styleFrame" width="560" height="420" /><p class="wp-caption-text">styleFrame</p></div>
<div id="attachment_15" class="wp-caption alignnone" style="width: 570px"><img class="size-full wp-image-15" title="styleframe41" src="http://www.benmcchesney.com/blog/wp-content/uploads/2009/03/styleframe41.jpg" alt="Tentacles!" width="560" height="420" /><p class="wp-caption-text">Tentacles!</p></div>
<p>The next major changes I made involved the global lighting, I ended up using a combination of fog/depth with visible/volumetric lights to simulate the caustics of the ocean. I ended up having to to do some more complex rigging for the tentacle using XPRESSO in cinema 4d. I also applied sub-surface scattering to the tentacles to give it a different look and feel that changed from low-light situations.</p>
<p>The final render is on my portfolio site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benmcchesney.com/blog/2009/02/squid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

