<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>pv3d &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/pv3d/</link>
	<description>Feed of posts on WordPress.com tagged "pv3d"</description>
	<pubDate>Tue, 01 Dec 2009 18:58:35 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Jim Burrows-Portfolio]]></title>
<link>http://dailypv3d.wordpress.com/2009/12/01/jim-burrows-portfolio/</link>
<pubDate>Tue, 01 Dec 2009 09:00:01 +0000</pubDate>
<dc:creator>Natalie</dc:creator>
<guid>http://dailypv3d.wordpress.com/2009/12/01/jim-burrows-portfolio/</guid>
<description><![CDATA[From Jim Burrows comes  his online  portfolio built  using PV3D a reall cool site,clean,slick,site. ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.jimburrows.net/"><img class="aligncenter size-full wp-image-831" title="http://www.jimburrows.net/" src="http://dailypv3d.wordpress.com/files/2009/11/jim-burrows.jpg" alt="http://www.jimburrows.net/" width="510" height="245" /></a></p>
<p>From Jim Burrows comes  his online  portfolio built  using PV3D a reall cool site,clean,slick,site.</p>
<p>Be sure to check it out at <a href="http://www.jimburrows.net/">: Link </a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[I Love Pocket.]]></title>
<link>http://dailypv3d.wordpress.com/2009/11/13/i-love-pocket/</link>
<pubDate>Fri, 13 Nov 2009 07:00:57 +0000</pubDate>
<dc:creator>Natalie</dc:creator>
<guid>http://dailypv3d.wordpress.com/2009/11/13/i-love-pocket/</guid>
<description><![CDATA[From Eric Weber at Dabber comes ilovepocket In Eric&#8217;s own words:- &#8220;Created by digital ag]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.ilovepocket.se/ilovepocket/"><img src="http://dailypv3d.wordpress.com/files/2009/11/ilovepocket.jpg" alt="http://www.ilovepocket.se/ilovepocket/" title="http://www.ilovepocket.se/ilovepocket/" width="510" height="249" class="aligncenter size-full wp-image-864" /></a></p>
<p>From Eric Weber at <a href="http://www.dabber.tv">Dabber</a> comes<a href="http://www.ilovepocket.se/ilovepocket/"> ilovepocket</a></p>
<p>In Eric&#8217;s own words:-</p>
<blockquote><p>&#8220;Created by digital agency Dabber in September 2009, ilovepocket is a PV3D-powered interface for Natur&#38;Kultur, one of Sweden&#8217;s largest publishing houses. The site features a 3D timeline with N&#38;K&#8217;s recent and upcoming book releases, and provides an alternative way for customers to find new titles.&#8221;</p></blockquote>
<p>Be sure to check it our here :<a href="http://www.ilovepocket.se">Link</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[HA-PY ISLAND]]></title>
<link>http://dailypv3d.wordpress.com/2009/11/09/ha-py-island/</link>
<pubDate>Mon, 09 Nov 2009 11:28:18 +0000</pubDate>
<dc:creator>Natalie</dc:creator>
<guid>http://dailypv3d.wordpress.com/2009/11/09/ha-py-island/</guid>
<description><![CDATA[From Ha-py.com comes Ha-py island. A cute walk around and good use of pv3D Check it out for yourself]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.ha-py.com/island/"><img class="aligncenter size-full wp-image-816" title="http://www.ha-py.com/island/" src="http://dailypv3d.wordpress.com/files/2009/11/hapy-island.jpg" alt="http://www.ha-py.com/island/" width="510" height="255" /></a></p>
<p>From Ha-py.com comes Ha-py island. A cute walk around and good use of pv3D</p>
<p>Check it out for yourself here: <a href="http://www.ha-py.com/island/">Link</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[學習pv3d....]]></title>
<link>http://hkjoelee.wordpress.com/2009/11/07/%e5%ad%b8%e7%bf%92pv3d/</link>
<pubDate>Sat, 07 Nov 2009 02:27:19 +0000</pubDate>
<dc:creator>hkjoelee</dc:creator>
<guid>http://hkjoelee.wordpress.com/2009/11/07/%e5%ad%b8%e7%bf%92pv3d/</guid>
<description><![CDATA[中文人學pv3d 真係有些難度,因為中文的教學實在是少得可憐 就算找到教學或源檔,也時常不能運作.有幾點真係要注意 1.pv3d的ver問 題 eq: 如果你是用 pv3d 2 你download的c]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>中文人學pv3d 真係有些難度,因為中文的教學實在是少得可憐<br />
就算找到教學或源檔,也時常不能運作.有幾點真係要注意</p>
<p><!--more--></p>
<p><strong>1.pv3d的ver問 題</strong><br />
eq: 如果你是用 pv3d 2<br />
你download的code有包含<br />
<span style="color:#ff6600;"><span style="color:#000000;"> import org.papervision3d.cameras.</span>FreeCamera3D<br />
<span style="color:#000000;">那就不能運作了,pv3d 2的是<br />
</span></span>import org.papervision3d.cameras.<span style="color:#ff0000;">Camera3D;</span></p>
<p><strong>2.有沒有使用其他的class.</strong></p>
<p>如果你下載的code中的import有些不是以下2句..<br />
import flash&#8230;&#8230;&#8230;&#8230;&#8230;<br />
import org.papervision3d&#8230;&#8230;&#8230;&#8230;&#8230;</p>
<p>這樣就好有機會使用了一些其他的class了&#8230;常見有<br />
import caurina.transitions.Tweener;</p>
<p><strong>3.注意你的使用環境..</strong><br />
你用的code是否配合的的使用環境</p>
<p><span style="color:#ff6600;"><span style="color:#000000;">flex,flash cs3,flas cs4,<br />
不配合時也會出現不能運作的情況<br />
</span></span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[FLARToolKit]]></title>
<link>http://karlsonivan.wordpress.com/2009/10/20/flartoolkit/</link>
<pubDate>Tue, 20 Oct 2009 05:37:50 +0000</pubDate>
<dc:creator>Karlson</dc:creator>
<guid>http://karlsonivan.wordpress.com/2009/10/20/flartoolkit/</guid>
<description><![CDATA[FLARToolKit http://saqoosha.net/en/flartoolkit/ http://saqoosha.net/en/flartoolkit/start-up-guide/ h]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>FLARToolKit</strong></p>
<ul>
<li><a href="http://saqoosha.net/en/flartoolkit/">http://saqoosha.net/en/flartoolkit/</a></li>
<li><a href="http://saqoosha.net/en/flartoolkit/start-up-guide/">http://saqoosha.net/en/flartoolkit/start-up-guide/</a></li>
<li><a href="http://pv3d.org/">http://pv3d.org/</a></li>
<li><a href="http://www.mikkoh.com/blog/2008/12/05/flartoolkitflash-augmented-realitygetting-started/">http://www.mikkoh.com/blog/2008/12/05/flartoolkitflash-augmented-realitygetting-started/</a></li>
<li><a href="http://milkmidi.blogspot.com/2009/02/flartoolkit.html">http://milkmidi.blogspot.com/2009/02/flartoolkit.html</a></li>
</ul>
<p><em>Creator</em></p>
<ul>
<li><a href="http://flash.tarotaro.org/blog/2008/12/14/artoolkit-marker-generator-online-released/">http://flash.tarotaro.org/blog/2008/12/14/artoolkit-marker-generator-online-released/</a></li>
</ul>
<p><strong>Further Learning of FLARToolKit</strong></p>
<ul>
<li><a href="http://www.hitl.washington.edu/artoolkit/publications/">http://www.hitl.washington.edu/artoolkit/publications/</a></li>
<li><a href="http://groups.google.com/group/flartoolkit-userz">http://groups.google.com/group/flartoolkit-userz</a></li>
<li><a href="http://www.marcpelland.com/2009/01/29/using-papervision-object-parsers/">http://www.marcpelland.com/2009/01/29/using-papervision-object-parsers/</a></li>
</ul>
<p><strong>FlarManager</strong></p>
<ul>
<li><a href="http://words.transmote.com/wp/">http://words.transmote.com/wp/</a></li>
</ul>
<p><strong>Interactive Designer Blog:</strong></p>
<ul>
<li><a href="http://jerromy-gamestart.blogspot.com/">http://jerromy-gamestart.blogspot.com/</a></li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Realidade aumentada - FLARToolkit]]></title>
<link>http://fernando2dias.wordpress.com/2009/10/13/realidade-aumentada-flartoolkit/</link>
<pubDate>Tue, 13 Oct 2009 13:15:50 +0000</pubDate>
<dc:creator>fernando3dias</dc:creator>
<guid>http://fernando2dias.wordpress.com/2009/10/13/realidade-aumentada-flartoolkit/</guid>
<description><![CDATA[A algum tempo os publicitários estão pirando com as criações em realidade aumentada, eu comecei a pe]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>A algum tempo os publicitários estão pirando com as criações em realidade aumentada, eu comecei a pesquisar a fundo sobre o e percebi que não é tão dificil assim quando temos uma biblioteca no jeito de ser editada.</p>
<p>Eu encontrei um pacote muito bom chamado FLARToolkit de um site japonês vou disponibilizar o link para download diretamente deles. (<a href="http://saqoosha.net/lab/FLARToolKit/FLARToolKit-starter-kit.zip" target="_blank"> Download FLARToolkit</a> ), só que para utilizar este pacote é necessário ter o pacote Papervision 3D na sua máquina ( <a href="http://code.google.com/p/papervision3d/" target="_blank">Download Papervision 3d</a> ).<br />
Se você estiver familiarizado com Papervision3D, este FLARToolKit será fácil de controlar. Você pode fazer o que quiser, como se você controla Papervision 3D.<br />
Se você é usuário não Papervision3D, não tenha muito medo, não é um bicho de sete cabeças! Mas precisa de um pouco mais de dedicação para começar a programar.</p>
<p>Imagem:</p>
<p><img class="alignnone size-full wp-image-26" title="marker-axis[1]" src="http://fernando2dias.wordpress.com/files/2009/10/marker-axis1.jpg" alt="marker-axis[1]" width="472" height="300" /></p>
<p>Fonte: <a href="http://saqoosha.net/" target="_blank">http://saqoosha.net/</a></p>
<p>Agora é só experimentar!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[3D Gallery]]></title>
<link>http://paulprocter.wordpress.com/2009/10/05/3d-gallery/</link>
<pubDate>Mon, 05 Oct 2009 23:08:26 +0000</pubDate>
<dc:creator>Paul</dc:creator>
<guid>http://paulprocter.wordpress.com/2009/10/05/3d-gallery/</guid>
<description><![CDATA[I&#8217;ve been experimenting a bit with using Papervision for flash.  Here i&#8217;ve created a 3d ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.paulprocter.co.uk/3DGallery"><img class="aligncenter size-full wp-image-13" title="3dgallery" src="http://paulprocter.wordpress.com/files/2009/10/3dgallery.jpg" alt="3dgallery" width="484" height="403" /></a></p>
<p>I&#8217;ve been experimenting a bit with using Papervision for flash.  Here i&#8217;ve created a 3d gallery using papervisions cube class.   Click the image to view the example.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Agencja Janmedia, dzieci i... prąd]]></title>
<link>http://interaktywna.wordpress.com/2009/09/11/agencja-janmedia-dzieci-i-prad/</link>
<pubDate>Fri, 11 Sep 2009 10:26:49 +0000</pubDate>
<dc:creator>Mikeso</dc:creator>
<guid>http://interaktywna.wordpress.com/2009/09/11/agencja-janmedia-dzieci-i-prad/</guid>
<description><![CDATA[Agencja interaktywna Janmedia wraz z Grupą ENERGA przygotowała serwis dla dzieci o nazwie Planeta En]]></description>
<content:encoded><![CDATA[Agencja interaktywna Janmedia wraz z Grupą ENERGA przygotowała serwis dla dzieci o nazwie Planeta En]]></content:encoded>
</item>
<item>
<title><![CDATA[PAPERVISION Menu Over]]></title>
<link>http://hamistertower.wordpress.com/2009/08/31/papervision-menu-over/</link>
<pubDate>Mon, 31 Aug 2009 18:20:46 +0000</pubDate>
<dc:creator>Setzer Wolf</dc:creator>
<guid>http://hamistertower.wordpress.com/2009/08/31/papervision-menu-over/</guid>
<description><![CDATA[clique na imagem para poder visualizar Olá Pessoal, Para nosso tutorial de hoje, preparei exemplo mu]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:center;"><a href="http://setzerwolf.deviantart.com/art/PAPERVISION-Menu-Over-135425747"><img class="alignnone size-full wp-image-592" title="ppvmenu" src="http://hamistertower.wordpress.com/files/2009/08/ppvmenu.jpg" alt="ppvmenu" width="300" height="300" /></a></p>
<address><a href="http://setzerwolf.deviantart.com/art/PAPERVISION-Menu-Over-135425747"></a>clique na imagem para poder visualizar</address>
<p>Olá Pessoal, Para nosso tutorial de hoje, preparei exemplo muito simples, utilização do mouse ma interação de um objeto primitivo do papervision, assim poderemos possamos montar um menu num futuro.</p>
<p>Ao se trabalhar com Orientação a Objetos devemos sempre estar atendendo a instância do objeto, ao utilizar o papervision, para alterar algumas propriedades de um simples material instanciado para um plane devemos alterar o movieclip no qual o nosso material recebe de instancia.</p>
<pre style="font-size:12px;">movie = <span style="color:#99cc00;">new </span><span style="color:#0000ff;">MovieClip</span>();
material = <span style="color:#99cc00;">new </span>MovieMaterial(movie,<span style="color:#0000ff;">true</span>,<span style="color:#0000ff;">true</span>);</pre>
<p>Seguindo a lógica, o nosso material armazena a instancia de &#8220;movie&#8221; ou seja, se alterarmos o alpha ou o posicionamento do frame de nosso movie o nosso material sofrerá a mesma alteração.</p>
<p>Em nosso exemplo teremos um movieclip aonde a propriedade linkage dele será &#8220;MovieButton&#8221;.</p>
<p>Iniciaremos nosso plane com as rotações em 25 e alpha 0.8, e em nosso enterframe colocaremos o nosso plane para ficar rotacionando para exemplificar melhor que aquele plane é um objeto do papervision. Ao passar o mouse em nosso plane, alteraremos o alpha para 1, reposicionaremos as rotações em 0 e bloquearemos o enterframe. Vamos para o código completo.</p>
<pre style="font-size:12px;"><span style="color:#99cc00;">package
</span>{
    <span style="color:#99cc00;">import </span><span style="color:#0000ff;">flash.display.MovieClip</span>;
    <span style="color:#99cc00;">import </span><span style="color:#0000ff;">flash.events.Event</span>;
    <span style="color:#99cc00;">import</span> org.papervision3d.materials.MovieMaterial;
    <span style="color:#99cc00;">import </span>org.papervision3d.objects.primitives.Plane;
    <span style="color:#99cc00;">import </span>org.papervision3d.events.InteractiveScene3DEvent;
    <span style="color:#99cc00;">import </span>org.papervision3d.view.BasicView;

    <span style="color:#99cc00;">public class </span>Menu <span style="color:#99cc00;">extends </span>BasicView
    {
        <span style="color:#99cc00;">private var</span> mov1:<span style="color:#0000ff;">MovieClip</span>;
        <span style="color:#99cc00;">private var</span> mat1:MovieMaterial;
       <span style="color:#99cc00;"> private var</span> plane1:Plane;
        <span style="color:#99cc00;">private var</span> MOVE:<span style="color:#0000ff;">Boolean</span> = <span style="color:#0000ff;">true</span>;

        <span style="color:#99cc00;">public function</span> Menu()
        {
            viewport.<span style="color:#0000ff;">buttonMode </span>= <span style="color:#0000ff;">true</span>;
            viewport.<span style="color:#0000ff;">interactive </span>= <span style="color:#0000ff;">true</span>;

            camera.<span style="color:#0000ff;">zoom </span>= 5;
            camera.<span style="color:#0000ff;">focus </span>= 200;

            mov1 = <span style="color:#99cc00;">new </span>MovieButton();
            mat1 = <span style="color:#99cc00;">new </span>MovieMaterial(mov1, <span style="color:#0000ff;">true</span>, <span style="color:#0000ff;">true</span>)

            mat1.<span style="color:#0000ff;">interactive </span>= <span style="color:#0000ff;">true</span>;
            mat1.<span style="color:#0000ff;">smooth </span>= <span style="color:#0000ff;">true</span>;
            mat1.<span style="color:#0000ff;">doubleSided </span>= <span style="color:#0000ff;">true</span>;

            plane1 = <span style="color:#99cc00;">new</span> Plane(mat1, 130, 100)
            scene.<span style="color:#0000ff;">addChild</span>(plane1);
            plane1.rotationY = 25;
            plane1.rotationZ = 25;
            plane1.rotationX = 25;

            plane1.<span style="color:#0000ff;">addEventListener</span>(InteractiveScene3DEvent.OBJECT_OVER, _mouseOver);
            plane1.<span style="color:#0000ff;">addEventListener</span>(InteractiveScene3DEvent.OBJECT_OUT, _mouseOut);
            startRendering();
            mov1.<span style="color:#0000ff;">alpha</span> = 0.8;
            <span style="color:#0000ff;">addEventListener</span>(<span style="color:#0000ff;">Event.ENTER_FRAME</span>, _loop);

        }
        <span style="color:#99cc00;">public function</span> _loop(<span style="color:#0000ff;">e:Event</span>) {
            <span style="color:#99cc00;">if </span>(MOVE){
                plane1.yaw(3);
                plane1.roll(3);
                plane1.pitch(3);
            }
        }
        <span style="color:#99cc00;">public function</span> _mouseOver(e:InteractiveScene3DEvent):<span style="color:#99cc00;">void
        </span>{
            MOVE = <span style="color:#0000ff;">false</span>;
            mov1.<span style="color:#0000ff;">alpha </span>= 1;
            e.<span style="color:#0000ff;">target</span>.rotationY = 0;
            e.<span style="color:#0000ff;">target</span>.rotationZ = 0;
            e.<span style="color:#0000ff;">target</span>.rotationX = 0;

        }
        <span style="color:#99cc00;">public function</span> _mouseOut(e:InteractiveScene3DEvent):<span style="color:#99cc00;">void</span>
        {
            MOVE = <span style="color:#0000ff;">true</span>;
            mov1.<span style="color:#0000ff;">alpha </span>= 0.8;
        }

    }

}</pre>
<p>Para dar um toque interessante ao seu menu aconselho a usar transições de tweeners, caurina, green sock ou ate mesmo o tweener do flash. Agora que eu já lhe mostrei a escada só falta vocês subirem ^^ até aproxima.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[3D Image Gallery in AIR]]></title>
<link>http://patrickprajapati.wordpress.com/2009/08/26/3d-image-gallery-in-air/</link>
<pubDate>Wed, 26 Aug 2009 06:28:06 +0000</pubDate>
<dc:creator>patrickprajapati</dc:creator>
<guid>http://patrickprajapati.wordpress.com/2009/08/26/3d-image-gallery-in-air/</guid>
<description><![CDATA[Today , I am going to present you the cocktail of AIR , Flash Builder 4 and PV3D called as &#8216;Si]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Today , I am going to present you the cocktail of AIR , Flash Builder 4 and PV3D called as &#8216;<em>Simple Image Gallery</em>&#8216;. It is just a basic application applying the mixture of 3d carousel in pv3d , <a title="FileSystemTree" href="http://help.adobe.com/en_US/AIR/1.1/devappsflex/WS5b3ccc516d4fbf351e63e3d118666ade46-7f4c.html" target="_blank">FileSystemTree</a> class in Air and some container classes of Spark platform.In this application, you have to click on directory entry of the left panel to see the images in carousel effect.The selected directory entry should have .jpg or .gif images for display.</p>
<p>I have used <a title="Lee Brimelow" href="http://theflashblog.com/?p=293" target="_blank">Lee Brimelow&#8217;s</a> absolutely wonderful 3d carousel component for this gallery. It follows &#8216;KISS&#8217; principle. 3D code uses trigonometry to achieve circular effect in pv3d.</p>
<p>Download the application&#8217;s <a title="Source code" href="http://cid-13c27ee88e6c849d.skydrive.live.com/self.aspx/.Public/Air/SampAirImageGallery.rar" target="_blank">source code</a> . Run the application in FB 4.</p>
<p>Future additions desired for this code <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
1. 3d image gallery to be constructed as a custom component.<br />
2. Left panel should have tree with checkboxes with multiple selection ability.<br />
3. Gallery should be able to display not just images but a custom-component.<br />
Hope you guys help me to incorporate these features in the future version of the application. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Papervision3D+computeSpectrum]]></title>
<link>http://autourdeflash.wordpress.com/2009/08/24/papervision3dcomputespectrum/</link>
<pubDate>Mon, 24 Aug 2009 08:54:29 +0000</pubDate>
<dc:creator>autourdeflash</dc:creator>
<guid>http://autourdeflash.wordpress.com/2009/08/24/papervision3dcomputespectrum/</guid>
<description><![CDATA[Petite expérimentation avec la réalisation d&#8217;un analyseur de sons créé avec papervision3D et l]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Petite expérimentation avec la réalisation d&#8217;un analyseur de sons créé avec papervision3D et la méthode computeSpectrum qui comme son nom l&#8217;indique réalise l&#8217;analyse du spectre d&#8217;un signal sonore. Au cours de la démo, 10 vues différentes se succèdent.</p>
<p><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/ln6w5zoEDWQ&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/ln6w5zoEDWQ&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Papervision ReplaceMaterialByName]]></title>
<link>http://hamistertower.wordpress.com/2009/08/11/papervision-replacematerialbyname/</link>
<pubDate>Tue, 11 Aug 2009 13:19:19 +0000</pubDate>
<dc:creator>Setzer Wolf</dc:creator>
<guid>http://hamistertower.wordpress.com/2009/08/11/papervision-replacematerialbyname/</guid>
<description><![CDATA[Clique na imagem para visualizar Olá pessoal, Muitos de vocês já se perguntaram como trocar o materi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:center;"><a href="http://setzerwolf.deviantart.com/art/Papervision-ReplaceMaterial-132951615"><img class="size-full wp-image-586 aligncenter" title="ReplaceMaterialByName" src="http://hamistertower.wordpress.com/files/2009/08/replacebyname.jpg" alt="ReplaceMaterialByName" width="300" height="300" /></a></p>
<address>Clique na imagem para visualizar</address>
<p>Olá pessoal, Muitos de vocês já se perguntaram como trocar o material de um objeto sua durante sua execução, o material de um plane, cylinder ou até mesmo a face de um cubo. Pois bem para fazermos esta mágica utilizamos o método replaceMaterialByName.</p>
<p>Este método consiste em substituir a instância de material que possui o nome indicado.</p>
<pre style="font-size:12px;">objeto.<span style="color:#0000ff;">replaceMaterialbyName</span>(material:<span style="color:#0000ff;">Material</span>,name:<span style="color:#0000ff;">String</span>);</pre>
<p>Uma das divergências deste método é que o nome deste método deveria se chamar replaceMaterialByInstancia. Para vocês entenderem melhor este problema vou descrever um exemplo com um cubo.</p>
<pre style="font-size:12px;">    blue  = <span style="color:#99cc00;">new </span>ColorMaterial(0x0000FF);
    red   = <span style="color:#99cc00;">new </span>ColorMaterial(0xFF0000);
    lista = <span style="color:#99cc00;">new </span>MaterialsList()

    lista.addMaterial(blue, 'front');
    lista.addMaterial(blue, 'back');
    lista.addMaterial(blue, 'top');
    lista.addMaterial(blue, 'bottom');
    lista.addMaterial(blue, 'left');
    lista.addMaterial(blue, 'right');
    cube = <span style="color:#99cc00;">new </span>Cube(lista,100,100,100);
    cubo.replaceMaterialByName(red, 'right');</pre>
<p>Teoricamente este código deveria criar um cubo com todas as faces<span style="color:#008000;"> &#8216;Azul&#8217;</span> e ao final ele colocaria a face da direita com a cor<span style="color:#008000;"> &#8216;Vermelho&#8217;.</span> Porém ele no final deixa todas as faces <span style="color:#008000;">&#8216;vermelho&#8217;</span>, pois a instancia de material do lado direito<span style="color:#008000;"> &#8216;right&#8217;</span> é igual a instancia de material utilizado para as outras faces. Para que não aconteça isso é recomendado que cada face tenha sua própria instancia. Agora vamos ao código de nosso tutorial.</p>
<p><span style="color:#0000ff;"><strong>Tutorial replaceMaterialbyName</strong></span></p>
<p style="line-height:14.25pt;"><span style="font-size:10pt;font-family:Georgia;color:black;">Neste tutorial decidi brincar um pouco mais. Vamos utilizar um pouco de ReflectionView e o componente ColorPicker (componente do próprio Flash)</span></p>
<p style="line-height:14.25pt;"><span style="font-size:10pt;font-family:Georgia;color:black;">Criaremos 3 ColorPicker que será responsável por 2 lados diferentes do cubo e um botão para resetar para o estado utilizando os MovieMaterial.</span></p>
<p><strong><span style="color:#0000ff;">Logica:</span></strong></p>
<pre style="font-size:12px;"><span style="color:#99cc00;">package</span>
{
    <span style="color:#99cc00;">import </span><span style="color:#0000ff;">fl.controls.ColorPicker</span>;
    <span style="color:#99cc00;">import </span><span style="color:#0000ff;">fl.events.ColorPickerEvent;</span>
    <span style="color:#99cc00;">import </span><span style="color:#0000ff;">flash.display.SimpleButton;</span>
    <span style="color:#99cc00;">import </span><span style="color:#0000ff;">flash.display.Sprite;</span>
    <span style="color:#99cc00;">import </span><span style="color:#0000ff;">flash.events.Event;</span>
    <span style="color:#99cc00;">import </span><span style="color:#0000ff;">flash.events.MouseEvent;</span>
    <span style="color:#99cc00;">import </span>org.papervision3d.<span style="color:#0000ff;">core</span>.effects.view.ReflectionView;
    <span style="color:#99cc00;">import </span>org.papervision3d.materials.ColorMaterial;
    <span style="color:#99cc00;">import </span>org.papervision3d.materials.MovieAssetMaterial;
    <span style="color:#99cc00;">import </span>org.papervision3d.materials.<span style="color:#0000ff;">utils</span>.MaterialsList;
    <span style="color:#99cc00;">import </span>org.papervision3d.objects.primitives.Cube;

    <span style="color:#99cc00;">public class</span> ppv_changeMaterial <span style="color:#99cc00;">extends </span>ReflectionView
    {
       <span style="color:#99cc00;"> public var</span> matsmile:MovieAssetMaterial;
        <span style="color:#99cc00;">public var</span> matface:MovieAssetMaterial;
        <span style="color:#99cc00;">public var</span> matLeftRight:MovieAssetMaterial;
        <span style="color:#99cc00;">public var</span> cubo:Cube;
        <span style="color:#99cc00;">public var</span> lista:MaterialsList;
        <span style="color:#99cc00;">public </span><span style="color:#99cc00;">var </span>color1:<span style="color:#0000ff;">ColorPicker</span>;
        <span style="color:#99cc00;">public </span><span style="color:#99cc00;">var </span>color2:<span style="color:#0000ff;">ColorPicker</span>;
        <span style="color:#99cc00;">public </span><span style="color:#99cc00;">var </span>color3:<span style="color:#0000ff;">ColorPicker</span>;
        <span style="color:#99cc00;">public </span><span style="color:#99cc00;">var </span>reset:<span style="color:#0000ff;">SimpleButton</span>;

        <span style="color:#99cc00;">public function</span> ppv_changeMaterial() {
            <span style="color:#0000ff;">setChildIndex</span>(viewportReflection, 1);
            viewportReflection.<span style="color:#0000ff;">alpha </span>= 0.8;

            matsmile  = <span style="color:#99cc00;">new </span>MovieAssetMaterial(<span style="color:#008000;">"smile"</span>);
            matface  = <span style="color:#99cc00;">new </span>MovieAssetMaterial(<span style="color:#008000;">"face"</span>);
            matLeftRight  = <span style="color:#99cc00;">new </span>MovieAssetMaterial(<span style="color:#008000;">"face"</span>);
            lista = <span style="color:#99cc00;">new </span>MaterialsList()

            lista.addMaterial(matface, <span style="color:#008000;">'front'</span>);
            lista.addMaterial(matsmile, <span style="color:#008000;">'back'</span>);
            lista.addMaterial(<span style="color:#99cc00;">new </span>ColorMaterial(0xF9EAAD), <span style="color:#008000;">'top'</span>);
            lista.addMaterial(<span style="color:#99cc00;">new </span>ColorMaterial(0x000000), 'bottom');
            lista.addMaterial(matLeftRight, <span style="color:#008000;">'left'</span>);
            lista.addMaterial(matLeftRight, <span style="color:#008000;">'right'</span>);

            cubo  = <span style="color:#99cc00;">new </span>Cube(lista, 200, 200, 250);
            scene.<span style="color:#0000ff;">addChild</span>(cubo);

            cubo.<span style="color:#0000ff;">y</span> = 150;

            color1 = <span style="color:#99cc00;">new </span><span style="color:#0000ff;">ColorPicker</span>();
            color1.<span style="color:#0000ff;">x</span> = 20;
            color1.<span style="color:#0000ff;">y</span> = 100;

            color2 = <span style="color:#99cc00;">new </span><span style="color:#0000ff;">ColorPicker</span>();
            color2.x = 20;
            color2.y = 140;

            color3 = <span style="color:#99cc00;">new </span>ColorPicker();
            color3.<span style="color:#0000ff;">x</span> = 20;
            color3.<span style="color:#0000ff;">y</span> = 180;

            reset = <span style="color:#99cc00;">new </span>Reset();
            reset.<span style="color:#0000ff;">x</span> = 20;
            reset.<span style="color:#0000ff;">y</span> = 220;
            <span style="color:#0000ff;">addChild</span>(reset);

            <span style="color:#0000ff;">addChild</span>(color1);
            <span style="color:#0000ff;">addChild</span>(color2);
            <span style="color:#0000ff;">addChild</span>(color3);

            color1.<span style="color:#0000ff;">addEventListener</span>(<span style="color:#0000ff;">ColorPickerEvent</span>.<span style="color:#0000ff;">CHANGE</span>, changeLeftRight);
            color2.<span style="color:#0000ff;">addEventListener</span>(<span style="color:#0000ff;">ColorPickerEvent.CHANGE</span>, changeTopBottom);
            color3.<span style="color:#0000ff;">addEventListener</span>(<span style="color:#0000ff;">ColorPickerEvent.CHANGE</span>, changeFrontBack);
            reset.<span style="color:#0000ff;">addEventListener</span>(<span style="color:#0000ff;">MouseEvent.CLICK</span>, clickReset);
            <span style="color:#0000ff;">addEventListener</span>(<span style="color:#0000ff;">Event.ENTER_FRAME</span>, onEnterFrame);
        }
        <span style="color:#99cc00;">private function</span> changeLeftRight(e:<span style="color:#0000ff;">ColorPickerEvent</span>) {
            cubo.replaceMaterialByName(<span style="color:#99cc00;">new </span>ColorMaterial(<span style="color:#0000ff;">e.target.selectedColor</span>), <span style="color:#008000;">'left'</span>);
            cubo.replaceMaterialByName(<span style="color:#99cc00;">new </span>ColorMaterial(<span style="color:#0000ff;">e.target.selectedColor</span>), <span style="color:#008000;">'right'</span>);
        }
        <span style="color:#99cc00;">private function</span> changeTopBottom(e:<span style="color:#0000ff;">ColorPickerEvent</span>) {
            cubo.replaceMaterialByName(<span style="color:#99cc00;">new </span>ColorMaterial(<span style="color:#0000ff;">e.target.selectedColor</span>), <span style="color:#008000;">'top'</span>);
            cubo.replaceMaterialByName(<span style="color:#99cc00;">new </span>ColorMaterial(<span style="color:#0000ff;">e.target.selectedColor</span>), <span style="color:#008000;">'bottom'</span>);
        }
        <span style="color:#99cc00;">private function</span> changeFrontBack(e:<span style="color:#0000ff;">ColorPickerEvent</span>) {
            cubo.replaceMaterialByName(<span style="color:#99cc00;">new </span>ColorMaterial(<span style="color:#0000ff;">e.target.selectedColor</span>), <span style="color:#008000;">'front'</span>);
            cubo.replaceMaterialByName(<span style="color:#99cc00;">new </span>ColorMaterial(<span style="color:#0000ff;">e.target.selectedColor</span>), <span style="color:#008000;">'back'</span>);
        }
        <span style="color:#99cc00;">public function</span> clickReset(e:<span style="color:#0000ff;">MouseEvent</span>):<span style="color:#99cc00;">void</span>
        {
            cubo.replaceMaterialByName(matface, <span style="color:#008000;">'front'</span>);
            cubo.replaceMaterialByName(matsmile, <span style="color:#008000;">'back'</span>);
            cubo.replaceMaterialByName(<span style="color:#99cc00;">new </span>ColorMaterial(0xF9EAAD), <span style="color:#008000;">'top'</span>);
            cubo.replaceMaterialByName(<span style="color:#99cc00;">new </span>ColorMaterial(0x000000), <span style="color:#008000;">'bottom'</span>);
            cubo.replaceMaterialByName(matface, <span style="color:#008000;">'left'</span>);
            cubo.replaceMaterialByName(matface, <span style="color:#008000;">'right'</span>);

        }

        <span style="color:#99cc00;">private function</span> onEnterFrame(e:<span style="color:#0000ff;">Event</span>):<span style="color:#99cc00;">void </span>{
            singleRender();
            camera.orbit(<span style="color:#0000ff;">Math.abs</span>(<span style="color:#0000ff;">mouseY</span>+1 / 2), <span style="color:#0000ff;">Math.abs</span>(<span style="color:#0000ff;">mouseX</span>+1));
        }

    }

}</pre>
<p>Pode ter certeza que este método será muito útil em diversas de suas aplicações,  até a próxima.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Papervision [ReflectionView]]]></title>
<link>http://hamistertower.wordpress.com/2009/07/27/papervision-reflectionview/</link>
<pubDate>Mon, 27 Jul 2009 20:42:35 +0000</pubDate>
<dc:creator>Setzer Wolf</dc:creator>
<guid>http://hamistertower.wordpress.com/2009/07/27/papervision-reflectionview/</guid>
<description><![CDATA[Clique na imagem para testar Olá pessoal , Hoje falarei sobre uma classe muito interessante e simple]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:center;"><a title="Clique na imagem para testar a aplicação" href="http://setzerwolf.deviantart.com/art/Papervision-ReflectionView-131087600" target="_blank"><img class="alignnone size-full wp-image-579" title="Imagem" src="http://hamistertower.wordpress.com/files/2009/07/imagem.gif" alt="Imagem" width="300" height="300" /></a></p>
<address>Clique na imagem para testar</address>
<p>Olá pessoal , Hoje falarei sobre uma classe muito interessante e simples, ReflectionView. Uma classe que faz com que o viewport se transforme em um espelho tanto para cima do eixo y:0 quanto para baixo.</p>
<p>A classe ReflectionView é uma classe extendida da classe <a href="http://hamistertower.wordpress.com/papervision-basicview/" target="_blank">BasicView </a>que por sua vez é extendido da classe AbstractView, o que eu quero dizer com tudo isso, que ao extender uma classe a RelectionView ele vai possuira atributos instanciados como:</p>
<pre style="font-size:12px;"><strong>AbstractView:</strong>
scene:<span style="color:#0000ff;">Scene3D</span>;
viewport:<span style="color:#0000ff;">Viewport3D</span>;
renderer:<span style="color:#0000ff;">BasicRenderEngine</span>;

startRendering();
stopRendering();
singleRender();

<strong>ReflectionView</strong>
viewportReflection : <span style="color:#0000ff;">Viewport3D</span>;
cameraReflection : <span style="color:#0000ff;">CameraObject3D</span>;
singleRender() (override - sobrescrevido)</pre>
<p>Quando criávamos nosso BasicView ativávamos a função startRendering() para renderizar nossa aplicação, porem quando criamos um ReflectionView também podemos utilizar esta função para renderizar, porém não irá criar reflexo pois a função responsável pelo reflexo é a singleRender() que esta reescrita nesta classe para poder ativar o reflexo. Esta parecendo complicado mas as coisas são bem simples vamos analisar nosso código. Em resumo para funcionar precisamos apenas colocar dentro de um bloco ENTER_FRAME a função singleRender();</p>
<p>Como de custume trabalharemos com 2 arquivos. ppv_reflection.fla e ppv_reflection.as. Certifique de possuir 2 movieclip em sua biblioteca com os seguintes linkage: “smile” e “face”.</p>
<p><span style="color:#0000ff;"><strong>ppv_reflection.as</strong></span></p>
<pre style="font-size:12px;"><span style="color:#99cc00;">package</span>
{
    <span style="color:#99cc00;">import </span><span style="color:#0000ff;">flash.display.Sprite</span>;
    <span style="color:#99cc00;">import</span> <span style="color:#0000ff;">flash.events.Event</span>;
    <span style="color:#99cc00;">import</span> org.papervision3d.<span style="color:#0000ff;">core</span>.effects.view.ReflectionView;
    <span style="color:#99cc00;">import</span> org.papervision3d.materials.ColorMaterial;
    <span style="color:#99cc00;">import</span> org.papervision3d.materials.MovieAssetMaterial;
    <span style="color:#99cc00;">import</span> org.papervision3d.materials.<span style="color:#0000ff;">utils</span>.MaterialsList;
    <span style="color:#99cc00;">import</span> org.papervision3d.objects.primitives.Cube;

    <span style="color:#99cc00;">public class</span> ppv_reflection <span style="color:#0000ff;">extends</span> ReflectionView
    {
<span style="color:#99cc00;">        </span><span style="color:#99cc00;">public var</span> matsmile:MovieAssetMaterial;
        <span style="color:#99cc00;">public var</span> matface:MovieAssetMaterial;
        <span style="color:#99cc00;">public var</span> cubo:Cube;
        <span style="color:#99cc00;">public var</span> lista:MaterialsList;

        <span style="color:#99cc00;">public function</span> ppv_reflection() {
            <span style="color:#0000ff;">setChildIndex</span>(viewportReflection, 1);
            viewportReflection.<span style="color:#0000ff;">alpha </span>= 0.8;
            matsmile  = <span style="color:#99cc00;">new</span> MovieAssetMaterial(<span style="color:#008000;">"smile"</span>);
            matface  = <span style="color:#99cc00;">new</span> MovieAssetMaterial(<span style="color:#008000;">"face"</span>);
            lista = <span style="color:#99cc00;">new</span> MaterialsList(
                {front: matface,
                  back: matsmile,
                  top: <span style="color:#99cc00;">new</span> ColorMaterial(0xF9EAAD),
                  bottom: <span style="color:#99cc00;">new</span> ColorMaterial(0x000000),
                  left: matface,
                  right: matface} );
            cubo  = <span style="color:#99cc00;">new</span> Cube(lista, 200, 200, 250);
            scene.<span style="color:#0000ff;">addChild</span>(cubo);

            cubo.<span style="color:#0000ff;">y</span> = 150;
            <span style="color:#0000ff;">addEventListener</span>(<span style="color:#0000ff;">Event.ENTER_FRAME</span>, onEnterFrame);

        }
        <span style="color:#99cc00;">private function</span> onEnterFrame(e:<span style="color:#0000ff;">Event</span>):<span style="color:#99cc00;">void </span>{
            cubo.rotationY = mouseX - <span style="color:#0000ff;">stage.stageWidth</span> / 2;
            cubo.rotationX = mouseY - <span style="color:#0000ff;">stage.stageHeight</span> / 2;
            singleRender();
        }

    }

}</pre>
<p>Uma classe simples que possui uma imagem de fundo com um cubo personalizado, aonde este cubo se movimenta respondendo os comandos do mouse.Na primeira linha de nosso construtor utilizamos o seguinte código:</p>
<pre style="font-size:12px;">    <span style="color:#0000ff;">setChildIndex</span>(viewportReflection, 1);</pre>
<p>Quando criamos nossa classe extendida de ReflectionView automaticamente nosso viewport refletor é criado no índex 0 porem se eu quiser deixar uma imagem de background desenhado em alguma layer da time line esse background entrará em um índex acima de nosso viewport fazendo com que o viewport refletor fique por trás do background, este é o motive desta linha de comando, estamos trocando o posicionamento índex de nosso viewport.</p>
<p>Nosso viewport refletor ele funciona da seguinte maneira, tudo que esta do eixo y:0 para cima será refletido para baixo o eixo y:0 e vice versa, a imagem a seguir ilustra um cubo desenhado abaixo do eixo y:0.</p>
<p style="text-align:center;"><img class="aligncenter" title="img_02" src="http://hamistertower.wordpress.com/files/2009/07/img_02.jpg" alt="img_02" width="300" height="300" /></p>
<p>Espero que tenham gostado deste tutorial, não precisam se preocupar que teremos mais coisas interessantes no decorrer da semana, até a próxima.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[DAEMC2 Update]]></title>
<link>http://tracehello.wordpress.com/2009/05/06/daemc2-update/</link>
<pubDate>Wed, 06 May 2009 23:35:44 +0000</pubDate>
<dc:creator>pablobandin</dc:creator>
<guid>http://tracehello.wordpress.com/2009/05/06/daemc2-update/</guid>
<description><![CDATA[In reply to: joe 4:05 PM on 6 May 2009  How would I get a model to play in reverse? Great class! I u]]></description>
<content:encoded><![CDATA[In reply to: joe 4:05 PM on 6 May 2009  How would I get a model to play in reverse? Great class! I u]]></content:encoded>
</item>
<item>
<title><![CDATA[Controlling DAE animations in Papervision3d]]></title>
<link>http://tracehello.wordpress.com/2009/04/29/controlling-dae-animations-in-papevision3d/</link>
<pubDate>Wed, 29 Apr 2009 04:01:41 +0000</pubDate>
<dc:creator>pablobandin</dc:creator>
<guid>http://tracehello.wordpress.com/2009/04/29/controlling-dae-animations-in-papevision3d/</guid>
<description><![CDATA[Controlling DAE animations in Papervision3d -Works with papervision rev 910 and below (idk how much ]]></description>
<content:encoded><![CDATA[Controlling DAE animations in Papervision3d -Works with papervision rev 910 and below (idk how much ]]></content:encoded>
</item>
<item>
<title><![CDATA[Creating a MovieMaterial from a BitmapFileMaterial in PaperVision3D]]></title>
<link>http://darrendb.wordpress.com/2009/01/20/creating-a-moviematerial-from-a-bitmapfilematerial/</link>
<pubDate>Tue, 20 Jan 2009 08:00:03 +0000</pubDate>
<dc:creator>ddb</dc:creator>
<guid>http://darrendb.wordpress.com/2009/01/20/creating-a-moviematerial-from-a-bitmapfilematerial/</guid>
<description><![CDATA[I&#8217;m fairly new to working with Papervision. After picking my way through numerous tutorials, b]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I&#8217;m fairly new to working with <strong>Papervision</strong>. After picking my way through numerous tutorials, blogs and such, I had a custom class that did all the basic things a good papervision class should do. I noticed at one point that I was using several different classes each with their own &#8220;<em>load-then-onComplete</em>&#8221; systems. I had a <code>DAE</code>* instance loading a collada file. I was overriding the inherit materials with my own via the optional <code>MaterialsList</code> parameter. All the materials in the <code>MaterialsList</code> were instances of <code>BitmapFileMaterial</code>.<br />
(* <em>I recommend the <a href="http://code.google.com/p/daeanim/">DAEMC</a> class (<a href="http://code.google.com/p/daeanim/">http://code.google.com/p/daeanim/</a>) as an alternate to Collada animation support.</em>)</p>
<p>Then I decided to try implementing the <a href="http://blog.zupko.info/?p=146">ShadowCaster</a> (<a href="http://blog.zupko.info/?p=146">http://blog.zupko.info/?p=146</a>). To comply with one of its dependencies I needed to have a <code>Plane</code> primitive that used a <code>MovieMaterial</code>. I am getting very comfortable with my <strong>Eclipse</strong>-and-<strong>Flex</strong>-Plugin development environment, and I usually do my papervision experiments using an <strong>ActionScript</strong> project. I&#8217;ve grown reluctant to fire up CS4 to make any sort of Library symbol, SWF or SWC to use as my <code>MovieMaterial</code>. I&#8217;d rather just load an image. Which means I face the potential of implementing yet another class with yet another &#8220;<em>load-then-onComplete</em>&#8221; system. For me this just seemed a little too over-complicated. There must be someway to consolidate some of this loading.</p>
<p>Looking at what was already being loaded I decided <code>BitmapFileMaterial</code> was the only real candidate. I did some obligatory Googling, but none of the results I found mentioned any quick, simplistic usage that figured would help me accomplish what I was after. I would have guessed that using <code>BitmapFileMaterial</code> as a basis for a <code>MovieMaterial</code> would be in common practice. Maybe it is, but it wasn&#8217;t evident to me. Maybe my Google is weak.</p>
<p>Although I was a bit weary of going down some worm-hole-in-time over the issue I figured it wouldn&#8217;t be too tough to brush up on the <code>flash.display</code> package and figure out some simple syntactical voodoo. Happily it ended up being extremely quick and easy to figure out. Nothing too high on the Hero-scale but helpful nonetheless.</p>
<p>So my custom class&#8217;s logic-flow is something like this:</p>
<blockquote><p><code><br />
Constructor()<br />
init()<br />
draw()<br />
drawPapervision()<br />
loadMaterials()<br />
onMaterialsLoaded()<br />
createMaterials()<br />
createObjects()<br />
...<br />
</code></p></blockquote>
<p>The initial details of the custom class are fairly standard and quite inconsequential. We can skip over the <code>init</code>, <code>draw</code>, and <code>drawPapervision</code> methods. We&#8217;ll just look at code starting with the <code>loadmaterials</code> method. Here&#8217;s a code snippet from  the custom class:</p>
<pre class="brush: java;">

// some properties
private var groundPlane_bmpMat:BitmapFileMaterial;
private var groundPlane_mcMat:MovieMaterial;
private var plane:Plane;

// some methods
private function loadMaterials():void{
	// set static callback for loading of bitmap(s) via BitmapFileMaterial
	BitmapFileMaterial.callback = onMaterialsLoaded;
	// load bitmap(s) directly into BitmapFileMaterial(s)
	groundPlane_bmpMat = new BitmapFileMaterial( IMAGE_PATH + &quot;groundTexture.jpg&quot; , true);
}

private function onMaterialsLoaded():void{
	// material(s)
	createMaterials();
}

private function createMaterials():void{
	// MovieMaterial(s)
	var groundPlane_mc:MovieClip = new MovieClip();
	groundPlane_mc.addChild(new Bitmap(groundPlane_bmpMat.bitmap));
	groundPlane_mcMat = new MovieMaterial(groundPlane_mc, false, false, true);
	// objects
	createObjects();
}

private function createObjects():void{
	// plane
	plane = new Plane(groundPlane_mcMat, 500, 500, 1, 1);
	this.addChild(plane);
}
</pre>
<p>So the trick was to create an instance of a <code>flash.display.Bitmap</code>, passing in a reference to the <code>bitmap</code> property of the <code>BitmapFileMaterial</code>. Now you have the bitmap loaded by the material class within a <code>DisplayObject</code>, which can then be passed into a <code>MovieClip</code> via the <code>addChild</code> method. Then finally we have a <code>MovieClip</code> with our external asset that we pass into a <code>MovieMaterial</code> instance.</p>
<p>Hurray, we win! However it is a bit questionable to create an instance of a <code>BitmapFileMaterial</code> solely for the purpose of hijacking its load functionality. It would probably be better to use instead the <code>flash.display.Loader</code> class. If you did need to use both the <code>MovieMaterial</code> instance and the  <code>BitmapFileMaterial</code> instance, say as materials for different <code>DisplayObject3Ds</code>, that would be perfectly acceptable. The only other thing I will say is, if you were to create a <code>BitmapFileMaterial</code> simply for fetching an image for a <code>MovieMaterial</code>, remember to clean up any unused instances after their usefulness ends.</p>
<p align="right">- ddb<img src="http://darrendb.wordpress.com/files/2009/01/ddbicon_100x1002.png" alt="" hspace="4" width="20" height="20" /><br />
20 Jan 2009</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Away3d normal map - second attempt]]></title>
<link>http://happyt.wordpress.com/2009/01/11/away3d-normal-map-second-attempt/</link>
<pubDate>Sun, 11 Jan 2009 00:37:38 +0000</pubDate>
<dc:creator>ianm</dc:creator>
<guid>http://happyt.wordpress.com/2009/01/11/away3d-normal-map-second-attempt/</guid>
<description><![CDATA[It seems as though I&#8217;m trying to work out the odds of all the dice throws. I&#8217;ve been goi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>It seems as though I&#8217;m trying to work out the odds of all the dice throws. I&#8217;ve been going through all the variations in making a normal map to suit my dice in the away3d scene. I&#8217;ve eventually succeeded in getting a version that works out of 3dsMax. Harder than I thought it would be, but maybe I should have thought through the maths rather than just guess at the right checkboxes.<!--more--></p>
<p>This is my resulting test, with a correct version of the dice and the old version for comparison. It shows the effect of getting it slightly out. The die on the right has the wrong shading at certain angles. Use the arrow keys to rotate them. </p>
<p><a href="http://www.happytuesdays.co.uk/demos/dice3d-2/dice3d.html"><img src="http://happyt.wordpress.com/files/2009/01/dice-example-21.jpg" alt="dice-example-21" title="dice-example-21" width="453" height="292" class="alignnone size-full wp-image-358" /></a></p>
<p>The problem with my attempt at getting a normal map for the dice was that I asumed that I just needed to create the object space version of the map. Sounded simple, but then I found that the render in away3d didn&#8217;t quite work with any of the variations. The effect was that a face of the cube, when rotated around its perpendicular, would change the lighting that it had. It should stay constant. Because of the normal map being wrong, the rendering system thinks that the face is pointing in a different direction and so should change lighting as the object rotates around. I needed to investigate further.</p>
<p>Being a dice, the easiest way was to use Photoshop to cut and paste the different sides until we got the correct result. Then all (?) I had to do was to get the same rendering out of 3dsMax. It took a route through all the variations of LocalXYZ which should give  an object space normals map. None of those variations fitted. World space is just the same, because my object is sat around the origin; X, Y and Z axes are the same for both. So I then tried Screen modes. After several combinations I discovered that turning the front view around by 180 degress gave the result that I was looking for. I finally had a normals map that worked with away3d. The following pics show the colours required by faces whose normals point along the 3 axes. Faces at other angles would be on a graduaton between them. The first image is the LocalXYZ normal map that I first tried; the second image is the correct version.<br />
</p>
<p>So a few points to note, </p>
<li>Lights aren&#8217;t needed for the render as we are not baking a real texture</li>
<li>The colours (colors!) need to match the directions that away3d is expecting, as in the diagram.</li>
<li>Because Screen mode is used, be careful of rotating object or axes as this will give a different set of colours.</li>
<li>Not sure if the object has to be at the centre; I don&#8217;t think so. It just needs to be centred with the high resolution version.</li>
<li>There needs to be a directional light active in the away3D scene.</li>
<li>The polygons in the model viewed in the picture are from the high res version. The simple cube is within this andthe rays are projected outwards.</li>
<p>If it&#8217;s of any use to anyone, the last picture is an image of the cube within 3dsMax as I created the normals map. It&#8217;s front facing but rotated around 180 degrees. Is that because of the Z-up in Max, compared to the Y-up in away3d or Papervision. I don&#8217;t want to take the time to think about the maths too much at this time of night.</p>
<p>[Edit - If you're into normal maps in away3d, do look at <a href="http://blog.closier.nl/">Fabrice's blog</a>. He's the one doing the clever stuff underneath.]</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[planeFlowers]]></title>
<link>http://digitallabblog.wordpress.com/2008/11/15/planeflowers/</link>
<pubDate>Sat, 15 Nov 2008 13:44:40 +0000</pubDate>
<dc:creator>fmahalem</dc:creator>
<guid>http://digitallabblog.wordpress.com/2008/11/15/planeflowers/</guid>
<description><![CDATA[Teste de modelagem randomica. Flores modeladas randomicamente com planos e textura.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.feeldesign.com.br/lab/planeFlowers/planeFlowers.html"><img class="alignleft size-medium wp-image-34" title="planeflowers" src="http://digitallabblog.wordpress.com/files/2008/11/06_planeflowers.jpg?w=300" alt="planeflowers" width="300" height="268" /></a>Teste de modelagem randomica.</p>
<p>Flores modeladas randomicamente com planos e textura.</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
