Infos about using 3D models in iPhone apps

Apprentice
Posts: 5
Joined: 2009.05
Post: #1
Hello again,
( this is not a double post , but another question! Smile )

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 ?? Cry

Thanks for your lights !! Smile
Quote this message in a reply
Member
Posts: 440
Joined: 2002.09
Post: #2
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.
Quote this message in a reply
Member
Posts: 166
Joined: 2009.04
Post: #3
KEMISTRY Wrote:Hello again,
( this is not a double post , but another question! Smile )

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 ?? Cry

Thanks for your lights !! Smile

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.
Quote this message in a reply
Apprentice
Posts: 5
Joined: 2009.05
Post: #4
Hmmm... okay,
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 ?
Quote this message in a reply
Member
Posts: 24
Joined: 2008.02
Post: #5
KEMISTRY Wrote:Hmmm... okay,
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 ?

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.
Quote this message in a reply
Member
Posts: 166
Joined: 2009.04
Post: #6
KEMISTRY Wrote:Hmmm... okay,
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 ?

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)
Quote this message in a reply
Nibbie
Posts: 3
Joined: 2009.05
Post: #7
warmi Wrote: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)

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;
Code:
VERTTYPE pfColourBackground[3]; /*!< Background colour */
VERTTYPE pfColourAmbient[3]; /*!< Ambient colour */
[Q1] Why are they there if they are not being used anywhere? (I searched OOLONG Game Engine and none of the two are used).
[Q2] Is there anything to aid in translating from 3DS Max to struct SPODScene

Thanks!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  3D Models in the iPhone demonpants 18 13,684 Jun 14, 2013 02:19 AM
Last Post: kevinvwallace
  running Cocos2d IOS 3. apps on iPhone 4 aerospaceman 1 3,869 Dec 15, 2010 03:28 PM
Last Post: OneSadCookie
  Do i need to go through code signing also for personal apps on personal iphone? Najdorf 2 2,818 Jan 24, 2009 07:26 PM
Last Post: Najdorf
  3D Models on IPhone haudio 6 4,108 Jan 14, 2009 03:17 AM
Last Post: riruilo
  iPhone apps success metrics jhaniv 0 1,950 Nov 18, 2008 03:24 AM
Last Post: jhaniv