Papervision3D 2.0 BitmapViewportMaterial

| コメント(0) | トラックバック(0)

BitmapViewportMaterialを使うとBitmapViewport3Dをテクスチャにすることができます。
別のカメラで映している景色を壁面に投影したい時や、または鏡の表現を行う時などに使います。

//ビューポート生成
bmpView= new BitmapViewport3D(600, 600, false, false, 0xeeeeee);
//ビューポートをマテリアル化
var material:BitmapViewportMaterial = new BitmapViewportMaterial(bmpView);
//平面のマテリアルとして適用
var plane:Plane= new Plane(material, 200, 200);
//レンダリングのたびに更新
override protected function onRenderTick(event:Event = null):void {
 //cameraで映したsceneをbmpViewにレンダリング
 renderer.renderScene(scene, camera, bmpView);
 super.onRenderTick();
}
・サンプルSWF ・ソースファイル

トラックバック(0)

トラックバックURL: http://www.kyucon.com/cgi-bin/blog/mt-tb.cgi/396

コメントする

アーカイブ