<?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>sban &#187; 3D</title>
	<atom:link href="http://sban.biz/cates/tech/3d/feed" rel="self" type="application/rss+xml" />
	<link>http://sban.biz</link>
	<description>Focus on RIA</description>
	<lastBuildDate>Wed, 01 Sep 2010 08:01:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to create a trapezoid box</title>
		<link>http://sban.biz/382</link>
		<comments>http://sban.biz/382#comments</comments>
		<pubDate>Sat, 07 Aug 2010 16:19:50 +0000</pubDate>
		<dc:creator>sban</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[away3d]]></category>

		<guid isPermaLink="false">http://sban.biz/382</guid>
		<description><![CDATA[As title, how to reate a trapezoid box with away3d? var v :View3D = new View3D({x:200, y:200, color:0xffff0000}); var cube : WireCube = new WireCube();//sban var cm: WireframeMaterial = new WireframeMaterial(0xffff0000); cm.wireAlpha=0.5; cube.material = cm; cube.rotationX=15; cube.v000.x -= 10; cube.v010.x -= 10; cube.v110.x += 10; cube.v100.x += 10; v.scene.addChild(cube); addChild(v); v.render(); sban 2010/8/7 Beijing]]></description>
			<content:encoded><![CDATA[<p>As title, how to reate a trapezoid box with away3d?</p>
<p> <span id="more-382"></span>
<pre>var v :View3D = <span style="color: #0000ff">new</span> View3D({x:200, y:200, color:0xffff0000});
var cube : WireCube = <span style="color: #0000ff">new</span> WireCube();//<a href="http://sban.biz/">sban</a>
var cm: WireframeMaterial = <span style="color: #0000ff">new</span> WireframeMaterial(0xffff0000);
cm.wireAlpha=0.5;
cube.material = cm;
cube.rotationX=15;
cube.v000.x -= 10;
cube.v010.x -= 10;
cube.v110.x += 10;
cube.v100.x += 10;
v.scene.addChild(cube);
addChild(v);
v.render();</pre>
<p><a href="http://sban.biz/wp-content/uploads/2010/08/image9.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://sban.biz/wp-content/uploads/2010/08/image_thumb9.png" width="238" height="220" /></a> </p>
<p><a href="http://sban.biz/">sban</a> 2010/8/7 Beijing</p>
]]></content:encoded>
			<wfw:commentRss>http://sban.biz/382/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>create alpha 3d object</title>
		<link>http://sban.biz/379</link>
		<comments>http://sban.biz/379#comments</comments>
		<pubDate>Sat, 07 Aug 2010 15:56:05 +0000</pubDate>
		<dc:creator>sban</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[away3d]]></category>

		<guid isPermaLink="false">http://sban.biz/379</guid>
		<description><![CDATA[How to create a alpha 3d object with awayd? Becuse transparent, we can see it&#8217;s back outlines.If we use Cube create it like this: var v :View3D = new View3D({x:200, y:200, color:0xffff0000}); var cube :Cube = new Cube();//sban var cm: WireframeMaterial = new WireframeMaterial(0xffff0000); cm.wireAlpha=0.5; cube.material = cm; cube.rotationX=15; cube.rotationY=15; cube.rotationZ=15; v.scene.addChild(cube); addChild(v); v.render(); it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>How to create a alpha 3d object with awayd?</p>
<p> <span id="more-379"></span>
<p>Becuse transparent, we can see it&#8217;s back outlines.If we use Cube create it like this:</p>
<pre>var v :View3D = <span style="color: #0000ff">new</span> View3D({x:200, y:200, color:0xffff0000});
var cube :Cube = <span style="color: #0000ff">new</span> Cube();//<a href="http://sban.biz/">sban</a>
var cm: WireframeMaterial = <span style="color: #0000ff">new</span> WireframeMaterial(0xffff0000);
cm.wireAlpha=0.5;
cube.material = cm;
cube.rotationX=15;
cube.rotationY=15;
cube.rotationZ=15;
v.scene.addChild(cube);
addChild(v);
v.render();</pre>
<p>it&#8217;s NOT what we want</p>
<p><a href="http://sban.biz/wp-content/uploads/2010/08/image5.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://sban.biz/wp-content/uploads/2010/08/image_thumb5.png" width="238" height="224" /></a> </p>
<p>This code can show the back outlines:</p>
<pre>cube.bothsides=<span style="color: #0000ff">true</span>;</pre>
<p><a href="http://sban.biz/wp-content/uploads/2010/08/image6.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://sban.biz/wp-content/uploads/2010/08/image_thumb6.png" width="244" height="226" /></a> </p>
<p>But we can not remove the catercorner where each face. If we increase segment like this:</p>
<pre>cube.segmentsW=2;
cube.segmentsH=2;</pre>
<p><a href="http://sban.biz/wp-content/uploads/2010/08/image7.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://sban.biz/wp-content/uploads/2010/08/image_thumb7.png" width="244" height="212" /></a> </p>
<p>My God!It dose not help much. Away3d use triangle to draw the segment in cube, in other words, every segment contains two triangles in cube. May be not we achieved with cube.So I sue WireCube as follows:</p>
<pre>var v :View3D = <span style="color: #0000ff">new</span> View3D({x:200, y:200, color:0xffff0000});
var cube : WireCube = <span style="color: #0000ff">new</span> WireCube();//<a href="http://sban.biz/">sban</a>
var cm: WireframeMaterial = <span style="color: #0000ff">new</span> WireframeMaterial(0xffff0000);
cm.wireAlpha=0.5;
cube.material = cm;
cube.rotationX=15;
cube.rotationY=15;
cube.rotationZ=15;
v.scene.addChild(cube);
addChild(v);
v.render();</pre>
<p><a href="http://sban.biz/wp-content/uploads/2010/08/image8.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://sban.biz/wp-content/uploads/2010/08/image_thumb8.png" width="239" height="219" /></a> </p>
<p>Wire 3d object can not be set segment number.</p>
<p>BS:Outline property of the 3d object can highlight the bounds.</p>
<p><a href="http://sban.biz/">sban</a> 2010/8/7 北京</p>
]]></content:encoded>
			<wfw:commentRss>http://sban.biz/379/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>start with away3d flash engine</title>
		<link>http://sban.biz/366</link>
		<comments>http://sban.biz/366#comments</comments>
		<pubDate>Sat, 07 Aug 2010 09:01:46 +0000</pubDate>
		<dc:creator>sban</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[away3d]]></category>

		<guid isPermaLink="false">http://sban.biz/366</guid>
		<description><![CDATA[away3d official web: http://away3d.com/ Awayd is a great realtime 3d engine for flash application.This post demonstrates how to get started with away3d 3.5.Now, let us use away3d create a cube&#8230; &#160; 1,download the 3.5 version and import into your project 2,write the following code into your entry file: var v:View3D = new View3D({x:200, y:200, color:0xffff0000}); [...]]]></description>
			<content:encoded><![CDATA[<p>away3d official web: <a title="http://away3d.com/" href="http://away3d.com/">http://away3d.com/</a></p>
<p>Awayd is a great realtime 3d engine for flash application.This post demonstrates how to get started with away3d 3.5.Now, let us use away3d create a cube&#8230;</p>
<p> <span id="more-366"></span>
<p>&#160;</p>
<p>1,download the 3.5 version and import into your project   <br />2,write the following code into your entry file:</p>
<pre>var v:View3D = <span style="color: #0000ff">new</span> View3D({x:200, y:200, color:0xffff0000});
var cube:Cube = <span style="color: #0000ff">new</span> Cube({width:150, height:150, depth:150});
v.scene.addChild(cube);
addChild(v);
v.render();</pre>
<p>compile and run it, you will see:</p>
<p><a href="http://sban.biz/wp-content/uploads/2010/08/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://sban.biz/wp-content/uploads/2010/08/image_thumb.png" width="244" height="238" /></a> </p>
<p>It&#8217;s a cube, but it looks like a square.Insert the following code:</p>
<pre>cube.rotationX=15;
cube.rotationY=15;
cube.rotationZ=15;</pre>
<p>got this:</p>
<p><a href="http://sban.biz/wp-content/uploads/2010/08/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://sban.biz/wp-content/uploads/2010/08/image_thumb1.png" width="244" height="236" /></a> </p>
<p>The three-demensional coordinate is as follows</p>
<p><a href="http://sban.biz/wp-content/uploads/2010/08/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://sban.biz/wp-content/uploads/2010/08/image_thumb2.png" width="240" height="244" /></a> </p>
<p>If face the direction of the x, yaxis, the rotation is inverse hour, but the z is clockwize.Why not same?</p>
<p>View3D is a container used for storing camera, scene, session, renderer and clip references, and resolving mouse events. Every time after changing the properties of the 3d object, must explicitly call the view3d&#8217;s render method.</p>
<p>We cant paste a material to the cube faces like this</p>
<pre>cube.material = <span style="color: #0000ff">new</span> BitmapMaterial( (<span style="color: #0000ff">new</span> myTexture <span style="color: #0000ff">as</span> Bitmap).bitmapData );
...
[Embed (source=&quot;<span style="color: #8b0000">meta2.jpg</span>&quot;)]
<span style="color: #0000ff">private</span> var myTexture:Class;</pre>
<p><a href="http://sban.biz/wp-content/uploads/2010/08/image3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://sban.biz/wp-content/uploads/2010/08/image_thumb3.png" width="239" height="244" /></a> </p>
<p>or use BitmapFileMaterial:</p>
<pre>cube.material = <span style="color: #0000ff">new</span> BitmapFileMaterial(&quot;<span style="color: #8b0000">meta2.jpg</span>&quot;);</pre>
<p>Now, how to make the material looks a lit lax? clip the image or the bitmap.</p>
<pre>var b :Bitmap = <span style="color: #0000ff">new</span> myTexture <span style="color: #0000ff">as</span> Bitmap;
var bd :BitmapData = <span style="color: #0000ff">new</span> BitmapData(50,50);
bd.draw(b, <span style="color: #0000ff">null</span>, <span style="color: #0000ff">null</span>,<span style="color: #0000ff">null</span>,<span style="color: #0000ff">new</span> Rectangle(0,0,50,50));
cube.material = <span style="color: #0000ff">new</span> BitmapMaterial( bd );</pre>
<p><a href="http://sban.biz/wp-content/uploads/2010/08/image4.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://sban.biz/wp-content/uploads/2010/08/image_thumb4.png" width="243" height="244" /></a> </p>
<p>source and demo download from here:</p>
<p><a title="http://sban.googlecode.com/svn/trunk/blog/away3d/CubeE.as" href="http://sban.googlecode.com/svn/trunk/blog/away3d/CubeE.as">http://sban.googlecode.com/svn/trunk/blog/away3d/CubeE.as</a></p>
<p><a title="http://sban.googlecode.com/svn/trunk/blog/away3d/CubeE.swf" href="http://sban.googlecode.com/svn/trunk/blog/away3d/CubeE.swf">http://sban.googlecode.com/svn/trunk/blog/away3d/CubeE.swf</a></p>
<p>away3d library download from here plz:</p>
<p><a title="http://away3d.com/download/away3d_3_5_0.zip" href="http://away3d.com/download/away3d_3_5_0.zip">http://away3d.com/download/away3d_3_5_0.zip</a></p>
<p><a href="http://sban.biz/">sban</a> 北京 2010/8/7</p>
]]></content:encoded>
			<wfw:commentRss>http://sban.biz/366/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3D人物换装示例</title>
		<link>http://sban.biz/329</link>
		<comments>http://sban.biz/329#comments</comments>
		<pubDate>Sat, 26 Jun 2010 02:43:42 +0000</pubDate>
		<dc:creator>sban</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://sban.biz/329</guid>
		<description><![CDATA[使用Flash 3D引擎制作的一个简单的人物换装示例，她默认没有穿上衣，有两种上衣可供选择，有两个角度演示调整后的效果。 可以实现人物全身换装，并可以加肢体动作，衣服可以多样化，并可以360展示。运行效果图之一： 下载地址：http://sban.googlecode.com/files/minemeDemo_secure.swf sban 2010/6/26 北京]]></description>
			<content:encoded><![CDATA[<p>使用Flash 3D引擎制作的一个简单的人物换装示例，她默认没有穿上衣，有两种上衣可供选择，有两个角度演示调整后的效果。</p>
<p><span id="more-329"></span></p>
<p>可以实现人物全身换装，并可以加肢体动作，衣服可以多样化，并可以360展示。运行效果图之一：</p>
<p><a href="http://sban.biz/wp-content/uploads/2010/06/image1.png"><img style="display: inline; border: 0px;" title="image" src="http://sban.biz/wp-content/uploads/2010/06/image_thumb1.png" border="0" alt="image" width="575" height="467" /></a></p>
<p>下载地址：<a title="http://sban.googlecode.com/files/minemeDemo_secure.swf" href="http://sban.googlecode.com/files/minemeDemo_secure.swf">http://sban.googlecode.com/files/minemeDemo_secure.swf</a></p>
<p><a href="http://sban.biz/">sban</a> 2010/6/26 北京</p>
]]></content:encoded>
			<wfw:commentRss>http://sban.biz/329/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->