简体   繁体   English

Android opengl es 2.0-我应该使用哪种模型格式以及应该创建自己的解析器

[英]Android opengl es 2.0 - what model format should i use and should i create my own Parser

I have been trying to write an obj parser that i can use with VBOs, however there doesnt seem to be a clear answer to whether this is a good enough method. 我一直在尝试编写可以与VBO一起使用的obj解析器,但是对于这是否足够好似乎没有明确的答案。 I have read that obj files are not very pretty and are also suited to older opengl versions. 我读过obj文件不是很漂亮,也适合于较旧的opengl版本。

  • what model format would be best to use. 哪种模型格式最好使用。
  • should i write my own parser, if not what andriod parsers would be suitable (free) 我应该编写自己的解析器,如果不是,那么什么Andriod解析器将是合适的(免费)

Thanks 谢谢

the file format of the 3D model does not matter much in this very initial phases. 在此最初阶段,3D模型的文件格式并不重要。 OBJ is not the best format ever, it is text based, does not support model information, rigs, animations etc. but to begin with is the easiest format you could use. OBJ并不是有史以来最好的格式,它是基于文本的,不支持模型信息,装备,动画等,但首先是您可以使用的最简单的格式。

There is a truckload of documentation online and this is the way to go to start (IMHO). 在线有大量的文档,这是开始的方法(IMHO)。

There are then other formats, yes, but they all come with other challenges or efforts to be initially implemented. 是的,还有其他格式,但是它们都面临着其他挑战或需要首先实施的工作。

An excellent alternative is collada ( https://collada.org/ ) but for beginners it is not so straight forward as OBJ (again, IMHO). collada( https://collada.org/ )是一个很好的替代方法,但是对于初学者来说,它不像OBJ(同样是IMHO)那么简单。

I have friends that started from MD2/MD3 (quake2/quake3 file formats) and are happy. 我有一些从MD2 / MD3(quake2 / quake3文件格式)开始的朋友,并且很高兴。 They offer more than OBJ but they are not bullet proof as well. 它们提供的功能比OBJ还要多,但它们也不是防弹的。 For example, they support animations. 例如,它们支持动画。 ( http://tfc.duke.free.fr/coding/md2-specs-en.html ) http://tfc.duke.free.fr/coding/md2-specs-en.html

A friendly advice, start with OBJ. 一个友好的建议,从OBJ开始。 Once you got familiar with the format's strengths and limitations you you have matured enough experience to switch to a more sophisticated and powerful format. 熟悉了格式的优点和局限性之后,您已经具备了足够的经验,可以切换到更复杂,功能更强大的格式。

I hope to have helped you in some way. 我希望以某种方式对您有所帮助。

Ciao, Maurizio 毛里齐奥·乔

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

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