Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm writing a game in JOGL and need to represent the in-game character. I plan to use skeletal animation for the character movements, and of course the character will be skinned. I can't seem to find any good model loaders for JOGL so I plan to load the filetype myself, based on specs or something. I also plan to use Blender as my 3D modeler, so some type that exists in there would be best.

What filetype do you recommend I use? .blend? .x, .3ds, .md2/3/5, ...?? Remember I'd like something with a clear defined format so that I can write the loader without having to deobfuscate some random file format, and it needs to support the aforementioned features. Any other info you can give regarding why you chose it and why it's best would be very helpeful too!

Thanks!

EDIT: I will be writing a Blender MS3D exporter. When I'm finished I will post it here.

Meanwhile, see my marked answer below; but more has gone on since then. I'm not going to keep this updated with what I'm doing, but basically I found jMonkey Engine and it already has a ms3d importer and other subsystems which I had begun hand-writing. Despite the scenegraph stuff (which is why I was avoiding Java3D) I think it'll be my best bet to join forces with it, so that's what I'm up to.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
452 views
Welcome To Ask or Share your Answers For Others

1 Answer

If you can live with just geometry, or are prepared to handle your own texturing, then .obj is probably the most straightforward and widely supported 3D file format. It's basically the ascii of 3D modelling.

Otherwise I'd tend towards vrml. It's well defined and there is at least some code around to get you started. I've successfully loaded vrml models into java3D using freely available code. Native file size tends to be large, but that can be solved by using a compressed format.

I would not recommend .3ds. The only time I've handled a reader for this format was in Delphi Pascal, and it's messy, ill-defined, difficult to process and tends to have lots of 'variations' such that although I managed to get my reader handling models exported from 3D-MAX itself just fine it rejected many models from other packages that claimed to be in 3DS format but were not properly formed.

ADDED: Also I'd recommend you take a look at the Java3D API and the O'Reilly book Killer Game Programming in Java as even if you don't go down the Java3D route it is likely to answer a lot of your questions.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...