  <?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>Chob &#187; 3D</title>
	<atom:link href="http://blog.chop.com.au/category/3d/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.chop.com.au</link>
	<description>Blog of Leon Wilson, a freelance flash developer based in Sydney, Australia.</description>
	<lastBuildDate>Sat, 21 Jan 2012 22:43:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>3D text intro</title>
		<link>http://blog.chop.com.au/2012/01/3d-text-intro/</link>
		<comments>http://blog.chop.com.au/2012/01/3d-text-intro/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 09:44:57 +0000</pubDate>
		<dc:creator>chop</dc:creator>
				<category><![CDATA[3D]]></category>

		<guid isPermaLink="false">http://blog.chop.com.au/?p=1311</guid>
		<description><![CDATA[This is an Animation test in Cinema 4D using MoGraph PolyFX and Randomiser. Im also using a shader by Matt Savard to create falloff in the shadow. (http://www.helloluxx.com/tag/distance-falloff/) You can view the clip on YouTube]]></description>
			<content:encoded><![CDATA[<p>This is an Animation test in Cinema 4D using MoGraph PolyFX and Randomiser. Im also using a shader by Matt Savard to create falloff in the shadow. (http://www.helloluxx.com/tag/distance-falloff/)</p>
<p><a href="http://youtu.be/oBg3rHuTCVQ">You can view the clip on YouTube</a></p>
<p><a href="http://blog.chop.com.au/wp-content/uploads/typoart0043.jpg"><img class="alignnone size-large wp-image-1321" title="typoart0043" src="http://blog.chop.com.au/wp-content/uploads/typoart0043-1024x576.jpg" alt="" /></a></p>
<p><a href="http://blog.chop.com.au/wp-content/uploads/typoart_35.png"><img class="alignnone size-large wp-image-1313" title="typoart_35" src="http://blog.chop.com.au/wp-content/uploads/typoart_35-1024x576.png" alt="" /></a><a href="http://blog.chop.com.au/wp-content/uploads/typoart_45.png"><img class="alignnone size-large wp-image-1314" title="typoart_45" src="http://blog.chop.com.au/wp-content/uploads/typoart_45-1024x576.png" alt="" /></a><a href="http://blog.chop.com.au/wp-content/uploads/typoart_70.png"><img class="alignnone size-large wp-image-1315" title="typoart_70" src="http://blog.chop.com.au/wp-content/uploads/typoart_70-1024x576.png" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chop.com.au/2012/01/3d-text-intro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Orbiting around a target 3D object &#8211; Away 3D</title>
		<link>http://blog.chop.com.au/2011/05/orbiting-around-a-target-3d-object-away-3d/</link>
		<comments>http://blog.chop.com.au/2011/05/orbiting-around-a-target-3d-object-away-3d/#comments</comments>
		<pubDate>Mon, 16 May 2011 01:52:59 +0000</pubDate>
		<dc:creator>chop</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Away 3D]]></category>

		<guid isPermaLink="false">http://blog.chop.com.au/?p=831</guid>
		<description><![CDATA[This is a AS3 script using Away 3D that orbits some 3d objects around a target object, if an alternate target object is selected, all orbiting objects and camera target Tween to their new coordinates. View Demo Source]]></description>
			<content:encoded><![CDATA[<p><a rel="shadowbox" href="http://blog.chop.com.au/flash/PositionOnSphere.html"><img class="alignnone size-full wp-image-881" title="orbitAroundTarget" src="http://blog.chop.com.au/wp-content/uploads/orbitAroundTarget.jpg" alt="" width="650" height="362" /></a></p>
<p>This is a AS3 script using Away 3D that orbits some 3d objects around a target object, if an alternate target object is selected, all orbiting objects and camera target Tween to their new coordinates.</p>
<p><a rel="shadowbox" href="http://blog.chop.com.au/flash/PositionOnSphere.html">View Demo</a></p>
<h3>Source</h3>
<pre class="brush: as3; title: ; notranslate">
package
{
		import away3d.cameras.Camera3D;
		import away3d.containers.ObjectContainer3D;
		import away3d.containers.Scene3D;
		import away3d.containers.View3D;
		import away3d.core.base.Face;
		import away3d.core.base.Mesh;
		import away3d.core.base.Object3D;
		import away3d.core.base.Vertex;
		import away3d.core.clip.RectangleClipping;
		import away3d.core.utils.Cast;
		import away3d.events.MouseEvent3D;
		import away3d.lights.DirectionalLight3D;
		import away3d.lights.PointLight3D;
		import away3d.loaders.Loader3D;
		import away3d.loaders.Swf;
		import away3d.materials.BitmapMaterial;
		import away3d.materials.ColorMaterial;
		import away3d.materials.ShadingColorMaterial;
		import away3d.materials.WireColorMaterial;
		import away3d.materials.WireframeMaterial;
		import away3d.primitives.Cone;
		import away3d.primitives.Cube;
		import away3d.primitives.LineSegment;
		import away3d.primitives.Plane;
		import away3d.primitives.Sphere;
		import away3d.primitives.TextField3D;
		import away3d.primitives.Trident;
		import away3d.sprites.MovieClipSprite;
		import away3d.sprites.Sprite3D;

		import com.greensock.TweenLite;

		import flash.display.Sprite;
		import flash.display.StageAlign;
		import flash.display.StageScaleMode;
		import flash.events.Event;
		import flash.geom.Vector3D;

		import wumedia.vector.VectorText;

	[SWF(backgroundColor='#333333', frameRate='60')]
	public class PositionOnSphere extends Sprite
	{
		private var _scene:Scene3D;
		private var _camera:Camera3D;
		private var _view:View3D;

		public var  _lookX:int = 300;
		public var _lookY:int = 200;
		public var _lookZ:int = 700;
		private var sphere:Sphere;
		private var sphereOrbit1:Sphere;
		private var sphereOrbit1Phi:Number;
		private var sphereOrbit1Theta:Number;

		private var sphereOrbit2:Sphere;
		private var sphereOrbit2Phi:Number;
		private var sphereOrbit2Theta:Number;

		private var sphereOrbit3:Sphere;
		private var sphereOrbit3Phi:Number;
		private var sphereOrbit3Theta:Number;
		private var target01:Cube;
		private var target02:Cube;

		public function PositionOnSphere()
		{
			super();
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT;

			initScene();
			initObjects();

			this.addEventListener(Event.ENTER_FRAME, render);
		}

		private function initScene():void
		{
			_scene = new Scene3D();
			_camera = new Camera3D({z:-1000});
			_view = new View3D({scene:_scene, camera:_camera});
			_view.x = stage.stageWidth/2;
			_view.y = stage.stageHeight/2;
			_view.clipping = new RectangleClipping({minX:-stage.stageWidth/2, minY:-stage.stageHeight/2, maxX:stage.stageWidth/2, maxY:stage.stageHeight/2});
			addChild(_view);

			// Add trident for reference
			var tri:Trident = new Trident( (1000/2+100),true);
			_scene.addChild(tri);

		}
		private function initObjects():void
		{
			var plane:Plane = new Plane();
			plane.width = plane.height = 50000;
			plane.y = -1000;
			plane.segmentsW = plane.segmentsH = 12;
			plane.material = new WireframeMaterial(0x222222);
			_scene.addChild(plane);

			sphere = new Sphere({material:&quot;white#black&quot;,radius:200});
			sphere.ownCanvas = true;
			sphere.alpha = .7;
			sphere.bothsides = true;
			sphere.x = _lookX;
			sphere.y = _lookY;
			sphere.z = _lookZ;
			_scene.addChild(sphere);

			//setup target objects
			target01 = new Cube({material:&quot;black#white&quot;, depth:50, width:50, height:50});
			_scene.addChild(target01);

			target02 = new Cube({material:&quot;black#white&quot;, depth:50, width:50, height:50});
			_scene.addChild(target02);
			target02.x = _lookX;
			target02.y = _lookY;
			target02.z = _lookZ;

			target01.addEventListener(MouseEvent3D.MOUSE_DOWN,objectHandler);
			target02.addEventListener(MouseEvent3D.MOUSE_DOWN,objectHandler);
			//set up orbiting spheres

			sphereOrbit1 = new Sphere({material:&quot;yellow#black&quot;,radius:20});
			sphereOrbit1Phi = radians(0);
			sphereOrbit1Theta = radians(90);

			_scene.addChild(sphereOrbit1);

			sphereOrbit2 = new Sphere({material:&quot;red#black&quot;,radius:20});
			sphereOrbit2Phi = radians(90);
			sphereOrbit2Theta = 0;

			_scene.addChild(sphereOrbit2);

			sphereOrbit3 = new Sphere({material:&quot;blue#black&quot;,radius:20});
			sphereOrbit3Phi = 0
			sphereOrbit3Theta = radians(90);

			_scene.addChild(sphereOrbit3);
		}

		private function objectHandler(e:MouseEvent3D):void
		{
			var obj:Object3D = e.target as Object3D;
			tweenCameraTarget(obj.x,obj.y,obj.z)

		}
		private function setCoords(_targetObject:Object3D,_radius:Number = 300,_phi:Number = 0,_theta:Number = 0):void{

			var xp:int = _lookX - (_radius) * Math.sin(_phi) * Math.cos(_theta);
			var zp:int = _lookZ - (_radius) * Math.sin(_phi) * Math.sin(_theta);
			var yp:int = _lookY - (_radius) * Math.cos(_phi);

			_targetObject.x = xp;
			_targetObject.y = yp;
			_targetObject.z = zp;
		}
		private function hoverCamera():void
		{
			var mX:Number = this.mouseX &gt; 0 ? this.mouseX : 0;
			var mY:Number = this.mouseY &gt; 0 ? this.mouseY : 0;

			//you need to init tarX and tarY with the _lookX and _lookY
			var tarX:Number = _lookX +  5*(mX  - (stage.stageWidth*.5 ));
			var tarY:Number = _lookY + -5*(mY - (stage.stageHeight*.5));

			var dX:Number = _camera.x - tarX;
			var dY:Number = _camera.y - tarY;
			var dZ:Number = _lookZ - 1000 ;

			_camera.x -= dX*0.25;
			_camera.y -= dY*0.25;
			//always keep Z 1000 away from target
			_camera.z = _lookZ - 1000;
			_camera.lookAt(new Vector3D(_lookX, _lookY, _lookZ));

		}
		private function tweenCameraTarget(_x:int,_y:int,_z:int):void{

			//this tweens the look at variables
			TweenLite.to(this, 1, {_lookX:_x,_lookY:_y,_lookZ:_z});
			TweenLite.to(sphere,1,{x:_x, y:_y, z:_z});

		}
		private function radians(_degrees:Number):Number{
			//convert degrees to radians
			return _degrees*(Math.PI/180);
		}
		private function degrees(_radians:Number):Number{
			//convert radians to degrees
			return _radians*(180/Math.PI);
		}
		private function render(evt:Event):void
		{
			hoverCamera();

			setCoords(sphereOrbit1,300,sphereOrbit1Phi+=radians(1),sphereOrbit1Theta+=radians(3));

			setCoords(sphereOrbit2,330,sphereOrbit2Phi,sphereOrbit2Theta += radians(2) );

			setCoords(sphereOrbit3,270,sphereOrbit3Phi +=radians(4),sphereOrbit3Theta);

			_view.render();
		}
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.chop.com.au/2011/05/orbiting-around-a-target-3d-object-away-3d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lego Technic 8290</title>
		<link>http://blog.chop.com.au/2010/03/lego-technic-8290/</link>
		<comments>http://blog.chop.com.au/2010/03/lego-technic-8290/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 23:02:43 +0000</pubDate>
		<dc:creator>chop</dc:creator>
				<category><![CDATA[3D]]></category>

		<guid isPermaLink="false">http://blog.chop.com.au/?p=146</guid>
		<description><![CDATA[This is a model I recently built in Maya. As I&#8217;m fairly new to Maya it took a couple of weeks (part time). Modelling Lego is very satisfying, and a good place to learn modelling techniques, it helps when you can use their instructions for reference&#8230; MUCH FUN!]]></description>
			<content:encoded><![CDATA[<p>This is a model I recently built in Maya. As I&#8217;m fairly new to Maya it took a couple of weeks (part time). Modelling Lego is very satisfying, and a good place to learn modelling techniques, it helps when you can use their instructions for reference&#8230; MUCH FUN!</p>
<p><img class="alignnone size-full wp-image-147" title="lego_technic_8290" src="http://blog.chop.com.au/wp-content/uploads/lego_technic_8290.jpg" alt="lego_technic_8290" width="650" height="622" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chop.com.au/2010/03/lego-technic-8290/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>United Kingdom Greyscale Elevation Map</title>
		<link>http://blog.chop.com.au/2009/06/united-kingdom-greyscale-elevation-map/</link>
		<comments>http://blog.chop.com.au/2009/06/united-kingdom-greyscale-elevation-map/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 07:36:33 +0000</pubDate>
		<dc:creator>chop</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[displacement map]]></category>
		<category><![CDATA[Elevation]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[modeling]]></category>
		<category><![CDATA[Terrain]]></category>
		<category><![CDATA[UK]]></category>

		<guid isPermaLink="false">http://blog.chop.com.au/?p=96</guid>
		<description><![CDATA[For a project in the pipeline I needed to create a map of the UK in a 3D, which included a realistic elevation data. I thought this would be pretty easy, just search in google for UK displacement map&#8230; well nothing much came up, not the greyscale kind of image I was after. After much [...]]]></description>
			<content:encoded><![CDATA[<p>For a project in the pipeline I needed to create a map of the UK in a 3D, which included a realistic elevation data. I thought this would be pretty easy, just search in google for UK displacement map&#8230; well nothing much came up, not the greyscale kind of image I was after. After much research I stumbled across what I needed <a href="http://en.wikipedia.org/wiki/Shuttle_Radar_Topography_Mission"><strong>Shuttle Radar Topography Mission</strong> (<strong>SRTM</strong>)</a> data. There are a few website out there that supply this data there are a few links on <a href="http://www.terrainmap.com/">terrainmap.com</a>, however it very difficult to extract and you need to assemble patches.</p>
<p>After much deliberation I managed to get a pretty good map (see image) with a resulting render. Its not perfect but it&#8217;s ok.</p>
<div id="attachment_98" class="wp-caption alignnone" style="width: 610px"><img class="size-full wp-image-98" title="uktopo_render" src="http://blog.chop.com.au/wp-content/uploads/uktopo_render.jpg" alt="Render" width="600" height="286" /><p class="wp-caption-text">Render</p></div>
<div id="attachment_97" class="wp-caption alignnone" style="width: 610px"><img class="size-full wp-image-97" title="uktopo_600" src="http://blog.chop.com.au/wp-content/uploads/uktopo_600.jpg" alt="uktopo_600" width="600" height="600" /><p class="wp-caption-text">Displacement Map</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.chop.com.au/2009/06/united-kingdom-greyscale-elevation-map/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>3D business card.</title>
		<link>http://blog.chop.com.au/2009/02/3d-business-card/</link>
		<comments>http://blog.chop.com.au/2009/02/3d-business-card/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 01:19:53 +0000</pubDate>
		<dc:creator>chop</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[General Banta]]></category>
		<category><![CDATA[logo]]></category>
		<category><![CDATA[Paper Vision 3D]]></category>
		<category><![CDATA[pv3d]]></category>

		<guid isPermaLink="false">http://blog.chop.com.au/?p=61</guid>
		<description><![CDATA[I&#8217;ve decided I it would be nice to use it Paper Vision 3D in my porfolio. The thing is it needs to be used in a effective useful manner as you tend to see a lot of sites just using it for the heck! So just for the heck, I&#8217;ve created a 3D business card&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided I it would be nice to use it <a href="http://blog.papervision3d.org/">Paper Vision 3D</a> in my porfolio. The thing is it needs to be used in a effective <span style="text-decoration: underline;">useful</span> manner as you tend to see a lot of sites just using it for the heck! So just for the heck, I&#8217;ve created a 3D business card&#8230; I&#8217;ve got a lot to learn, but it&#8217;s fun!</p>
<p>[kml_flashembed fversion="9.0.0" movie="wp-content/uploads/3d_test01.swf" targetclass="flashmovie" publishmethod="static" width="600" height="400"]</p>
<p>[/kml_flashembed]</p>
<p>Click and Drag to spin.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chop.com.au/2009/02/3d-business-card/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Nokia 6300 model</title>
		<link>http://blog.chop.com.au/2009/02/just-testing-the-water/</link>
		<comments>http://blog.chop.com.au/2009/02/just-testing-the-water/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 08:23:43 +0000</pubDate>
		<dc:creator>chop</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[modeling]]></category>
		<category><![CDATA[Nokia 6300]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[visualisation]]></category>

		<guid isPermaLink="false">http://blog.chop.com.au/?p=3</guid>
		<description><![CDATA[Modeled and rendered in Maya, this was my first attempt at product visualisation. I know a phone is pretty boring although I think it&#8217;s a good base to start from. I estimate it took around 5 days to model and render&#8230; the final tweaks taking most of the time.]]></description>
			<content:encoded><![CDATA[<p>Modeled and rendered in Maya, this was my first attempt at product visualisation. I know a phone is pretty boring although I think it&#8217;s a good base to start from. I estimate it took around 5 days to model and render&#8230; the final tweaks taking most of the time.</p>
<div id="attachment_15" class="wp-caption alignnone" style="width: 610px"><img class="size-full wp-image-15" title="nokia_6300_14a_600" src="http://blog.chop.com.au/wp-content/uploads/nokia_6300_14a_600.jpg" alt="nokia_6300_14a_600" width="600" height="333" /><p class="wp-caption-text">Nokia 6300</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.chop.com.au/2009/02/just-testing-the-water/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

