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 开发者_C百科recommended way to load Blender models into Android?
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.
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.
精彩评论