What 3D Format to use for models?

vossile
Unregistered
 
Post: #1
I own a copy of cinema 4D and would like to model my stuff using that program. Ofcourse it can export things in a variety of formats, so I'd like to hear your opinions.

What should I use: 3DS, VRML or whatever? Could you maybe point me to some useful resources which could help me in making a decision?

Oh, before I forget to mention: I'll be using opengl ;-)

Thanks,

Ole.
Quote this message in a reply
Apprentice
Posts: 5
Joined: 2009.01
Post: #2
Hi Ole,

I use Cinema for all my modeling in my uDevGame entry Kaeru.

For static geometry i just use the built in Wavefront OBJ exporter and load these models directly from my game.

For animated models I use a utility i wrote that takes a series of exported key-frames and convert these into a single MD2 file (quake2). This works fine for me right now since my animation isn't that complex.

Drop me a line at johan[AT]static-motion.org if you want the MD2 utilities.

.johan
Quote this message in a reply
vossile
Unregistered
 
Post: #3
I did some quick research on 3D file formats, and it seems that:

1) .3ds is very proprietary, binary and kept half-secret.
2) .obj is easily readable (ascii) but still not documented very often.

Also I've seen mention of .vrml - have you got any experience with that format?

Until now .obj does seem a pretty good choice, although I would be very interested in doing vrml for the sake of openess ;-)

I've never parsed a 3d file and am very new to the subject (busy ploughing through the opengl red book and a math book in parallel) so it would be nice to find a well documented format to use.

Ole
Quote this message in a reply
Moderator
Posts: 365
Joined: 2002.04
Post: #4
Take a look at Wotsit's Format for information on 3DS, OBJ and anything else you can think of.

Quote:Originally posted by vossile
I did some quick research on 3D file formats, and it seems that:

1) .3ds is very proprietary, binary and kept half-secret.
2) .obj is easily readable (ascii) but still not documented very often.

Also I've seen mention of .vrml - have you got any experience with that format?

.3ds is the old 3D Studio 4 for DOS format, and as such it hasn't changed for years. It is proprietary, but it's so well known that it isn't really a problem. In case you haven't already noticed, the Tank World uDevGame entry loads .3ds files which were generated in Cinema 4D, so it's clearly feasible.

These's an .obj loader on this very site!

VRML looks very interesting, and I don't see any reason why you wouldn't want to use it. If you're writing your own parser it's probably no more difficult than anything else. Why not try it, and post your results here when you get something working? Smile

Neil Carter
Nether - Mac games and comic art
Quote this message in a reply
Member
Posts: 715
Joined: 2003.04
Post: #5
Meshwork format is very simple to parse, gots bones, and if you so desire you can work your way around its 8 texture limits. See Antack source in the resource for meshwork loader. Also dim 3 animator source is available, for handling a number of file formats, but I'm not really sure what it turns those files into after using the animator app.

Coalesece format is very very easy to parse and for the time being the app is free ( not sure if that will change)
it also supports a nice bones format, and up to 32 textures.

Find it in the announcements, a new version most likely will come up when BobboSoft releases his wickedly good game, Digikid for uDG, which will of course provide the secrets of how to use the format in a game.

Then we can all talk him out of storing textures in a resource fork...ya hear me Robert?...no more resource forks!!!! (ok so maybe we have to invent a cracker)


Ok thats my sense of two or three, whatever it may be.
Quote this message in a reply
Member
Posts: 715
Joined: 2003.04
Post: #6
Oops I forgot to mention that 3DS loading source should be available from the Tank World Source in the uDG thread.

Thanks to Tank World Team!
Quote this message in a reply
Member
Posts: 78
Joined: 2002.06
Post: #7
I'd second the .obj vote. Most things can export to it and it is a very readable/understandable file format.

I wrote my own loader in an afternoon. Once you've loaded the models you can do what-ever you want with the data. So I wouldn't worry about load times or filesizes, so pick an easy format you can understand an C4D can export to.
Quote this message in a reply
Moderator
Posts: 508
Joined: 2002.09
Post: #8
I just implemented loading .obj files in my app, using the OBJ Loader example code. Fun stuff but I have some questions.

Why are some objects (especially big ones) like broken. It's almost as if the normals are inverted for some reason.

How should I implement animation? Do I need to export several instances of the model with just some changes or is there a better way?

"When you dream, there are no rules..."
Quote this message in a reply
Member
Posts: 148
Joined: 2003.03
Post: #9
Quote:Why are some objects (especially big ones) like broken. It's almost as if the normals are inverted for some reason.

By "big" do you mean big polygons, big object volumes, or big file sizes? It's been my experience that using big polygons can produce some unwanted results, which is why I try to keep everything on a minute (my-nyoot) scale.
Quote this message in a reply
Moderator
Posts: 508
Joined: 2002.09
Post: #10
Quote:Originally posted by MacFiend
By "big" do you mean big polygons, big object volumes, or big file sizes? It's been my experience that using big polygons can produce some unwanted results, which is why I try to keep everything on a minute (my-nyoot) scale.


Wall it was a rather complex object, could've been that though. I used the terrain object from Cinema 4D.

"When you dream, there are no rules..."
Quote this message in a reply
Member
Posts: 78
Joined: 2002.06
Post: #11
Just a quick note. Make sure that the object does not have polygons with more than 4 sides. (ie. nothing but triangles and quads) i don't think the example code copes with them.

As for animation, .obj doesn't support it unfortunately. But it does retain the groupings in the model, so I'd specify something like bezier paths for motion of each individual bit for animation.
Quote this message in a reply
Apprentice
Posts: 5
Joined: 2009.01
Post: #12
Normals exported from Cinema are inverted. Invert them in Cinema and then export or just invert them in your loader if the model is exported from Cinema (see first line of obj file).

.johan
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Nice models and free models, new site! 3d4ya 4 3,941 Sep 18, 2008 07:36 AM
Last Post: NYGhost