在Android中渲染Blender模型的最佳方法是什么? [英] What is the best way to render blender model in Android?

查看:416
本文介绍了在Android中渲染Blender模型的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道可以通过将Blender模型导出为OBJ(WaveFront)文件然后解析其(纯文本)内容来解析Blender模型,但是当您处理大型模型时,这很愚蠢.当文件本身重5MB(obj文件)时,每次应用程序加载时解析文件都是没有意义的.

I know there is way to parse Blender model by exporting it as OBJ (WaveFront) file and then parsing its (plaintext) contents, but this is silly when you're dealing with huge models. It just doesn't make sense to parse the file every time the application loads when the file itself is 5MB heavy (the obj file).

我想到了一次解析的想法,然后将所有这些坐标记录到数组中,然后仅使用它们来绘制模型,但是不确定这是否是正确的方法.

I came to an idea to parse it once and record all those coordinates into arrays and then just use them to draw the model, but not sure if this is the right way.

将Blender模型加载到Android的推荐方法是什么?

What is the recommended way to load Blender models into Android?

推荐答案

解析器的全部目的是将外部文件中的数据转换为应用程序要使用的内部结构.您只需解析一次数据,然后将其存储到可用的变量类型中(在您的情况下为float/bytebuffers)(假设您要使用OpenGL路由).每次应用程序加载时解析文件确实是有道理的,因为一旦关闭应用程序,缓冲区将丢失.

The whole point of a parser is to convert the data in the external file to an internal structure to be used by the application. You parse the data once and store it into useable variable types, which in your case would be float-/bytebuffers (assuming you are going the OpenGL route). It does make sense to parse the file every time the application loads as the buffers will be lost once the application is closed.

这篇关于在Android中渲染Blender模型的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆