hello,
i have a plane with a videoMaterial, a cube with a colorMaterial.
I want  a video reflexion on the cube.
i try to do that with  the EnvMapMethod with a cubeMap. CubeMap's
bitmapdatas are refresh  on render with the videoMaterial.bitmapData.

First i find that i can use this in render, with _cubeMap define like
this :

_cubeMap = new CubeMap(videoMaterialPlane.bitmapData,
videoMaterialPlane.bitmapData,
                                        videoMaterialPlane.bitmapData, 
videoMaterialPlane.bitmapData,
                                        videoMaterialPlane.bitmapData, 
videoMaterialPlane.bitmapData);

and i render :

_colorMaterialCube.removeMethod(_envMapMethod);
_envMapMethod = new EnvMapMethod(_cubeMap);
_colorMaterialCube.addMethod(_envMapMethod)


its work but i think, it's not optimize at all !!!

Is it possible to use the cubeTexture to update the cubeMap ? or other
way to have a similar effect ?

in render :
var bd:BitmapData = videoMaterialPlane.bitmapData;
cubeTexture = context3d.createCubeTexture(bd.width,
Context3DTextureFormat.BGRA, false);
for (var i:uint; i < 6; ++i) cubeTexture.uploadFromBitmapData(bd, i);
_cubeMap.arcane::upload(cubeTexture);

thx for your answer :-)

Reply via email to