gmcbay

Great work on XNA GSE 1.0! I downloaded it today and signed up for the 360 Creator's Club. Getting the basic engine code I've been working on under Windows for the past few weeks compiling and running on 360 was far easier than I was expecting (though it would be nice if the IDE had better support for projects that target both platforms).

One aspect of the engine I've been avoiding for a while is mesh animation, as there has been talk around here for weeks that a sample would be released and I'd much rather start from a sample, even if it is very simplistic, than dig though the documentation enough to figure out how all the classes fit together. So my simple question is.. any updates on this sample Has it been made available and I'm just not seeing it If not.. days, weeks, months I don't expect anyone to commit to a specific release date, but having a very vague estimate could help me decide whether or not to take the plunge and try to create something from scratch or just wait and put the effort into other features for right now.

Also, if anyone has any links to non-official skeletal animation code samples (in XNA/C#), that could be useful. I don't need something I can drop in like a black box to my engine or anything like that, but it is just way easier/faster for me to get a sense of how various classes interconnect by looking at working code than it is by pouring through dry documentation.

Thanks in advance for any information.




Re: XNA Framework Animation sample?

Shawn Hargreaves - MSFT

Our skinning sample is on its way through the release process, but I can't predict exactly how long this will take, sorry.





Re: XNA Framework Animation sample?

David.Fei

you can visit http://www.codeplex.com/animationcomponents, there are some cool job related with bone animation. it also have some C#/XNA code sample and animation lib source, but it is still developing.



Re: XNA Framework Animation sample?

gmcbay

Thanks for the link but that component is LGPL licenced and given the way the linking for C#/GSE works (at least when supporting the 360 where we can't deploy libraries as DLLs) the LGPL is pretty much the same as if it were GPL, practically speaking. I'll keep waiting for the MS sample and/or roll my own if I run out of things to work on before they release it.

I really wish the MS/GSE team would reconsider their whole sample release policy. While I understand the red tape that can be involved when releasing things from a large organization like MS, with a brand new just-at-1.0 project like XNA/GSE, having so few samples to look at is pretty dreadful. You guys could probably save me 4 hours of slogging through the documentation by releasing a partial, non-fully-working couple of dozen line code sample that shows the gist. I'd much rather have something partial even if it is non-optimal or slightly buggy than nothing at all.






Re: XNA Framework Animation sample?

leclerc9

 gmcbay wrote:

Thanks for the link but that component is LGPL licenced and given the way the linking for C#/GSE works (at least when supporting the 360 where we can't deploy libraries as DLLs) the LGPL is pretty much the same as if it were GPL, practically speaking.  I'll keep waiting for the MS sample and/or roll my own if I run out of things to work on before they release it.  

 

 I really wish the MS/GSE team would reconsider their whole sample release policy.  While I understand the red tape that can be involved when releasing things from a large organization like MS, with a brand new just-at-1.0 project like XNA/GSE, having so few samples to look at is pretty dreadful.  You guys could probably save me 4 hours of slogging through the documentation by releasing a partial, non-fully-working couple of dozen line code sample that shows the gist.   I'd much rather have something partial even if it is non-optimal or slightly buggy than nothing at all.

 



 

 What are the restrictions of the LGPL license in this case   I wanted to make it as available to use as possible.  The license is primarily intended for indemnity from harm.

 





Re: XNA Framework Animation sample?

Jim Perry

gmcbay wrote:
I really wish the MS/GSE team would reconsider their whole sample release policy. While I understand the red tape that can be involved when releasing things from a large organization like MS, with a brand new just-at-1.0 project like XNA/GSE, having so few samples to look at is pretty dreadful. You guys could probably save me 4 hours of slogging through the documentation by releasing a partial, non-fully-working couple of dozen line code sample that shows the gist. I'd much rather have something partial even if it is non-optimal or slightly buggy than nothing at all.

If it were buggy people would be screaming at the top of their lungs. Anybody who's followed the industry knows this for a fact. Patience, more is coming.






Re: XNA Framework Animation sample?

Jon Watte

Because the assembly is "strongly linked" with the application code, the application code must be made available as a "re-linkable" component, so that someone can change the LGPL component, and still run the original application, linked with the new component. That's an annoyance to actually comply with.

The best license if you just want it to be free, is to put it into the public domain, which I believe means that nobody can claim you caused them harm, but also anyone can claim authorship of derivative works. If that's too broad, then I would use an MIT or BSD style open source license, which specifically address the lack of remedy for damages, and copyright, while allowing
unlimited use without annoying linkage restrictions. Pretty much any open source I release is MIT licensed.

Of course, I'm not a lawyer, so if you really want to know how these licenses apply to your particular situation, you should pay for advice from a licensed law professional, rather than believing something you read for free on the internet...





Re: XNA Framework Animation sample?

Blake Johnson

It wouldn't need to be official, it could just be a post on one of the developer's blogs and I think we'd all be happy until the approved one is posted. Maybe even just a post about the general ideas involved, just something to point us in the right direction. I think everyone's concern is that they will spend hours trying to implement their own animation framework which may or may not work, just to find out that they didn't do it the "Right Way" and wasted their time.

Just my $0.02.





Re: XNA Framework Animation sample?

leclerc9

Jon Watte wrote:
Because the assembly is "strongly linked" with the application code, the application code must be made available as a "re-linkable" component, so that someone can change the LGPL component, and still run the original application, linked with the new component. That's an annoyance to actually comply with.

The best license if you just want it to be free, is to put it into the public domain, which I believe means that nobody can claim you caused them harm, but also anyone can claim authorship of derivative works. If that's too broad, then I would use an MIT or BSD style open source license, which specifically address the lack of remedy for damages, and copyright, while allowing
unlimited use without annoying linkage restrictions. Pretty much any open source I release is MIT licensed.

Of course, I'm not a lawyer, so if you really want to know how these licenses apply to your particular situation, you should pay for advice from a licensed law professional, rather than believing something you read for free on the internet...


Thanks. Since I haven't made an official release (only alpha), is there any rule against me changing the license




Re: XNA Framework Animation sample?

gmcbay

As the original author of the code you can change the license at any time, even if you'd already made dozens of 'official' releases, it is your code, you can do what you want with it.   Or you can even make it available under multiple licenses if you really wanted to.    The only problem with changing an open source license is if other people contributed code to the project already because technically those people own the copyright to their own code in your project and thus you need the permission of everyone who has contributed code before you can change the license, which can be a huge pain in the ass to get.  But again, that only applies if other people have contributed code.  If the code is all yours, you can change the license at will.

If you did make your component available under the BSD or MIT licences, I'd be a lot more interested in looking at it and potentially using it.  I'd also be willing to contribute changes back if I modified it/fixed it/extended it in any way that was useful.  I'm not anti-open source (I've contributed code to various open source projects in the past, including the nebula device engine, etc), I'm just not fond of the GPL and for the practical linking reasons Jon mentioned, the LGPL is  essentially as restrictive as the GPL is when it comes to XNA code (I don't mind using LGPL code on the PC where I can easily separate it out into a DLL and thus abide by the legal restrictions without too much trouble).

 

And on the other point, I agree with Blake.  I realize that if Microsoft makes an official starter kit or whatever it needs to be pretty well tested, but there are a number of areas in XNA where just a few line sample would save someone hours of documentation trolling.  In this case, I'm familiar with the specifics of skinned animation in general, but I haven't yet looked at how all the classes relating to this task that exist in XNA fit together.  I could probably grok this relationship in about 5 minutes if I had just a simple dozen line code example to look at, but starting from nothing but documentation the same amount of understanding will take hours.  I don't see why the XNA developers couldn't post such basic how-tos just on a blog or whatever as unofficial but useful snippets.  This is the sort of thing that won't be an issue in the future because I'm sure the developer community will fill the gap with wikis and such, but for right now, with XNA being so new, it would really be helpful to have such snippets for some things, with animation being the most obvious.

 

 






Re: XNA Framework Animation sample?

Jon Watte

We have discussed the specifics in this forum already. Check out the discussions from right after beta 2 was released.

In brief: The content pipeline imports the bones and the animation tracks. You can convert the matrices to quaternion + position and create serializable versions of these, and hook them up into a data structure, which you add to the "Tag" property of the output mesh. Write your own serializer and de-serializer (content pipeline style -- it's documented), and you can then lift the animation data out of the Tag on the loaded model.

When it comes to actually play the animation, it's not that hard. Interpolating quaternions and positions is a known procedure, and lerping between multiple animations is also similarly straightforward. Then take those concepts, and apply them to the keys that you get out of the Tag, and generate matrices that way. I made that work for hierarchical/rigid animation in a week-end of banging at it.

What we had problems with was the mapping from animation data to skinned skeleton bone indices. I gave up and moved on to other things (physics and collision detection), but others kept going. We also later found a function in the content pipeline to flatten a bone hierarchy (skeleton) to numbered bones in a way that's guaranteed to work the same way as the skinned mesh, so the numbering problem was solved, but I haven't gotten back into animation yet, so I haven't verified it.

The main thing missing is the functionality to break a model with large numbers of bones into multiple subsets, and get a separate bone array for each subset. In D3DX, that exists, and helps when running large models on VS1.1 cards, but if you target 2.0 and up, I think you can mostly ignore it. Sending quaternion + position + uniform scale per bone is only two constant registers, so you can do 120 bones on a PS2.0 card.






Re: XNA Framework Animation sample?

Rob Epler

Jon Watte wrote:
We have discussed the specifics in this forum already. Check out the discussions from right after beta 2 was released.

How about a link

Jon Watte wrote:
Then take those concepts, and apply them to the keys that you get out of the Tag, and generate matrices that way. I made that work for hierarchical/rigid animation in a week-end of banging at it.

Do you have the code posted somewhere





Re: XNA Framework Animation sample?

mod_five

I think Microsoft has done a good job with XNA, especially from the 2D side. But, I think all the Microsoft-ies here (not an insult, btw) are making much too small of a deal of the difficulty and confusion that an 'emerging' game developer has to engage basic 3D model animations in XNA. And, isn't that the type of person XNA was supposed to be a bright shining beacon for   If not, who is the XNA project supposed to address   This XNA framework was touted as being very simple to use. In the launch - such a big deal was made about how easy it is to display 3D models. Remember the whole "5 minutes to a 3d model" spiel But, honestly, who cares about a model of an Orc which can move left, right, up and down but not walk, jaunt, scratch or taunt Motion's the key! How many minutes to that   Where's the source code and demos on that   While inspired by your work, I don't know why you'd exit beta without having this stuff ready.  And, generally, I think there should be some better support for doing 3d Model animations. If there wasn't a demand for simplicity, guys wouldn't be coming out with "animation frameworks" for use with C#/XNA.  Blah, blah, blah.  And, hey, I'm not saying Microsoft should solve all the problems for us.  Don't need a game engine from you guys. Collision detection, multiplayer support, etc. -.net and XNA have given us the basics to do that ourselves.  Plus, it's pretty easy.  But... some added value / simplicity on the 3d Anim support, I beg!

Oh yeah, and you guys rock.

Cyrus Amiri
mod_five@hotmail.com




Re: XNA Framework Animation sample?

Jim Perry

There's a lot of great games that can be made without going 3D so why would they wait on the release Yes, there's some holes, but the community has come up with patches for some (except the GUI thing, which is a sizeable undertaking). I'm happily plugging away already so the animation deal isn't hurting me. Most hobbyists probably aren't going to go 3D anyway so it's not as big a deal as it appears to be IMO.




Re: XNA Framework Animation sample?

cybereality

I'm going to have to side with mod_five on this one. XNA really should have had basic animation support from day one. I dont mind waiting for it to be done properly, but XNA should be in beta 3 in that case. 1.0 release should be feature complete and animation is a *huge* feature. While it can be said that the community will pick up the slack, its a bit of a cop-out. The whole point of XNA was to allow aspiring game developers to get in there and start coding a game. Not coding their own 3d mesh format and animation system and basically re-inventing the wheel. This is exactly what XNA is supposed to be avoiding.

Very well. I'm just going to concentrate on 2D games until the 3D libraries and samples are a bit more up to speed. Its just disappointing because if it were not for this one missing feature I could drop the 3d engine I'm currently working with for XNA. Which I'd love to do, but boned animation is a must.