IPhone OpenGl: import of three-dimensional models

The general openGl question is here. I assume that in order to create 3D models for use with openGl-es I should use blender and save them as Obj. Should I make a parser or does openGl ES support a specific format? how about animation?

+4
source share
2 answers

Using blender to save your models as obj files is a great way, imo. In my opinion, OpenGL does not have any predefined features or preferences for certain file formats. You will probably have to make your own parser to load vertex data, or if you want, you can use one of the many .obj loaders that others write and publish on the Internet. However, I would recommend writing your own bootloader. This is fun and you will learn a lot. Obj files are also quite lightweight. This can be a good starting point if you just want to adapt the pre-written code.

If you are still studying 3D file formats, I would recommend to look Collada. It is an XML format and supports textures, vert weights, and even animations. A blender plugin is also available there. On the other hand, it’s a little harder to find pre-made loaders, and make your own take-off in a difficult situation from obj files. Sifting through the Collada DOM should help you well on your way, however, since it includes sample code for viewing OpenGL and an effect loader. Chronos faq can help you get started if you have a lot of questions about the format.

+3
source

The asset import library can be used on iOS and is licensed under the BSD license with 3 offers.

+6
source

Source: https://habr.com/ru/post/1337612/


All Articles