Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Separate meshes and animation data

#1
Brick 
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.
Reply

#2
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 Tongue
Reply

#3
Would this increase performance at all?
Reply

#4
(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.

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 Tongue

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.
Reply

#5
http://www.youtube.com/watch?v=-UcXDCEkm5s&feature=plcp

Perhaps these guys might be helpful? Completely out of my universe btw...
Reply

#6
This would be very very helpful ...

Not only for xonotic machinamas

:3
Reply

#7
.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
[01:21:03] <@LordHavoc> Taoki: useless
[01:21:09] <@LordHavoc> Taoki: this is by-design
[01:21:23] <@LordHavoc> Taoki: the .iqm format is intentionally meant to be used for meshes OR animations in one file, or both
[01:21:47] <@LordHavoc> Taoki: you can simply make a mesh-only iqm (don't put any animation frames in it, just the base pose) and then a series of animation iqm's where you delete the mesh and just animate the skeleton
[01:22:12] <@LordHavoc> Taoki: a good exporter should make this easier with like a checkbox for "No mesh"
[01:22:48] <@LordHavoc> Taoki: more importantly, this requires use of the SKELETON_OBJECTS extension
[01:23:17] <@LordHavoc> Taoki: because what you do is invoke the animation blend with a different model than the skeleton was made for, but the model is a compatible one
[01:23:34] <@LordHavoc> Taoki: so you're applying bones from an animation-only iqm to a mesh-only iqm
[01:25:49] <Taoki> LordHavoc: I see. No chance of it getting implemented then? Also, someone mentioned this would be possible... you'd export the skeleton to iqm and mesh to iqe or something
[01:26:00] <@LordHavoc> Taoki: you misunderstand
[01:26:11] <@LordHavoc> TACO: .iqe is a large format that is only intermediate use on the way to making a .iqm
[01:26:13] <@LordHavoc> err
[01:26:15] <@LordHavoc> Taoki: .iqe is a large format that is only intermediate use on the way to making a .iqm
[01:26:32] <@LordHavoc> Taoki: .iqe is not supported by the engine, nor will it be, it isn't efficient
[01:27:15] <@LordHavoc> Taoki: .iqm can contain mesh, can contain animation, always contains skeletal rig
[01:27:34] <@LordHavoc> Taoki: so you could rename .iqm to other names to distinguish but it would be useless
[01:27:56] <@LordHavoc> Taoki: the important bit is that the engine lets you render a model (that has mesh) with animations from another model (that has no mesh)
[01:28:16] <@LordHavoc> Taoki: you can store every player animation in a separate .iqm file if you like, and the mesh in another
[01:28:22] <Taoki> Ah, it is good then
[01:28:35] <Taoki> Doens't matter if I export an iqm with the skeleton and another with the mesh
[01:28:41] <Taoki> That sounds like what I'd want
[01:28:46] <@LordHavoc> if you want LOD support in the engine, that would be a different kettle of fish, and more directly target this problem
[01:29:32] <@LordHavoc> LOD is a bit of a thorny issue because it has to be consistent for multiple uses of the same entity or else you get shadow zfighting and such (if the LOD was picked differently for the lighting than for the shadowing for example)
Reply

#8
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 Smile

Please make this happen.
Reply

#9
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.
Reply

#10
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.
Reply

#11
(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?
Reply

#12
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.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] How to build data AriosJentu 5 3,697 08-14-2019, 08:18 AM
Last Post: Freddy
  Question and Rant on the LG and MG changes. GegoXAREN 5 5,950 11-26-2012, 04:16 PM
Last Post: hutty
  Mounting packed Xonotic data with fuse Nodenum 8 10,561 02-07-2012, 02:47 AM
Last Post: Mr. Bougo

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-