<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="http://tres-graficos.jp/blog/rss/style.css" type="text/css"?>
<rdf:RDF xmlns="http://purl.org/rss/1.0/"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:content="http://purl.org/rss/1.0/modules/content/"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xml:lang="en">
<channel rdf:about="http://tres-graficos.jp/blog/rss/1.0.php?id=518">
<title>TG BLOG</title>
<link>http://tres-graficos.jp/blog/index.php</link>
<dc:date>2008-08-28T08:37:21+0900</dc:date>
<description>
TG BLOG - RSS (RDF Site Summary).
</description>
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://tres-graficos.jp/blog/article.php?id=518" />
</rdf:Seq>
</items>
</channel>
<item>
<title>Papervision3D 2.0b - shaders.</title>
<link>http://tres-graficos.jp/blog/article.php?id=518</link>
<dc:date>2008-08-28T08:37:21+0900</dc:date>
<description>Papervision3D 2.0 のベータのアーカイブが公開されてたので、試してみた。丁度、forum で Cheetah3D からの書き出しサンプルが公開されていたので、それを使用。




サンプル ( 要 Flash 9 )

右の...</description>
<content:encoded>
<![CDATA[
<p>Papervision3D 2.0 のベータのアーカイブが公開されてたので、試してみた。丁度、forum で Cheetah3D からの書き出しサンプルが公開されていたので、それを使用。</p>
<p>
<img src="http://tres-graficos.jp/blog/resources/pv3d_20080828_ss.jpg" width="646" height="426" alt="" />
</p>
<p>
<a href="http://www.tres-graficos.jp/pv3d/alien_test01/" class="in-ref">サンプル ( 要 Flash 9 )</a>
</p>
<p>右のボールをクリックすると、エイリアンのシェーダーが上から Phong / Cell / Flat / Bitmap に切り替わります。もう少しローポリの方がいい感じになるだろうなぁ、って感じ。<del>足とか曲がってるしなぁ、</del>モデリング時に少し注意しないといけないのかも :-!</p>
<p>まぁ Cheetah3D にアニメーション付きの書き出し機能が付くと、色々出来ますね。 :-D</p>
<p>AS 3.0 と PV3D に慣れていないのもあって、突っ込みどころ満載ですが、とりあえずソースもリンクしてみました。 :-P 最初は、テクスチャを BitmapFileMaterial で読み込んでいたんですが、画像読み込みとシェーダーの初期化のタイミングが合わないようで、うまく行かず、結局 .fla ファイル埋め込みに。本当はもう少し調べてみたかったんだけれど、今回はパス。 replaceMaterialByName でシェーダーを切り替えてます。</p>
<hr />
<p>追記： forum でアドバイスを受けたんですが、マテリアルの doubleSided を true にしてみると、足とか曲がってるのはなおりました。まだよくわかってなかったんだなぁ、 指摘に感謝。 ;-)</p>
<p>
<a href="http://www.tres-graficos.jp/pv3d/alien_test02/" class="in-ref">修正版 サンプル ( 要 Flash 9 )</a>
</p>

]]>
</content:encoded>
</item>

</rdf:RDF>