What is the best way to render blender model in Android?

拈花ヽ惹草 提交于 2019-12-13 16:34:44

问题


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.

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


回答1:


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.




回答2:


There isn't any official method; however, pre-parsing the file and storing the binary data is a great idea. I'd go with that.



来源:https://stackoverflow.com/questions/4662920/what-is-the-best-way-to-render-blender-model-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!