Papervision 渲染影片剪辑内具有透明度的 PNG

发布于 2024-08-24 10:20:42 字数 208 浏览 3 评论 0原文

我是一名动作脚本人员 - 我正在开发一款 papervision 游戏。

我有一个资产,其中有 127 个 png 的动画序列。

我可以很高兴地将其投影到我的 papervision 平面上。问题是,没有透明度。我无法使用 BitmapFileMaterial,因为我有很多 png -

任何人都可以建议如何执行此操作。

非常非常感谢——

I'm an actionscript dude - I'm working on a papervision game.

I have an asset of which is 127 pngs in a sequence for an animation.

I can happily project this onto my papervision plane. Problem is, there is no transparency. I Can't use a BitmapFileMaterial as I have many pngs -

can anyone suggest how to do this.

Very very grateful -

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

腻橙味 2024-08-31 10:20:42

myMaterial.transparent = true

或者类似的东西,如果不起作用,请查看文档。

myMaterial.transparent = true

Or something like that, check out the docs if that doesn't work.

不必了 2024-08-31 10:20:42

这是我到目前为止的代码。简化版本编辑 - Papervision 2.0.0

package com.strangemother.gameObjects
{

    import org.papervision3d.materials.MovieMaterial;
    import org.papervision3d.objects.DisplayObject3D;
    import org.papervision3d.objects.primitives.Plane;

    public class Biorod extends DisplayObject3D
    {
        /*
        My flash movieclip with 127 pngs in sequence
        */
        private var textureMC:BiorodTexture     = new BiorodTexture();
        private var movieMat:MovieMaterial      = new MovieMaterial(textureMC, true, true)

        var plane:Plane = new Plane(movieMat, 300,300,1,1);


        public function Biorod()
        {
            textureMC.id                = 'biorod';
            movieMat.animated       = true;
            movieMat.doubleSided        = true;
        //  movieMat.interactive        = true;
            movieMat.smooth             = true;
            movieMat.movieTransparent   = true; 

            this.addChild(plane);
        }


    }
}

this is my code so far. A simplified version edit - Papervision 2.0.0

package com.strangemother.gameObjects
{

    import org.papervision3d.materials.MovieMaterial;
    import org.papervision3d.objects.DisplayObject3D;
    import org.papervision3d.objects.primitives.Plane;

    public class Biorod extends DisplayObject3D
    {
        /*
        My flash movieclip with 127 pngs in sequence
        */
        private var textureMC:BiorodTexture     = new BiorodTexture();
        private var movieMat:MovieMaterial      = new MovieMaterial(textureMC, true, true)

        var plane:Plane = new Plane(movieMat, 300,300,1,1);


        public function Biorod()
        {
            textureMC.id                = 'biorod';
            movieMat.animated       = true;
            movieMat.doubleSided        = true;
        //  movieMat.interactive        = true;
            movieMat.smooth             = true;
            movieMat.movieTransparent   = true; 

            this.addChild(plane);
        }


    }
}
信愁 2024-08-31 10:20:42

通过谷歌阅读 - 似乎有一个错误 -

private var movieMat:MovieMaterial = new MovieMaterial(textureMC, true, true)

设置为

private var movieMat:MovieMaterial = new MovieMaterial(textureMC, false, true)

,后来的设置

movieMat.movieTransparent = true;

似乎有效。


优步感谢您的帮助 - 为我指明了正确的方向。

Reading over google - There seems to be a bug -

private var movieMat:MovieMaterial = new MovieMaterial(textureMC, true, true)

set to

private var movieMat:MovieMaterial = new MovieMaterial(textureMC, false, true)

and later setting

movieMat.movieTransparent = true;

seems to work.


Uber thanks for your help -pointed me in the right direction.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文