Animation Library for SunBurn: sgMotionSgMotion 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.
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.
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!
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!
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!
I'll look into this. :)
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.
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 tweetsAwesome XNA Videos – Lighting, Rendering, and game videos
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.
It's located in the sgMotionPipeline project, file SkinnedModelProcessor.cs, line 207 - change "LightingSystemModelProcessor" to "DeferredLightingSystemModelProcessor".
Let me know if this helps!
I'll make sure to include a deferred processor in the next sgMotion release.
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;SkinnedModel.Model.CopyAbsoluteBoneTransformsTo(absTransforms);
Matrix absoluteBoneTransform = absTransform * animationController.SkinnedBoneTransforms * skinnedModelTransform;
WeaponSceneObject.World = absoluteBoneTransform;
That should place the WeaponSceneObject directly on the bone, yes?
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.
Matrix weapon_world = absoluteBoneTransforms[<hand index>] * animation.SkinnedBoneTransforms[<hand index>] * skinned_model.World;
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
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.