Infos about using 3D models in iPhone apps - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html)
+--- Thread: Infos about using 3D models in iPhone apps (/thread-1267.html)
Infos about using 3D models in iPhone apps - KEMISTRY - May 20, 2009 10:24 AM
( this is not a double post , but another question! )
I am really surprised to see that informations about using 3D models in our iPhone apps are really hard to get !
Ok, there is a loader for .obj models...and another tool provided by imgtec to use .pod models... and of course .h files, but having my mesh data in a source file is not an option for me lol...
And... Is that all ??
If yes, why isn't there any informations about this PVRT/POD tools which seems to be great!
In other words : we must either use this WavefrontObjLoader which is a bit buggy (by the way, the author is kewl enough to share it with us !)
, use .h files which seems a bit wierd for me :S or use a class "PVRTModelPOD" that gets 8 results on google lol....
I just don't understand.... is there another way of using 3D models that i ignore? did i miss something in the tutorials that are everywhere?
Why is it that hard to get our max/maya models on the little screen ??
Thanks for your lights !!
Infos about using 3D models in iPhone apps - Frank C. - May 20, 2009 11:25 AM
KEMISTRY Wrote:I just don't understand.... is there another way of using 3D models that i ignore?
Most folks create their own model formats. This is fairly common practice for 3D game models on all platforms.
Infos about using 3D models in iPhone apps - warmi - May 20, 2009 12:50 PM
KEMISTRY Wrote:Hello again,
There is nothing wrong with PVRTModelPOD -it works.
If you look at the PC side of things , it is pretty much the same there ... everybody has their own custom model format.
Infos about using 3D models in iPhone apps - KEMISTRY - May 20, 2009 06:44 PM
well suppose i'm gonna write my own exporter/importer for my own format,
how should i proceed ?
i mean, i know i have to store vertices, texture name and uv/wv, animation ....
But is there a "good" way of doing this ?
and how is the animation stored ? do we repeat the model vertices in the file ?
and is that something "easy" to do for 3dsmax ?
Infos about using 3D models in iPhone apps - Man With No Name - May 21, 2009 06:15 AM
KEMISTRY Wrote:Hmmm... okay,
You're right, you'll need to store vertices and texture coordinates. If you take a look at the .obj file format, you'll see that it stores vertices on a new line using a v to indicate it's a vertex, like so:
v x y z
v x y z
Then, after all the vertices are specified, it lists all the faces in the model, using index numbers that corresponds to the position (index) of the vertices, like so:
f 1 2 3
f 3 4 1
So you could use this method and store your vertices in a big array and store your face info in another array. I encourage you to check out the obj file specs, they might help you know what to do.
As for animation, the only way for .obj files is to specify all the vertices of the model for each frame of the animation, but obj isn't really designed for animations. It really depends on how you're doing animations, just store the information that you need.
Infos about using 3D models in iPhone apps - warmi - May 21, 2009 07:47 AM
KEMISTRY Wrote:Hmmm... okay,
Why bother with creating your own format ... use POD.
First of all, they do offer exporters for various 3d apps but you can easily write your own POD exporter if your 3d app of choice is not supported ( I did that for Lightwave)
Infos about using 3D models in iPhone apps - earamsey - May 23, 2009 10:36 AM
warmi Wrote:Why bother with creating your own format ... use POD.
Hi, I am customizing POD to add things my artist wants and I'm using PVRTModelPOD.cpp because it has methods to write out a POD file from struct SPODScene. I am using 3ds Max 2009 SDK that he provided me.
I inside of struct SPODScene there are two fields;
[Q2] Is there anything to aid in translating from 3DS Max to struct SPODScene