Tried asking for help in "Ports and Hacks Thread" about a week ago because I couldn't find any "General Questions" thread, but got nothing so here goes.
I'm new to modelling, have never modelled anything myself and the only small experience I have so far with models is changing stuff around in the .qc files (to add custom animations and whatnot) and sometimes opening the .smd files in blender to delete less useful bones should a model have too many for Crowbar to compile.
I'm trying to use a model from the gmod workshop to replace Mossman in a hl2 mod, but on models which have long hair, said hair just stays in crazy positions instead of being affected by gravity. I tried to put a higher value in tip_mass in all the $jigglebone is_flexible properties but that didn't change anything. The only solution I've found is to remove all the $jigglebone instances from the .qc file, but that just makes the hair static which doesn't look good. Also this happens to any body part which has a $jigglebone.
Is this something related to the source code of the mod itself?
What I mean:
https://files.facepunch.com/forum/upload/110175/36010232-683a-422e-b0a5-da6b719b04e2/photo_2018-07-10_09-31-26.jpg
(Hope the model author doesn't mind, this is a private project which at this moment I don't intend to release to the public.)
Jigglebones aren't affected by gravity (or even animations as far as I am concerned), the problem is that the hair's bones are set in that position as default, and since it wasn't a playermodel (I assume) it should have not been a problem since you could pose it's hair, to fix it you simply have to change it's "ragdoll.smd" animation until the hair are in a good position, set the position and recompile it.
If it was a playermodel and this error happened only when you gave the model to mossman... good luck I assume, that shouldn't happen.
Oh. I keep using the NPC variants of the models as replacement. I thought that was what made sense, because NPC replaces NPC and whatnot. I'll try using the playermodel variant if it has one.
It keeps happening even with the playermodel variant. Is there any tutorials I can follow on changing the ragdoll.smd animation as you said?
I tried replacing the custom model's ragdoll.smd with mossman's and the hair works nicely but now the model's torso and arms are way too stretched (probably to make up for mossman's height). I tried editing mossman's ragdoll.smd in blender but I can only edit it in Pose Mode which I think changes nothing. In Edit Mode all the bones are at the same position, same rotation.
I now have more questions than answer, such as the following:
Is there a pic of the model in a T-Pose?
Is there a link to download the model or for the addon page?
Are there NPC and Playermodel variants?
If the above is yes, how does the NPC variant fare?
By replacing the original model's ragdoll with mossman's you broke the proportions, which this model 100% uses, but if the hair bones are not included in mossman's, then doesn't that mean that the default rotation of the hair is downwards? THEN WHY ARE THEY BROKEN IN THE ORIGINAL?
Piece of answer this was, it has more questions than the original post does, sorry if this wasn't useful at all, but hopefully when everything will be clarified things will start working again, modelling in source is more straight forward than coding, so if there's a problem most likely it was a human error, and not the engine's, this means that finding out the culprit once you realize what's happening is way easier (and actually possible).
Sorry for the late answer, I just had to try every single way I know so far with every single model variant. Anyway here goes.
I didn't know which T-Pose you meant so I got both in-game and in blender:
https://files.facepunch.com/forum/upload/110175/d86ab04e-b1fd-4f49-8c29-963743234f01/t-pose.png
https://files.facepunch.com/forum/upload/110175/8ef31068-323b-4b6a-8b1b-c5f92baf80ae/t-pose_blender.png
Addon workshop link:
https://steamcommunity.com/sharedfiles/filedetails/?id=870523620
So basically there are 3 model variants. Player, NPC Friendly and NPC Enemy.
Playermodel Variant (default_p.mdl)
1-When I straight up replace mossman with the custom model, the model is in permanent T-Pose (makes sense since I didn't change the QC file at all to contain the mossman animations). However, the jigglebones work perfectly.
2-When I replace all of the custom model's $includemodel with mossman's in order for it to have mossman's animations, the animations work perfectly and it has the correct body proportions but the jigglebones go crazy as seen on the OP.
3-When I remove the following from the QC file (because mossman's model doesn't use those):
$animation "dewobedil" "mossmank_anims\dewobedil.smd" {
fps 30
}
$sequence "error" {
"dewobedil"
autoplay
predelta
fadein 0.2
fadeout 0.2
fps 30
}
$sequence "reference" {
"mossmank_anims\reference.smd"
fadein 0.2
fadeout 0.2
fps 1
ikrule "rhand" release
ikrule "lhand" release
ikrule "rfoot" release
ikrule "lfoot" release
}
I get the wrong body proportions as seen here:
https://files.facepunch.com/forum/upload/110175/4c763613-a07b-497f-bf7c-0914173b2ab8/longboi.png
(mossman animations still work as seen in the screenshot)
4-When I replace the custom model's $includemodel with mossman's (for the animations) and simply replace the ragdoll.smd file with mossman's (Maintaining the original $animation and $sequence). The result was the same as in the OP. (Correct body proportions, messy jigglebones)
Friendly NPC Variant (default_f.mdl)
1-I had actually never noticed this (probably because I never tried a direct replacement before without adding the custom animations from mossman) but this one kind of works. (No T-Pose, correct behaving jigglebones, correct body proportions) Except it doesn't have the mossman animations of course, so although it walks around fine, it just stays there when a special mossman animation should be playing.
2-Same result as with the playermodel variant.
3-Same result as with the playermodel variant.
4-Same result as with the playermodel variant.
Enemy NPC Variant (default_e.mdl)
1-Same as Friendly Variant except it constantly runs instead of walking and is holding an invisible weapon. This I guess is due to the fact it's using combine_soldier_anims.mdl.
2, 3 and 4 are exactly the same as Friendly NPC Variant.
Here is a pastebin of Crowbar's compile log just in case: mossman
Really sorry for the huge post. I just want to make sure every detail is clear so we can easily identify what I'm doing wrong.
In case you're still looking for a response, did you decompile the model first or were you given source files to start with?
I decompiled the model.
Decompiling it is never perfect. Crowbar lets you get much further than before but it can still cause minor issues requiring the QC to be fixed for proper alignment of jigglebones and proportion adjustments.
Sorry, you need to Log In to post a reply to this thread.