我正在使用 Away3D 中的球形电影查看器,当我将 VideoMaterial 纹理应用于 3D 图元时遇到问题。视频看起来很像素化,就像它被缩放或被极大地压缩一样。当我从视频中应用单个静止图像的 BitmapMaterial 时,它看起来很好,所以我认为视频的分辨率不是问题。
我发现 [this discussion][1] 通过在调用构造函数时指定“fixedHeight”和“fixedWidth”来提出解决方案,但这些争论似乎没有效果,我也无法在 API中找到它们。我确实看到了一些名为“lockH”和“lockW”的东西,[在 API][3] 中,但我似乎也没有任何效果。
这是构造 VideoMaterial 的代码。
//basic intro setup stuff and then...
var videoURL:String = "assets/clip.flv";
this.primitive = new Sphere({material:"blue:#cyan", radius:50000, rotationX:100, segmentsW:30, segmentsH:30});
//more code to setup the rest of the scene, and implement some texture switching, then...
this.primitive.material = new VideoMaterial({file:videoURL, lockH:1000, lockW:2000});
作为参考,我以这个示例为起点,在 Eclipse Indigo 中使用 Away3D 3.6 和 Flex 4.5.1。
[1]: [3]: