物体的三维自由旋转物体、自由

2023-09-08 01:10:20 作者:听说ヽ每滴泪都是钻石

我有一组产品的3D CAD文件。我想创建观看者,使得用户可以自由地旋转对象在三维

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.

我如何能最好地去呢?

1)我曾想过出口的一系列360度的图像,每30度左右的影像,但是这将是每个产品360左右的图像。然后右code键处理,将需要以处理对象的旋转的矩阵。似乎很过分的,但可行的。

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 - 我从来没有用这个,虽然做过3D动画

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

我们正在使用的LightWave 3D,是否有帮助。

We are using LightWave 3D, if that helps.

推荐答案

我建议你用3D渲染的路线走,即使它可能需要比多个切片图像的方法更多的前期工作。它将提供更大的灵活性,从长远来看,我想你就可以产生到底是更愉快的体验(小应用程序二进制文件的大小,流畅的旋转等)。此外,一旦你的显示器code完成后,你就可以在任意模式的调整更容易拉到添加到那些你开始使用,并以这些模型。

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问题指出了一些你也许可以导入LightWave的模型转换成可用的格式由OpenGL ES的应用程序的方式。它看起来像你可能需要通过搅拌机或其它中介机构来完成。

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.

一旦你的模式,你可以工作的一种形式,你可以建立过的几个开源3D渲染的应用程序为iPhone / iPad的,比如我的分子应用。我的应用程序是显示三维分子结构,但人们已经修改了它支持的渲染等车型适合自己的需求,所以我知道这是可能的。我细讲这个应用为的我的课上的iTunes U 。

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的可能看起来吓人第一,但只花了三个星期的夜和 - 周末发展搭建分子的初始版本,我不得不开始这个项目之前,没有真正的OpenGL的经验。当地有很多资源在那里了,所以它比以往更容易上手。

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.