用鼠标在 Flash 中操作 3D 模型有多难?

发布于 2024-08-23 00:02:14 字数 591 浏览 4 评论 0原文

使用常见的 flash 3d 库,例如 Papervision3d 或away3d & as3dmod 或更好地创建一个 Flash 3d 对象操纵器:

  • 加载复杂的 3d 对象(例如陶器)
  • 允许用户旋转对象
  • 允许用户用鼠标抓取顶点并拉伸它们,如下所示:
    • 在 x 轴上拖动(对称 - 更改 影响给定点区域 指向整个部分 - 即 扩大锅)
    • 在 x 轴上拖动(非对称 - 更改会影响给定的点区域,但仅限于该区域 - 即旋转时您可以看到凸起或缩进)
    • 在 y 轴上拖动(对称 - 更改会影响整个部分的给定点区域 - 即使花盆比给定点更高)
    • 在 y 轴上拖动(非对称 - 变化会影响给定的点区域,但仅限于该区域 - 即使锅更高,但以倾斜的方式......就像比萨斜塔或其他东西)
    • 拖动 x 并选择y 轴(对称 - 至 基本上调整大小)
    • 拖动 x 并选择y 轴(非对称 - 这将是变换的灵活版本,无论 用户确实影响了本地区域 一种固定的方式 - 即真正破坏 锅,或者如果你的技术使它成为现实 不错)
  • 最后允许用户捕获和操作后下载该对象的图片

Using a common flash 3d library such as Papervision3d or away3d & as3dmod or better create a Flash 3d object manipulator that:

  • Loads a complex 3d object (for example a pottery item)
  • Allows a user to rotate the object
  • Allows a user to grab vertices with the mouse and stretch them like so:
    • Drag on x-axis(symmetrical - changes
      affect a given points area across
      that points entire section - i.e. to
      widen a pot)
    • Drag on x-axis(non-symmetrical - changes affect a given points area, but local to that area only - i.e. when rotating you can see a bulge or a indent)
    • Drag on y-axis(symmetrical - changes affect a given points area across that points entire section - i.e. to make a pot taller from the given point)
    • Drag on y-axis(non-symmetrical - changes affect a given points area, but local to that area only - i.e. to make a pot taller but in a skewed way...like the leaning tower of piza or something)
    • Drag on x & y axis (symmetrical - to
      resize basically)
    • Drag on x & y axis (non-symmetrical -
      this would be the pliable version of the transform, where whatever the
      user does affects the local area in
      a set way - i.e. to really mangle a
      pot, or if your skilled make it real
      nice)
  • Finally Allows a user to capture & download a picture of said object after manipulation

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

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

发布评论

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

评论(1

奶茶白久 2024-08-30 00:02:14

要点 1 和 2 很简单(或者至少,很可能不费吹灰之力。)对于 1,只需确保您使用的文件类型的 3d 引擎具有相应的文件解析器。例如,PV3D和away3d都支持3ds文件。

第 4 点也很简单。您可以使用 adobe 的 as3corelib 图像类在 Flash 中生成 JPG 或 PNG 并使用它你想要从那里得到什么。

正如 @alecmce 所说,要点 3 相当难。我已经使用PV3D和away3d相当多了,但我从来没有需要尝试你在这里所说的。对此我很感激,因为我很难理解 3D 渲染引擎中使用的一些数学知识,更不用说 3D 多边形操作工具了。哎呀。

Bullet points 1 and 2 are easy (or at least, very possible with little effort.) For 1, just make sure you are using a file type for which the 3d engine has a corresponding file parser. For example, both PV3D and away3d support 3ds files.

Bullet point 4 is easy as well. You can use adobe's as3corelib image classes to generate a JPG or PNG in flash and do with it what you want from there.

Bullet point 3 is, as @alecmce said, pretty hard. I have used both PV3D and away3d quite a bit but I have never had the need to attempt what you are talking about here. For that I am thankful because I have a hard time following some of the math used in 3d rendering engine, let alone a 3d polygon manipulation tool. Eeek.

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