0
\$\begingroup\$

Blender saves the files with the structure of

  1. All the vertices
  2. All the normals
  3. All the UV

The game to which I want to import the model, only accepts the following order in structure

  1. 1 vertex
  2. 1 normal
  3. 1 UV
  4. 1 vertex
  5. 1 normal
  6. 1 UV

and so on all the time ...

I need any 3d model that you download from the internet or blender with the first structure, be saved in the second structure automatically.

How can I achieve that?

Image examples:

enter image description here

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Blenders obj export is a python addon, I expect you will need to adjust the addon to suit the desired format. You should probably make a fork of the addon and share it as a game specific exporter. \$\endgroup\$ – sambler Aug 24 '18 at 1:51
  • \$\begingroup\$ The problem with that is that I do not have knowledge of Python \$\endgroup\$ – Evil prohack3.0 Aug 24 '18 at 11:11
0
\$\begingroup\$

You should be reordering the data in a .obj on load anyway to convert the data to use a single index. It's a pretty bad format for modern day graphics. In your shipped game you should be using another format that doesnt' need all that parsing.

For example IQM fits that bill. It's binary (with a ascii relative IQE) so you don't need to do (slow) string processing on load. The devkit on that page includes a tool to convert obj to iqm.

\$\endgroup\$
  • \$\begingroup\$ but I can not change the format that accepts the game only accepts .obj and with that structure. Also it does not let me export the models to .iqm with the blender's complement. \$\endgroup\$ – Evil prohack3.0 Aug 24 '18 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.