Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (602)
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  
  Animation, loaders, bones, weights and morphing...  (Read 2922 times)
0 Members and 1 Guest are viewing this topic.
Offline pauldb

Senior Newbie




Java games rock!


« Posted 2004-10-22 12:41:55 »

Hi,
I know there's already been a lot of interesting and useful debate on these topics. In particular, I found the debate on which loaders to develop very useful:

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=xith3d;action=display;num=1074586164;start=0

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=share;action=display;num=1078652098;start=0

Please forgive the naivety of my questions but I would like to know:

1) The most developed loader for Xith3D seems to be the one for the ASE format. Is that correct?

2) Does the ASE format include bones and weighting?

3) If so, does the Xith3D ASE loader read/use the bones/weighting data?

4) when people talk about loaders "supporting animation" are they talking about morph targets?

5) Does Xith3D support morphing?

6) I believe that in Java3D morphing is achieved as a behavior. My understanding is that Xith3D doesn't have plans to support behaviors, so what is the best way to include morphing?

If it helps, I will explain a little of what I would like to do.
I would like to import a rigged character model. My understanding of rigged is a character with a single mesh and an underlying skelton - bones and weights.
Then I would prefer to move the character by transforming the TransformGroup nodes corresponding to the skeleton bones in the program code. I do not want to import walks or other preset animation apart from....

I am also interested in morphing because I think it will be easier to do facial expressions and lip synching with morphing.

Many thanks,
-Paul
Offline LaLiLuLeLo

Senior Newbie




Foooocus!


« Reply #1 - Posted 2004-10-25 12:19:03 »

If you want to use rigged characters, your best bet right now is MD2. Since it contains frame by frame info, you can export your blendshapes and other such deformer animation. The problem is the bigger your mesh, the bigger your file will get. Also, you won't have access to your skeleton in Xith (because it's not there).
Someone wrote/ported a MilkShape loader but hasn't released it. With MilkShape, you should be able to control the bones at run-time, provided you can code it to do so.
Hope that sheds some light
Offline pauldb

Senior Newbie




Java games rock!


« Reply #2 - Posted 2004-10-25 14:56:19 »

Thanks LaLiLuLeLo for your reply.

Yes, I'd rather import the skeleton information - and use it to assemble a TransformGroup hierarchy. Then I can use that to control the character's movements rather than morphing between animation frames.

David Yazel and the Magicosm people used FlexPorter, a 3D Studio Max plugin, to get the bones info, along with the weights for the mesh vertices.
I wondered whether there were any loaders around for other file formats. FlexPorter requires a copy of 3D Studio Max - which I cannot afford - aswell as full access to the original graphics files.

Thanks,
-Paul
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline LaLiLuLeLo

Senior Newbie




Foooocus!


« Reply #3 - Posted 2004-10-26 13:51:56 »

So you are trying to create real time skeleton that changes at run-time ? Give me an example of what you want to acheive. Perhaps you should start off simple with segmented animation (like old resident evil games).
Java3D has a bunch of loaders. Theoretically, it shouldnt be hard to port them over.
I use Wings3D/CharacterFX and export to MD2, so I don't have any problems. Here's some info:
http://www.goldenxp.com/tutorials/wingscfx/
Offline pauldb

Senior Newbie




Java games rock!


« Reply #4 - Posted 2004-10-26 20:20:01 »

Please bear with me - I think I must be missing something here.

I want to determine a character's moves from within my Java code - I do not want to use a series of animations developed in a graphics package and imported into the Java program as a set of keyframes.

To do that, I think I need a hierarchy of TransformGroups (eg. one for the torso, one for the upper arm, another for the forearm, the hand and so on).

I have created just such a set of TransformGroups and imported a character model in which each of the body parts is a separate object/shape/geometry. Each TransformGroup has one of the graphical objects associated with it.

That works ok. However, most character models these days are developed as single meshes.

I want to import a single mesh model. I will use a "skeleton" of Transform Groups in which each vertex on the mesh is associated with one or more of the bones of the skeleton - with weights determining which bone influences the position of the vertex.

As the skeleton moves, I update the mesh of vertices accordingly. That way I can control the animations from within my code rather than using predetermined morphing between imported frames.

Am I right?

If not, please forgive my naivety. Please explain things to me.

If so, please could someone tell me about a loader that has been developed which imports the vertices of a single mesh and relates each of the vertices, along with the corresponding weights, to the bones of the skeleton used by the graphic artist in the graphics package. I can then use the bone information to construct my TransformGroup hierarchy and the bone-weight-vertex information to determine the geometry of the character as the skeleton moves according to the Java code.

My understanding is that David Yazel and the Magicosm team have developed just such a loader for files produced by the Flexporter plugin for 3D Studio Max. However, Flexporter requires that one have 3D Studio Max and the original graphics files. I have neither so I wondered if anyone has a loader for the more commonly available 3D file formats e.g. 3DS, MAX, OBJ, ASE, MD2 or any other - and that loads that skin/bones information.

Thank you,
-Paul
Offline LaLiLuLeLo

Senior Newbie




Foooocus!


« Reply #5 - Posted 2004-10-26 20:43:37 »

I don't think there's a format with a loader for Xith that will let you do that yet.  Sad
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #6 - Posted 2004-10-26 21:26:21 »

You have many requirements!  You will most likely have to code some stuff yourself for this.

Quote

To do that, I think I need a hierarchy of TransformGroups (eg. one for the torso, one for the upper arm, another for the forearm, the hand and so on).


I have adapted the ASE loader to handle this idea quite nicely.  I too "animate" in my code by transforming a tree of TransformGroups.  There is a chapter of the Getting Started Guide devoted to this.

Will.

Offline pauldb

Senior Newbie




Java games rock!


« Reply #7 - Posted 2004-10-27 07:31:48 »

Hi William,
yes I noticed that about the ASE loader.
However, my understanding is that that only works where the different body parts are separate graphics objects. That is not usually the case.

Nowadays, aren't most characters developed by artists as single meshes? In order to animate the character - from within the Java code (as opposed to using morphing between frames) - I need to relate each vertex in the mesh to a TransformGroup skeleton.

Creating the skeleton of TransformGroups is relatively easy. My problem is getting information from the graphics package about the relationship of each point on the mesh to each of the skeleton's bones.

I can attempt to write this myself but I was expecting it to be such a common requirement that it would have been done before now. Apparently, that is not the case.

Are all character animations included in games done by morphing between different frames? Those series of frames having been created in the graphics package.

Doesn't anyone control the characters' limb movements in the Java code? And use single mesh models?

I'm a little surprised,
-Paul
Offline JeramieHicks

Senior Newbie




Java games rock!


« Reply #8 - Posted 2004-11-03 02:22:39 »

You're talking about a standard skeletal single-mesh model. Being that it's probably the most common means of animating characters now, I don't know why people seem to be unclear on what you're talking about.

We do exactly this in our custom in-house 3D engine, using the Milkshape format (Milkshape is cheap and the file format is pretty trivial). We're in the process of recoding for Xith, and will be tackling this exact same issue for our Xith application in the near future. However, if it requires any Xith modifications (ie, can't be done on the application level) I doubt we'll be able to do it.
Offline LaLiLuLeLo

Senior Newbie




Foooocus!


« Reply #9 - Posted 2004-11-03 12:52:35 »

pauldb should be able to do his runtime/code animation with the MilkShape format. And I think we all could profit from a MilkShape loader as well.  Wink
Thanks
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline pauldb

Senior Newbie




Java games rock!


« Reply #10 - Posted 2004-11-03 17:42:26 »

Hi Jeramie,
I think people couldn't understand what I meant simply because I'm not very good at expressing myself.

I confess though that I would have been very surprised if noone was doing skeleton/single mesh animations.

I do mean moving the characters by changing the TransformGroups constituting the skeleton in the java code though - and not simply morphing between key frames generated by the graphics package. Which do you do? The former?

If so, I look forward to seeing your code when you submit it to Xith.

So you would recommend Milkshape as a format? Most models that I've come across though are in 3DS or MAX format. I'll look this up on the Milkshape website but do you have any experience of importing those models into Milkshape? If so, does it successfully import all the bones and vertex-bone/weighting information?

Thanks for your interest,
-Paul
Offline JeramieHicks

Senior Newbie




Java games rock!


« Reply #11 - Posted 2004-11-03 19:49:10 »

Well, our devs don't have access to any of the high end modelling packages, so we use TrueSpace (for environments) and Milkshape (for avatars). Milkshape is simple, cheap, and the file format is pretty trivial. We've had some of our people figure out how to do full imports from something like MAX into Milkshape, I think by first exporting to Unreal PSK and then into Milkshape. I'll have to ask our people how they did it.

What we're talking about is a fully custom posable internal skeleton that deforms the single mesh skin attached to it. We match pre-recorded joint animations to specific skeletons, and then we match specific skeletons to mesh skins... so one skeletal animation can be used for thousands of mesh skins, as long as they both use the same skeleton. Although we use pre-recorded skeletal animations, it's just as possible to do runtime skeleton movement calculations... it's just something that we personally don't need to do.

Now just to figure out how to do it in Xith...
Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #12 - Posted 2004-11-05 12:12:41 »

Stumbled across this thread because I am also looking for some skeletal single mesh framework/tool. A tool that I was looking at a year or two ago, is Dave Lloyd's "Short fuze". For some reason I haven't heard much about it elsewhere, but it looks very interesting. It could be that it isn't quite mature yet. One drawback is that I think some parts are not coded in Java, but in C/C++. The "Fuze3D Character Animation" seems to be a real port to Java of Cal3D (Character Animation Library). See:
http://www.shortfuze.co.uk/shortfuze/template/Fuze3D,Index.vm
http://cal3d.sourceforge.net/
I had a look at the cal3D demo and it looks quite nice, with animation blending and all sorts of goodies. Could actually be an option for me rather than direct control of bones from code.

Also have a look at his blog:
http://www.shortfuze.co.uk/roller/page/dave
Where he writes about file formats:
"Cal3D supports a very nice decomposition of skeletons, meshes, materials and animations". Not sure if that means that you have to load animations with the file or if you can control it directly from the program.

I will definitely download the stuff and have a look at it, but I am still not sure this is ready for production.

An old link that I have, was to:
http://www.j3d.org/utilities/bones.html
If anyone plans to do an implementation from scratch, this place has a simple joint, with two bones and "cylinder skin" if I remember correctly.

Another link is "The running man":
http://www.cs.princeton.edu/~cdecoro/HW6/
Maybe not so great looking, but still a "human" animation with skeleton and skin (looking at the knees, I think it has a non-weighted skin-bone joint?). Probably not strictly single mesh.

Since I already have started spamming you with links, here are two that I haven't really looked into, but potentially could be useful:
http://www.cg.tuwien.ac.at/studentwork/CESCG/CESCG-2000/RFilkorn/
http://www.cis.upenn.edu/~badler/book/book.html

Otherwise I guess we can only hope that Magicosm, JeramieH, or someone else will opensource their projects soon? Smiley

I hope this has helped more than it has confused.

If anyone figures out how to create a reasonable realistic human in Java, I have a game where the 2D renderer is just waiting to be replaced with a 3D one. I am quite happy to share all the fame and gold that it would generate. If you want to have a look at the game, you can go to:
http://valhallawebdesign.com/Tennis/  
or if you already have read the instructions you can start it here:
http://valhallawebdesign.com/Tennis/Tennis.jnlp

Greets, J

Offline JeramieHicks

Senior Newbie




Java games rock!


« Reply #13 - Posted 2004-11-05 12:26:43 »

Well, our company's previous engine was 100% propreitary (ie, we were making it up as we went along) and we've just started the Xith translation from scratch... so it could be a long while until we're caught back up to the skeletal avatar stage again.  Don't hold your breath on us, hopefully somebody else will add this functionality long before we reach that stage ourselves again... if not, I'll see what we can do about donating the code.
Offline Mithrandir

Senior Devvie




Cut from being on the bleeding edge too long


« Reply #14 - Posted 2004-11-05 22:06:33 »

Just to add some info about the j3d.org Code. Recently I've completely re-implemented the bones system from scratch and placed it in the j3d.org CVS. More correctly, it's an implementation of the ISO Humanoid Animation specification. (ISO/IEC FDIS 19774). Right now there's an abstract base set of classes. Then, from there there are various different rendering-API implementations. Aviatrix3D has both a software and shader implementation on top of that, and once I've finished a little more debugging, Java3D will have a software implementation to. With the Java3D one complete, porting it to run over Xith3D should be trivial.

The site for 3D Graphics information http://www.j3d.org/
Aviatrix3D JOGL Scenegraph http://aviatrix3d.j3d.org/
Programming is essentially a markup language surrounding mathematical formulae and thus, should not be patentable.
Offline pauldb

Senior Newbie




Java games rock!


« Reply #15 - Posted 2004-11-16 20:01:14 »

Thanks to everyone who responded.

Mithrandir,
I look forward to seeing your code ported to Java3D and Xith3D.

Which graphics file formats do you have loaders for?

Which file format would be your preference for skin + skeleton/bones animations?

If you have time, please could you give more details about your use of shaders in this context?

Many thanks,
-Paul
Offline NewbTon

Junior Devvie




Odejava games rock!


« Reply #16 - Posted 2004-11-17 13:36:46 »

I've developed a framework just for that, since every developer is so reluctant to create it. I've had just the same problems like you, alot of talk about loaders this, loaders that, this and that standard bla bla bla but nothing usefull. Take alook at this and tell me if you want to use it for your project. It's in java3d, and theres also a  builder to set up everything (skin/bones and if you want, animations). I can write a small manual if you want as well.

http://www.onlineboxing.net/boxing/main/applet3d/index.html
Offline aNt

Senior Devvie




AFK


« Reply #17 - Posted 2004-11-17 15:00:11 »

that would be cool- can it do 'transformation' animation?
cube1 moves around cube2- without a bone... but all in all
that would be great for xith3d
Offline pauldb

Senior Newbie




Java games rock!


« Reply #18 - Posted 2004-11-17 16:03:14 »

Hi NewbTon,
thanks for your reply and your very kind offer.

I would certainly like to know more. Is the code available online? Which file formats can you load?

If you are considering making your code available, there is actually a spin-off Java3D project specifically about skin & bones animation:

https://skinandbones.dev.java.net/

I'm sure alternative implementations would be welcome.

Anyway, please tell/show us more.
Thanks,
-Paul
Offline NewbTon

Junior Devvie




Odejava games rock!


« Reply #19 - Posted 2004-11-17 20:33:55 »

Quote
that would be cool- can it do 'transformation' animation?
cube1 moves around cube2- without a bone... but all in all
that would be great for xith3d


It can basically bind a skin to a skeleton. Weighting is supported, but it's not complete yet but enough to make it look ok. Then you can move different parts of the skeleton. Or you can use some helper classes ("Animation","Pose" etc). It uses obj file format with textures as well,  because it's simple and still very suitable for this purpose. I'll try to post a version very soon if anyone is interrested.
Offline pauldb

Senior Newbie




Java games rock!


« Reply #20 - Posted 2004-11-17 20:58:26 »

I think I speak for everyone when I say that you should definitely post it. I think it would be a very welcome contribution.

Thanks,
-Paul
Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #21 - Posted 2004-11-18 09:15:04 »

Quote
I can write a small manual if you want as well.

Quote
I'll try to post a version very soon if anyone is interrested.

Yes and yes!
I am sure a lot of ppl would appreciate that  Smiley
Q: Is the boxer animated using a skeleton, or is it a mesh loaded from file?
Looks very interesting. When do we get to contol the boxer and punch on an opponent?  Cheesy

Offline NewbTon

Junior Devvie




Odejava games rock!


« Reply #22 - Posted 2004-11-18 10:13:53 »

Quote


Yes and yes!
I am sure a lot of ppl would appreciate that  Smiley
Q: Is the boxer animated using a skeleton, or is it a mesh loaded from file?
Looks very interesting. When do we get to contol the boxer and punch on an opponent?  Cheesy

It's using a skeleton that you design yourself. The mesh is only about 200 kb. The animation data + mesh all together is about 250 kb. Extra functionality (controlling the boxer via keyboard, register punches hit thrown etc ) is easy, but you have to make that yourself.
Since you have access to all bones you can just add your own nodes here, check their  possition etc. But it's not build in yet.
The libraries is about skin/bones animation and nothing else. But with the focus  that it should be easy to use in any context you want.
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.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (51 views)
2014-12-03 16:27:13

CopyableCougar4 (49 views)
2014-11-29 21:32:03

toopeicgaming1999 (115 views)
2014-11-26 15:22:04

toopeicgaming1999 (103 views)
2014-11-26 15:20:36

toopeicgaming1999 (31 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

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
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!