ios - Load .obj file out of Blender -
Now the Blender 3D .obj files are imported to do some work searching for the Iphone application.
I can get the details to apply in that way in any way!
I do not want to use any engine, I just want to know the steps that are completely and basic to me.
There is nothing in fact on www. You can get articles from 2005 - 2008, but these are not up to date and nothing works.
So, does anyone have to do this?
Take a look at the source, and look at the ozloder. He created ob to be able to load the obz file, and it should work in several platforms (including iOS). By reading the source you will see that it is really simple to make the object loader to the corner, but when you start taking care of normal and textured courses, it becomes more complicated. Here's a simple algorithm for scraping the OBJ file (I will stop parsing the corresponding tpl file for the reader's own research):
- Read in the file's format, starting all Throwing rows
- with
# (comments) looks vertical:
v 1.000 1.000 1.000 , therefore, if the line
'v' Spaces and stores (and convert to float) in the empty space 3 floats have an upper To divide.
- Normal look:
vn 1.000 1.000 1.000 , therefore, if line starts with
'vn' is similar to number 2, but normal Store in the form.
- Texture Cores resembles a possible third
vt 1.000 1.000 looks like
[w] store values and divide the line in the same way.
- Now it becomes difficult, there is a description of the face which is
f1 / 1/1 2/2/23/3/3 by this index of every corner of the shape The most difficult part about this is that the OBJ file type uses three indexes instead of OpenGLAD or Direct 3D, for they are describing 3 corners / textcold / normals (in that order) for (usually those are triangles) . So you have to rotate around the order of your sequence / code / normal so that you can use indexed drawing on the sources. Eg
e.g. Basically you have to be
f 1/300/30 40/22/400 20/30/10 more
f 1/1/1 2/2/2 40/40/40 < / Code> By changing the order
gives you an idea of this algorithm and shows an example about a high level algorithm (going down midnight on this page), and the source code is your For reference, check out can be found.
Anyway, tell me that you need more help. :)
Edit:
The way you look at something like this:
f1 // 4 2 // 5 3 // 7 Concerned No, this is a valid file that is intended and simply means (in this example) that there are no textures cores
- Normal look:
Comments
Post a Comment