简体   繁体   English

从LightWave转换而来的WaveFront OBJ永远在iPhone上渲染

[英]WaveFront OBJ converted from LightWave taking forever to render on iPhone

I'm working on a project where I need to render a 3D human body on an iOS device. 我正在做一个需要在iOS设备上渲染3D人体的项目。 The 3D object was built in Adobe LightWave and is 7.4MB. 3D对象是在Adobe LightWave中构建的,大小为7.4MB。 I opened it in Blender and exported it as OBJ/MTL pair which are 5.5MB and 4KB, respectively. 我在Blender中打开它,并将其导出为OBJ / MTL对,分别为5.5MB和4KB。 Using Jeff LaMarche's Wavefront Loader (linked below) as a starting point to figure out OpenGL ES and get check out performance and whatnot, I stuck the object in there (in place of an OBJ/MTL pair he'd been using) and ran it in the simulator. 使用Jeff LaMarche的Wavefront Loader(在下面链接)作为起点来了解OpenGL ES并了解性能,但我将对象固定在其中(代替了他一直使用的OBJ / MTL对)并运行了它在模拟器中。 Of course, crash on startup, so I decided to performSelectorInBackground it. 当然,启动时会崩溃,所以我决定对其执行performSelectorInBackground。 A half hour later, it's still loading. 半小时后,它仍在加载。

I'm just guessing that the file is way too detailed to draw with any kind of performance expectation on a device with a 600MHz processor. 我只是猜测该文件过于详细,无法在具有600MHz处理器的设备上以任何性能预期进行绘制。 Is there a way to lower the quality these files somewhat easily? 有没有一种方法可以轻松地降低这些文件的质量? Or, if performance issues have arisen with this particular loader, could somebody enlighten me? 或者,如果这种特殊的装载机出现性能问题,有人能启发我吗?

Thanks, Will 谢谢,威尔

http://iphonedevelopment.blogspot.com/2009/03/wavefront-obj-loader-open-sourced-to.html http://iphonedevelopment.blogspot.com/2009/03/wavefront-obj-loader-open-sourced-to.html

Will, 将,

I don't know if I can solve your problem, but I may be able to point you in the right direction. 我不知道我能否解决您的问题,但也许可以为您指明正确的方向。 I did a project for a client loading a 3D model exported from Blender using the SIO2 3D engine. 我为一个客户执行了一个项目,该项目使用SIO2 3D引擎加载从Blender导出的3D模型。

Anyway, at that time, I had trouble with the 3D engine taking a long time to load the model. 无论如何,那个时候,我在使用3D引擎花费很长时间来加载模型时遇到了麻烦。 I found that reducing the number of polygons was very important - if it is a high quality model, you most certainly will need to do so. 我发现减少多边形的数量非常重要-如果它是高质量的模型,那么您肯定会需要这样做。

Blender has a function for this - polygon reduce or something like that. Blender为此具有功能-多边形缩小或类似的功能。 Blender should also report to you how many polygons and surfaces are in use, so if it's more than, say, 20,000, you're likely in for performance issues. Blender还应该向您报告正在使用的多边形和曲面的数量,因此,如果多边形和曲面的数量超过20,000个,则可能会遇到性能问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM