Bone attachments
Is there any other way to parent an entity to a model at a particular bone that doesn't have a predefined attachment? Or am I s.o.l?
I'm looking to use a Chell model holding a portal gun, so the gun would have to attach to the weapon_bone of the Chell model.
In Hammer's model viewer there seem to be 2 models for Chell. 1 "proper" model (player\chell\player.mdl) with textures and working animations, but the only attachments defined are for parts on the head, none involving the weapon_bone. The other model (player.mdl -- not in a subdirectory) is not textured and most of the animations don't appear to work, but it does have a defined weapon_att attachment for the weapon_bone. In that same directory there is also a player_animations.mdl which I would figure is involved in giving that model proper animations, but I don't know how that works.
I would try to edit the .qc file from the first Chell model and hope that nothing breaks between de- and re- compiling, but the only MDLDecompiler program I've found seems dated and keeps crashing on me.
FelixGriffin wrote:
Yeah, nothing with animations will ever decompile right. Sorry.
Pessimistic much?
Actually, with the right program, you can get it to decompile correctly. The only problem is Valve is not about to give you THEIR compiler. Without it, yes, the decompile will fail to work correctly.
protoborg wrote:
The only problem is Valve is not about to give you THEIR compiler.
Sounds stupid. Valve doesn't need any decompiler! They have ALL SMD files.
And yes, decompiling Portal 2 models is a bit tricky. There is something called "MDLDecompiler 0.5 by Cannonfodder # Fixed & Patched by Hooch". It works better than the last version Cannonfodder released, at least for Left 4 Dead 1 and 2 models.
For Portal 2 it works better, too. But you still have to copy some of the VTX files and give them names with .90, because this MDL decompiler still needs "the old" files that are now missing in the new MDL version.
FelixGriffin wrote:
So far I've managed to get one glitchy gesture SMD file that launches the right arm off.
You do know that the gesture of launching your right arm off is perceived as highly offensive in some cultures, right?
I didn't even know that bones could detach in animations, or that gesture_turn_right_180 had detaching bones.
Have you tried opening the decompiled SMDs in something like Blender and see if they play correctly there? (You need to import the reference SMD first, then import the animation you want.)
If you don't know how that works, I can have a look if you PM me the SMD files.