Separate meshes and animation data - Printable Version +- Xonotic Forums (https://forums.xonotic.org) +-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10) +--- Forum: Xonotic - Development (https://forums.xonotic.org/forumdisplay.php?fid=12) +--- Thread: Separate meshes and animation data (/showthread.php?tid=3560) |
Separate meshes and animation data - MirceaKitsune - 10-07-2012 I've been thinking about a better concept in regard to animated models (specifically players). I don't know if this is already possible with iqm, so it might require engine changes first. My suggestion is to separate model files and animation data, similar to how skins / textures are separated from the model itself. Currently, exporting player models requires the final iqm file to contain the mesh, skeleton and the animations. I'm suggesting that instead, the player's iqm only contains the mesh and skeleton with no animation data. Animations would either be a separate file, or preferably a folder where each animation is its own file. The character configuration would then specify the animation package to use (eg: xonotic-data.pk3dir/models/player/erebus.iqm_0.txt). Obviously, this means the skeleton of the model must contain the same bones the animation file is meant to work with. If however there are bones in the mesh that don't exist in the animation, don't animate them... whereas if there are bones in the animation that the mesh doesn't have just ignore them. This would allow some freedom on the rig if someone adds or removes unimportant bones. Ideally, each animation would only reference and address the bones it needs to move, rather than having a list with all of them. There are mainly three reasons why I'd like this feature. The most important one is that this would not require editing and exporting all player models when a new animation is added to the code (like the crouch-strafing or shotgun slap were). I recently had to re-rig one of my meshes to the Erebus skeleton in Blender so I could update the animations on it. If animations were kept separate, one would simply make a new animation, export it, place it in the correct folder, and it work. No need for anyone who's created a player model in the past to modify their meshes... once again as long as they don't modify the skeleton on their mesh. Second reason is that this would allow configuring multiple characters using the same model to use different animations. Say someone decides to make a zombie based on the Ignis model. He doesn't need to modify the model itself and can only create a zombie version of the texture as a new skin. However, he'd want the character to walk and crawl like a zombie. For this he'd need to maintain a parallel version of the Ignis mesh, with a different set of animations. If animations are separate, he can create those independently or use an animation set made by someone else. You could also make each character use a specific walk cycle and movements with skins. Third reason is file size. Less important since animation data doesn't take up a lot, but it's always a good thing to not duplicate something when you don't need to. Since we have LOD's too, each LOD model has to contain the same animation data, which is pretty pointless. And as long as Erebus and Nyx don't move differently, why duplicate the same animations in each? My question is if DarkPlaces currently supports separate animations for the IQM format. If it does, are there instructions on how to export them in Blender? If so and the other developers agree, I can try to do this for all official models and put my changes on GIT. RE: Separate meshes and animation data - Mr. Bougo - 10-07-2012 EDIT3: Nevermind this whole post. Just see the url in the first paragraph. The rest of this post is stupid. Based on a very vague reviewing of the iqm compiler (not the Blender plugin) at https://github.com/lsalzman/iqm, it seems you can already separate .iqe files into an anim-less model and an anim file. See the README.txt in that git repo. You could just export from blender to .iqe and separate the animation field (it's a text file basically) into a separate source file for animation that can then be reused for different models. As for using a separate anim file for compiled models, what you're proposing is to make a new format based on IQM. The IQM format is not specified in the way you're proposing, so the end result would certainly not be a standard IQM file. EDIT: Oops. It seems you can compile standalone animations to .iqe without a mesh. This indicates that engines could actually implement support for separate animations, maybe? I don't know. EDIT2: Disclaimer: I have no idea what I'm talking about RE: Separate meshes and animation data - s1lence - 10-07-2012 Would this increase performance at all? RE: Separate meshes and animation data - MirceaKitsune - 10-07-2012 (10-07-2012, 08:02 AM)Mr. Bougo Wrote: EDIT3: Nevermind this whole post. Just see the url in the first paragraph. The rest of this post is stupid. Interesting find. I wonder if the Blender IQM script can be modified to work with it, and if DarkPlaces needs any modifications. Doesn't matter if the format is called iqe or something else as long as it works well. Will ask more about this, worth trying out. (10-07-2012, 12:13 PM)s1lencer Wrote: Would this increase performance at all? Theoretically it should... in practice it would likely be unnoticeable. The engine would however load fewer data on startup when it gets to the player models, which would also cause less memory to be used in total. But again it would likely be unnoticeable... maybe helps on older machines just a little bit. RE: Separate meshes and animation data - .Danny. - 10-08-2012 http://www.youtube.com/watch?v=-UcXDCEkm5s&feature=plcp Perhaps these guys might be helpful? Completely out of my universe btw... RE: Separate meshes and animation data - hutty - 10-08-2012 This would be very very helpful ... Not only for xonotic machinamas :3 RE: Separate meshes and animation data - MirceaKitsune - 10-08-2012 .Danny. Interesting video. That indeed sounds like a good technique. Anyway, I spoke to LordHavoc about this on IRC, and apparently there wold be some ways to get it working. Sadly I forgot to ask him exactly how you bind an iqm skeleton to an iqm mesh... maybe someone else knows? Quote:[15:36:54] <Taoki> divVerent, LordHavoc: http://forums.xonotic.org/showthread.php?tid=3560 A curiosity and / or feature request I had about meshes and animations RE: Separate meshes and animation data - HellYeah - 10-23-2012 Could you implement this please. The hardest thing about making a character for xonotic is animating, when the existing animations are perfectly fine but we cannot use them. Modeling apps like make human allready support exporting /with/ the xonotic player skeleton to blender. They added that feature months ago. (Also second life skeleton and others). It is basically impossible for most people to make characters because of the animation requirement. You could add it to the character.txt file where the species and age is allready held. You could put an optional field animationfile: and that could usually be erebus.iqm Please make this happen. RE: Separate meshes and animation data - Mr. Bougo - 10-24-2012 GhasianToon, I hope you'll catch this message because I couldn't send you mail. I merged your account into your former one "HellYeah" because you didn't have to re-subscribe to change your email to a domain that wasn't banned. Sorry for being offtopic in this thread. If you want to respond to this message, please do so in PM. RE: Separate meshes and animation data - Morphed - 11-05-2012 Just create iqms from halflife2 .smd files, they have separate mesh and animations, and unlike .iqe EVERY 3d modeling software have importers and exporters for them. I was asking to use this way for our player models when we started xonotic, but nobody listen. RE: Separate meshes and animation data - Mr. Bougo - 11-05-2012 (11-05-2012, 04:43 AM)Morphed Wrote: I was asking to use this way for our player models when we started xonotic, but nobody listen. Does this mean nobody saw your suggestion, or do you mean you got counterarguments that you did not find convincing? RE: Separate meshes and animation data - HellYeah - 11-08-2012 You really need to make this happen. LordHavoc, the Lord of all of Nexuiz and Xonotic and many other Quake based games. Lord of Havoc said it could be done. So let it be done! We need a trailblazer on this issue. The animations are hard to do. |