Animation Library for SunBurn: sgMotion

rated by 0 users
This post has 150 Replies | 17 Followers

Top 10 Contributor
Posts 809
Employee
SunBurn_Studio_Licensee

Animation Library for SunBurn: sgMotion

SgMotion is the official open source animation library for the SunBurn Engine and SunBurn Framework.  Based on XNAnimation, sgMotion provides the same features with complete SunBurn integration.

SgMotion is developed by fellow SunBurn community member Tom Looman.

Top 10 Contributor
Posts 708
SunBurn_Community_Licensee
SunBurn_Contributor

Hi,

If people feel they need some kind of documentation or better comments within the code, please say so :) Any kind of feedback is much appreciated. 

As for the next update, that should be released right after the next sunburn update (ETA: unknown) I'd like to create some kind of documentation on how to quickly integrate the library in your own game. As well as using the recently updated XNAnimation source (As someone has recently decided to continue development on XNAnimation, which is great) And of course ready to use .dll's for both PC & Xbox. (Some naming inconsistencies will be fixed as well)

Again, if you guys have any feedback on sgMotion so far, feel free to reply :)

Contributor on the SunBurn sgMotion Animation Library open source project.

Top 50 Contributor
Posts 136
SunBurn_Community_Licensee
SunBurn_Contributor

Ooh, I might have to change over to this in my next project! I'm using my own modified version of XNAnimation right now but if this turns out to be easier/better, then definitely would be awesome!

Top 75 Contributor
Posts 56
SunBurn_Indie_Licensee
SunBurn_Pro_Licensee

This project is amazing. It works right out of the box with 1.3.1. SunBurn and sgMotion combined will save us weeks or months of work!

Top 500 Contributor
Posts 11
SunBurn_Community_Licensee

Hey Tom,

I have a feature request for you. It would be nice to have the SunBurn model processor properties exposed to the sgMotion model processor. This way we can take full advantage of the SunBurn processor while using sgMotion.

Thanks for the work you are doing!

Top 10 Contributor
Posts 708
SunBurn_Community_Licensee
SunBurn_Contributor

Hi,

I'll look into this. :)

Contributor on the SunBurn sgMotion Animation Library open source project.

Top 10 Contributor
Posts 708
SunBurn_Community_Licensee
SunBurn_Contributor

skitzogames:
I have a feature request for you. It would be nice to have the SunBurn model processor properties exposed to the sgMotion model processor. This way we can take full advantage of the SunBurn processor while using sgMotion.

I've done some work on this last week. Managed to add some of the properties to the processor list. Unfortunately I don't have time to finish it right now. With my current project deadline getting closer every day ;) I hope to release it right after the deadline has been reached with more time to spend.

(Any special properties you're particularly interested in? The "Apply Lighting Effect"-property is causing the model to lose its animations, so I hope you're not looking for that one in particular ;) )

ps. Has anyone tested sgMotion with deferred rendering? It should work as intended, but I haven't tested this myself yet.

 

Contributor on the SunBurn sgMotion Animation Library open source project.

Top 10 Contributor
Posts 6,116
Employee
SunBurn_Pro_Licensee
SunBurn_Studio_Licensee

Tom:
I hope to release it right after the deadline has been reached with more time to spend.

Cool, sounds good. :)

Tom:
Any special properties you're particularly interested in? The "Apply Lighting Effect"-property is causing the model to lose its animations, so I hope you're not looking for that one in particular ;)

We're not sure which properties the community is looking for, but I'm guessing the standard xna properties (generate mip maps, texture compression setting, ...) are probably the most important.

ApplyLightingEffect switches the processor back to BasicEffect, so that's definitely incompatible with skinning.

Tom:
ps. Has anyone tested sgMotion with deferred rendering? It should work as intended, but I haven't tested this myself yet.

Hmm, good call - deferred requires calling a deferred SunBurn processor from within sgMotion (currently calls the forward processor).  You might be able to add a property that switches between Forward and Deferred and internally calls a different SunBurn processor based on the setting.

Follow me on Twitter – development and personal tweets
Awesome XNA Videos – Lighting, Rendering, and game videos

Top 50 Contributor
Posts 112
SunBurn_Community_Licensee
SunBurn_Pro_Licensee

It doesn't seem to work with deffered rendering right out of the box.

Where does it call the forward processor? I can't seem to find it.

Top 10 Contributor
Posts 6,116
Employee
SunBurn_Pro_Licensee
SunBurn_Studio_Licensee

Hi andorov,

It's located in the sgMotionPipeline project, file SkinnedModelProcessor.cs, line 207 - change "LightingSystemModelProcessor" to "DeferredLightingSystemModelProcessor".

Let me know if this helps!

Follow me on Twitter – development and personal tweets
Awesome XNA Videos – Lighting, Rendering, and game videos

Top 10 Contributor
Posts 708
SunBurn_Community_Licensee
SunBurn_Contributor

I'll make sure to include a deferred processor in the next sgMotion release.

Contributor on the SunBurn sgMotion Animation Library open source project.

Top 50 Contributor
Posts 112
SunBurn_Community_Licensee
SunBurn_Pro_Licensee

Having some difficulty (boy, having a lot of difficulties as of late) in getting a bone's position.

Say I want to place a sphere at the center point of some bone... How do I get that transformation in absolute terms?

Tried lots of things.. logically, the following should work, no?

Matrix[] absTransforms = new Matrix[46];
SkinnedModel.Model.CopyAbsoluteBoneTransformsTo(absTransforms);

Matrix absoluteBoneTransform = absTransform[33] * animationController.SkinnedBoneTransforms[33] * skinnedModelTransform;

WeaponSceneObject.World = absoluteBoneTransform;

That should place the WeaponSceneObject directly on the bone, yes?

Top 10 Contributor
Posts 6,116
Employee
SunBurn_Pro_Licensee
SunBurn_Studio_Licensee

Hi andorov,

The animation system provides the absolute (not relative) animated bone transforms, so you do not need to combine them with the base pose contained in the Model (<- only correct when discussing the skinned mesh, "attached" items do need to be converted to the bone's bind-pose space before animating).

Also make sure to apply the skinned model's world transform to the weapon transform.

Example:

Matrix weapon_world = absoluteBoneTransforms[<hand index>] *
        animation.SkinnedBoneTransforms[<hand index>] * skinned_model.World;

Let me know if this helps!

Follow me on Twitter – development and personal tweets
Awesome XNA Videos – Lighting, Rendering, and game videos

Top 50 Contributor
Posts 112
SunBurn_Community_Licensee
SunBurn_Pro_Licensee

Nope, for some reason, still not there yet.

I think I will have to scrounge up 3DS Max and look at the source file. Something is definatley not correct. The bones are kind of there, and I can see them respond appropriatley but they appear to be scaled oddly.

The model animates correctly though.. :/ So I think there maybe more transformations I need to multiply in... just not sure which ones. :p

Top 10 Contributor
Posts 809
Employee
SunBurn_Studio_Licensee

Hi andorov,

Yes, sorry for the confusion, but attached objects like weapons and clothing do need to be transformed into the bone's bind-pose before animating.  I've updated my post, please see above for corrections.

Let me know if this helps!

Page 1 of 11 (151 items) 1 2 3 4 5 Next > ... Last » | RSS