Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (512)
Games in Android Showcase (121)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Loading animations?  (Read 1878 times)
0 Members and 1 Guest are viewing this topic.
Offline Zorqu

Senior Newbie




Java games rock!


« Posted 2005-05-09 16:02:02 »

I'm looking for information on how to load a model and animations for my game.  I need a soldier with animations such as run, grenade, shoot, etc.  Obviously I'll start off with something simpler, but that's my ultimate goal.

I'm new to this so I'm wondering what format models I should use and if there are any free modeling programs I can use to make models that will load easily.  Basically any information to help me get started with adding animated models to my game.  Thanks!
Offline Amos Wenger

Senior Duke




Everything's possible, but not everything's fun...


« Reply #1 - Posted 2005-05-10 14:29:45 »

I've the same goals, so I can sure advice you.

I think MD2 format is the most adapted.
Because :
  - Some free modelers have MD2 support ( almost export )
  - Xith3D has a MD2 loader ( newdawn )
  - You can only have frame animations, but you can export bones animations to frame animations.

So you can look in the Xith toolkit, where you will find the loader.
The example programs are very clear and "enlighting" ( as long as the enlighted nodes are child of the light Smiley );

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Zorqu

Senior Newbie




Java games rock!


« Reply #2 - Posted 2005-05-11 14:31:27 »

Great, very helpful thanks.  Any suggestions on which modeling programs I can use?  Hopefully there are some good free ones out there.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Amos Wenger

Senior Duke




Everything's possible, but not everything's fun...


« Reply #3 - Posted 2005-05-12 14:22:36 »

Well, some news that can interest you.

I found MD2 good, but I also found better...

Cal3D is a free animation character library written in C++.
The bad news is : It's in C++, so we can't use it.
The good news is : The author of Fuze3D have made a pure Java port of Cal3D.

Cal3D have it own file format, and it support :
  - All kind of interpolations you want
  - Animation blending so you can make a character walk and fire at the same time without creating a specific animation
  - Detail control : you can set it to a lower level if your character is far : So it speed up the game.
  - Bone animation
  - Import from 3DS Max and Blender !

So I'm intending to adapt Cal3D for Xith3D and to integrate it in Gamma ( http://gamma.dev.java.net ).

So, if you're interested, just wait I've done it....
And if someone want to help me, it would be appreciated ( arne ? ).

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline arne

Senior Duke




money is the worst drug- we should not let it rule


« Reply #4 - Posted 2005-05-12 17:30:06 »

bluesky,
I'd better get gamma running first Wink - I've put a question in the gamma forums (in java.net) the other isn't ready yet, right ? There you'll see why it doesn't work for me.

:: JOODE :: Xith3d :: OdeJava ::
Offline Amos Wenger

Senior Duke




Everything's possible, but not everything's fun...


« Reply #5 - Posted 2005-05-16 11:22:37 »

You're right.
I answered your question in Gamma forums ( dev.java.net, and yes the other is not yet ready ).
But actually Gamma is rewritten in part, so you can see the changes over the weeks.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Zorqu

Senior Newbie




Java games rock!


« Reply #6 - Posted 2005-06-25 01:16:26 »

I finally got a chance to check out the newdawn MD2 loader... looks pretty easy to use although there are some compilation errors:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
java.lang.Error: Unresolved compilation problems: 
   BranchGroup.ALLOW_CHILDREN_READ cannot be resolved
   BranchGroup.ALLOW_CHILDREN_EXTEND cannot be resolved
   BranchGroup.ALLOW_CHILDREN_WRITE cannot be resolved

   at org.newdawn.xith3d.loaders.md2.MD2ModelInstance.<init>(MD2ModelInstance.java:72)
   at org.newdawn.xith3d.loaders.md2.MD2Model.getInstance(MD2Model.java:101)
   at MD2Test.loadModel(MD2Test.java:200)
   at MD2Test.<init>(MD2Test.java:117)
   at MD2Test.main(MD2Test.java:275)
Exception in thread "main"

I don't seem to have a definition for those BranchGroup constants?  Can anyone give me information on how to resolve?  Thanks!
Offline kevglass

JGO Kernel


Medals: 188
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #7 - Posted 2005-06-25 10:33:48 »

Yeah, its not been updated since Xith removed all its Java3D compatibility.

Just remove any references to those constants.

Kev

Offline kevglass

JGO Kernel


Medals: 188
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #8 - Posted 2005-06-25 10:57:07 »

Infact, I've just done it for you... download the new version from http://www.newdawnsoftware.com

Kev

Offline Zorqu

Senior Newbie




Java games rock!


« Reply #9 - Posted 2005-06-25 23:32:20 »

Thanks kev, this loader rocks!  Although I do have a question.  I'm using Milkshape 3d, I just started learning it.  There doesn't appear to be a way to save multiple animations in one .md2 file.  It appears in your example with the alien you call both the run and stand animations from the same file, how is this possible?  Am I missing something or do I need to find a better modeling program?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline kevglass

JGO Kernel


Medals: 188
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #10 - Posted 2005-06-26 11:16:23 »

MD2 supports a series of frames. In standard MD2 the frame indices are arranged into groups which Quake 2 used (run, idle, attck.. etc). You should be able to label each frame with a different animation name.

Kev

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

theagentd (13 views)
2014-10-25 15:46:29

Longarmx (52 views)
2014-10-17 03:59:02

Norakomi (45 views)
2014-10-16 15:22:06

Norakomi (34 views)
2014-10-16 15:20:20

lcass (39 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (68 views)
2014-10-14 00:35:47

TehJavaDev (60 views)
2014-10-14 00:32:37

BurntPizza (73 views)
2014-10-11 23:24:42

BurntPizza (45 views)
2014-10-11 23:10:45
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!