物体3D自由旋转

发布于 2024-10-16 07:22:06 字数 245 浏览 3 评论 0原文

我有一组产品的 3D CAD 文件。我想创建一个查看器,以便用户可以自由旋转 3D 对象。

我最好怎么做?

1) 我曾考虑过围绕图像每隔 30 度导出一系列 360 度图像,但这意味着每个产品大约有 360 个图像。然后正确处理处理对象旋转所需的矩阵的代码。看起来非常过分,但是可行。

2) OpenGL - 不过,我从未使用它做过任何 3D 动画。

我们正在使用 LightWave 3D,如果有帮助的话。

I have a 3D CAD file of a set of products. I want to create a viewer so that the user can freely rotate the object in 3D.

How would I best go about this?

1) I had thought about exporting a series of 360 degree images every 30 degrees around the image, but that would be around 360 images per product. Then right the code to handle the matrix that would be required to handle rotation of the object. Seems very excessive, but doable.

2) OpenGL - I have never done any 3d animation using this, though.

We are using LightWave 3D, if that helps.

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

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

发布评论

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

评论(1

标点 2024-10-23 07:22:06

我建议采用 3D 渲染路线,尽管它可能比多个切片图像方法需要更多的前期工作。从长远来看,它将提供更大的灵活性,我认为您最终将能够产生更令人愉悦的体验(较小的应用程序二进制文件大小、更平滑的旋转等)。此外,一旦完成显示代码,您将能够引入任意模型以添加到您开始使用的模型中,并更轻松地对这些模型进行调整。

这个问题指出了将 LightWave 模型导入 OpenGL ES 应用程序可用的格式的多种方法。看起来您可能需要通过 Blender 或其他中介来完成此操作。

一旦您获得了可以使用的模型,您就可以构建几个适用于 iPhone / iPad 的开源 3D 渲染应用程序,例如我的 分子 应用程序。我的应用程序是为显示 3D 分子结构而构建的,但人们已经对其进行了修改以支持根据自己的需要渲染其他模型,所以我知道这是可能的。我在 我在 iTunes U 上的课程

OpenGL ES 乍一看可能令人生畏,但我只花了三周的夜以继日的开发时间就构建了 Molecules 的初始版本,而且在开始该项目之前我没有真正的 OpenGL 经验。现在有很多很棒的资源,因此上手比以往任何时候都更容易。

I'd recommend going with the 3-D rendering route, even though it might require more upfront work than the multiple sliced images approach. It will provide much greater flexibility over the long run, and I think you'll be able to generate a more pleasing experience in the end (small application binary size, smoother rotation, etc.). Also, once you have the display code done, you'll be able to pull in arbitrary models to add on to the ones you started with, and make tweaks to those models more easily.

This question points out a number of ways that you might be able to import LightWave models into formats usable by an OpenGL ES application. It looks like you'll probably need to pass through Blender or another intermediary to accomplish this.

Once you have the model in a form that you can work with, you can build off of several open source 3-D rendering applications for the iPhone / iPad, such as my Molecules application. My application is built for displaying 3-D molecular structures, but people have modified it to support rendering other models for their own needs, so I know that's possible. I go into detail on how this application works in the video for the OpenGL ES session of my class on iTunes U.

OpenGL ES may seem intimidating at first, but it only took me three weeks of nights-and-weekends development to build the initial version of Molecules, and I had no real OpenGL experience before starting that project. There are many great resources out there now, so it's easier than ever to get started.

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