透视中的影片剪辑

发布于 2024-11-11 12:35:32 字数 1096 浏览 6 评论 0原文

我想要一个有一点深度的电影剪辑。 我无法使用rotationX、rotationY 或rotationZ,因为我必须使用Flash CS3。

第一张图像是我现在拥有的,一个平面电影剪辑。第二个是我应该有的。

在此处输入图像描述 在此处输入图像描述

我已经尝试过使用矩阵,但这不起作用。 我提出了一个问题,有人建议我应该使用 3D 引擎得到我想要的结果。

由于它是一个必须是 3D 格式的 MovieClip,所以我现在使用了一个 MovieClipSprite。

var movieClipSprite:MovieClipSprite = new MovieClipSprite(myMC);
var view:View3D = new View3D({x:200,y:200});
        
var cam:Camera3D = new Camera3D();
cam.zoom = 1;
cam.y = 100;            
view.camera = cam;
cam.lookAt(new Number3D(0, 0, 0));
    
this.addChild(view);
view.scene.addSprite(movieClipSprite);
view.render();

无论我如何更换相机,我总是得到相同的结果。平面影片剪辑。

然后我阅读了 Away3D 文档

MovieClipSprite:球形广告牌 (始终面向相机)精灵 使用影片剪辑的对象 质地。绘制单独的显示 与 z 排序三角形内联的对象 在一个场景中。

我认为这就是为什么它总是给出相同的结果。

我也尝试过使用 MovieMaterial,但从未成功过。

你能帮我正确地看待我的电影剪辑吗?

多谢!

文森特

I would like to have a MovieClip that has a bit of depth.
I can't use rotationX, rotationY or rotationZ because I have to use Flash CS3.

The first image is what I have now, a flat movieclip. The second is what I should have.

enter image description here
enter image description here

I already tried using a matrix, but that didn't work.
I posed a question about it, and there somebody sugested that I should use a 3D engine to get the result I want.

Since it was a MovieClip that had to be in 3D I used now a MovieClipSprite.

var movieClipSprite:MovieClipSprite = new MovieClipSprite(myMC);
var view:View3D = new View3D({x:200,y:200});
        
var cam:Camera3D = new Camera3D();
cam.zoom = 1;
cam.y = 100;            
view.camera = cam;
cam.lookAt(new Number3D(0, 0, 0));
    
this.addChild(view);
view.scene.addSprite(movieClipSprite);
view.render();

It didn't matter how I changed the camera, I always have got the same result. The flat movieclip.

Then I read in the Away3D documentation

MovieClipSprite: Spherical billboard
(always facing the camera) sprite
object that uses a movieclip as it's
texture. Draws individual display
objects inline with z-sorted triangles
in a scene.

I think that's why it always gives the same result.

I also tried something with MovieMaterial, but I never have got that working.

Can you please help me to put my movieclip in perspective?

Thanks a lot!

Vincent

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

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

发布评论

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

评论(1

猫性小仙女 2024-11-18 12:35:32

“view.render”在 Enter_frame 函数中吗?

它对我来说适用于 flashdevelop &离开3d 4.0:

    public var aSprite:Plane = new Plane(new ColorMaterial(0xFF0000));
    public var cam:Camera3D = new Camera3D();
    public var view:View3D = new View3D(null,cam);

    public function test() 
    {
        this.addChild(view);

        var vec:Vector3D = new Vector3D();
        cam.y = -300;
        cam.lookAt(vec);

        view.scene.addChild(aSprite);
        this.addEventListener(Event.ENTER_FRAME, onFrame);
    }

    public function onFrame(e:Event):void
    {
        view.render();
    }

Is "view.render" in a enter_frame function ?

It worked for me with flashdevelop & Away3d 4.0 :

    public var aSprite:Plane = new Plane(new ColorMaterial(0xFF0000));
    public var cam:Camera3D = new Camera3D();
    public var view:View3D = new View3D(null,cam);

    public function test() 
    {
        this.addChild(view);

        var vec:Vector3D = new Vector3D();
        cam.y = -300;
        cam.lookAt(vec);

        view.scene.addChild(aSprite);
        this.addEventListener(Event.ENTER_FRAME, onFrame);
    }

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