如何在flash中获得3D效果?

发布于 2024-10-02 08:12:18 字数 170 浏览 4 评论 0原文

我对flash和actionscript有中级知识,但我从来没有在flash中做过3D动画。现在我正在进行一个项目,要求我制作一个看起来像 DNA 分子的菜单,每个原子都与某物相连。我想让 DNA 分子看起来像一个真正的旋转 3D 物体。谁能帮助我如何实现这个?是否有任何 hack(比如使用旋转 DNA 分子的视频等)???

I have intermediate knowledge of flash and actionscript, but I have never done 3D animations in flash. Now I'm into a project that requires me to make a menu that looks like a DNA molecule, with each atom being a link to something. I want to make the DNA molecule looks like a real rotating 3D object. Can anyone help me out how can I implement this? Can there be any hack (like using videos of rotating DNA molecule, etc) ???

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

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

发布评论

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

评论(2

那片花海 2024-10-09 08:12:18

有一些流行的库可以帮助您做到这一点。例如,Away3D、Alternativa 和 Papervision3D。目前看来前两个比最后一个更新得更多。

看看这个 Away3D 教程。它逐步创建了一个行星和一个太阳。也许它可以作为一个起点,你可以将其转换成原子的集合。

There are a few popular libraries which could help you make this. For example, Away3D, Alternativa, and Papervision3D. At the moment it seems like the first two are being kept up to date more than the last one.

Have a look at this Away3D tutorial. It walks through creating a planet and a sun. Maybe it could be a starting point, something you could convert into a collection of atoms.

http://www.flashmagazine.com/tutorials/detail/create_the_earth_and_heavens_in_less_than_an_hour_with_away3d/

无可置疑 2024-10-09 08:12:18

您可以使用上述 3D 库之一来完成此操作,但我认为如果您的图形只是一起旋转的球状元素,那就太过分了。有一本好书,名为“Actionscript 3.0 动画”,其中涵盖了您正在寻找的很多内容。

基本上,您需要编写一个脚本来围绕中心点移动对象,然后使用函数对对象进行 z 排序,以便它们以正确的顺序堆叠以提供 3D 外观。您可以根据 z 位置设置其亮度,使后面的项目更暗,前面的项目更亮。我认为这比尝试在真正的 3D 中进行设置要简单得多,并且仅为了导航而渲染 3D 引擎会增加 CPU 成本。

出版商网站上的图书链接

You could do this with one of the mentioned 3D libraries but I think it would be overkill if your graphics are just sphere-like elements swirling around together. There is a good book called "Actionscript 3.0 Animation" that covers a lot of what you are looking for.

Basically you will want to write a script that moves your objects around a center point and then use a function to z-sort the objects so they are stacked in the proper order to give the 3D appearance. You can set their brightness based on their z-position to make the items in the back darker, and items in the front brighter. I think this is a lot simpler then trying to set it up in true 3D with the added CPU cost of rendering the 3D engine just for your navigation.

link to book on publisher's site

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