• a_proportions help
    6 replies, posted
Hello Facepunch, for some time now I've always avoided a_proportions as I found it rather confusing with not that much information about it out there for me to feel confident about trying it (I'm aware of all the facepunch threads regarding this and ZeqMacaw's guide, etc. Though after trying it out today, I've ran into a problem which I'm not quite sure how to fix, in-game, the model is extremely thin: https://i.imgur.com/LLETeH3.jpg I've attempted messing around with it and trying different a_proportions QC lines but this one was the best that I could get the model without it looking like this, as before: https://i.imgur.com/MMO3QvH.jpg So I'm wondering if anyone else ran into this problem and if perhaps would know the answer to sorting this out, as mentioned before, I've read the guides on this but I'm still confused with this whole process, hoping someone could help me out. Here are the steps I taken to do this trick (simplified): Opened the Custom Mesh Imported the valve skeleton and matched it up with the custom mesh (I extended the arm, hand bones, etc.) Rigged the best to this skeleton After being done with the model, I imported the default skeleton Added constraints (Rotatio only) to the custom model skeleton to copy the rotations of the ValveBiped original skeleton Removed the constrains after the model was rotated in the ValveBiped manner then applied the bone rest pose, etc. Did LocRotScale on the model and exported it, naming the skeleton animation 'ragdoll' and 'reference' whilst naming the bones and the body 'proportions' Opened up the original ValveBiped model, LocRotScale and exported, naming this 'a_proportions". Went to the .QC and added the lines I found in the guides. This is where I am right now, I did those steps, which could be wrong, hence why I'm asking why this is happening. Here's the .qc for those wondering: // Created by Crowbar 0.42.0.0 $ModelName "konnie/valorice/valorice.mdl" $Model "valorice" "proportions.smd" $SurfaceProp "flesh" $Contents "solid" $MaxEyeDeflection 90 $CDMaterials "models\valorice\" $Attachment "eyes" "ValveBiped.Bip01_Head1" 2.3 -2.88 0.04 rotate 0 -80 -90 $Attachment "chest" "ValveBiped.Bip01_Spine2" 4 4 0 rotate 0 95 90 $Attachment "forward" "ValveBiped.forward" 0 0 0 rotate 0 0 0 $Attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" 0 0 0 rotate -90 -90 0 $Attachment "anim_attachment_LH" "ValveBiped.Anim_Attachment_LH" 0 0 0 rotate -90 -90 0 $Attachment "anim_attachment_head" "ValveBiped.Bip01_Head1" 0 0 0 rotate -90 -90 0 $CBox 0 0 0 0 0 0 $BBox -100.697 -36.701 -4.199 8.648 36.7 89.978 // $HBoxSet "default" // $HBox 1 "ValveBiped.Bip01_Head1" -1.85 -5.25 -4.7 9.4 4.5 4.7 "" // $HBox 4 "ValveBiped.Bip01_L_UpperArm" -1.6 -1.95 -1.8 9.55 2.5 2.25 "" // $HBox 4 "ValveBiped.Bip01_L_Forearm" -0.5 -2.5 -2.15 10.35 2.65 2.85 "" // $HBox 4 "ValveBiped.Bip01_L_Hand" 0 -2.07 -2.5 7 1.8 3 "" // $HBox 5 "ValveBiped.Bip01_R_UpperArm" -1.6 -1.95 -2.25 9.55 2.5 1.8 "" // $HBox 5 "ValveBiped.Bip01_R_Forearm" -0.5 -2.75 -2.65 10.35 2.65 2.15 "" // $HBox 5 "ValveBiped.Bip01_R_Hand" -0.5 -2.13 -3 7 1.8 2.75 "" // $HBox 6 "ValveBiped.Bip01_L_Thigh" 0.5 -4.05 -3.4 15.6 3.25 3.3 "" // $HBox 6 "ValveBiped.Bip01_L_Calf" 0 -2.75 -2.55 18.74 4.85 3.35 "" // $HBox 6 "ValveBiped.Bip01_L_Foot" -3.5 -2.85 -1.85 8.35 4.75 2.6 "" // $HBox 7 "ValveBiped.Bip01_R_Thigh" 0.5 -4.05 -3.3 15.6 3.25 3.4 "" // $HBox 7 "ValveBiped.Bip01_R_Calf" 0 -2.75 -3.35 18.74 4.85 2.55 "" // $HBox 7 "ValveBiped.Bip01_R_Foot" -3.5 -2.85 -2.6 8.35 4.75 1.7 "" // $HBox 3 "ValveBiped.Bip01_Pelvis" -7.35 -3.8 -4.4 7.35 4.12 5.8 "" // $HBox 3 "ValveBiped.Bip01_Spine1" -4.2 -2.3 -6.25 5 7.55 6.25 "" // $HBox 2 "ValveBiped.Bip01_Spine2" 0.25 -1.55 -6.3 10.55 9.7 6.3 "" // $SkipBoneInBBox $BoneMerge "ValveBiped.Bip01_Pelvis" $BoneMerge "ValveBiped.Bip01_Spine" $BoneMerge "ValveBiped.Bip01_Spine1" $BoneMerge "ValveBiped.Bip01_Spine2" $BoneMerge "ValveBiped.Bip01_Spine4" $BoneMerge "ValveBiped.Bip01_R_Clavicle" $BoneMerge "ValveBiped.Bip01_R_UpperArm" $BoneMerge "ValveBiped.Bip01_R_Forearm" $BoneMerge "ValveBiped.Bip01_R_Hand" $BoneMerge "ValveBiped.Anim_Attachment_RH" $Animation "a_proportions" "anims\a_proportions.smd" { fps 30 // This subtract line guesses the animation name and frame index. There is no way to determine which $animation and which frame was used. Change as needed. subtract "a_proportions" 0 } $Sequence "reference" { "anims\reference.smd" fadein 0.2 fadeout 0.2 fps 1 } $Sequence "ragdoll" { "anims\ragdoll.smd" activity "ACT_DIERAGDOLL" 1 fadein 0.2 fadeout 0.2 fps 30 } $Sequence "proportions" { "a_proportions" autoplay predelta fadein 0.2 fadeout 0.2 fps 30 // This subtract line guesses the animation name and frame index. There is no way to determine which $animation and which frame was used. Change as needed. subtract "a_proportions" 0 } $IncludeModel "f_anm.mdl" $IncludeModel "f_gst.mdl" $IncludeModel "f_pst.mdl" $IncludeModel "f_shd.mdl" $IncludeModel "f_ss.mdl" $IKChain "rhand" "ValveBiped.Bip01_R_Hand" knee 0.707 0.707 0 $IKChain "lhand" "ValveBiped.Bip01_L_Hand" knee 0.707 0.707 0 $IKChain "rfoot" "ValveBiped.Bip01_R_Foot" knee 0.707 -0.707 0 $IKChain "lfoot" "ValveBiped.Bip01_L_Foot" knee 0.707 -0.707 0 $IKAutoPlayLock "rfoot" 1 0.1 $IKAutoPlayLock "lfoot" 1 0.1 $CollisionJoints "valorice_physics.smd" { $mass 0 $inertia 10 $damping 0.01 $rotdamping 1.5 $rootbone "ValveBiped.Bip01_Pelvis" $jointconstrain "ValveBiped.Bip01_R_Thigh" x limit -12 12 0 $jointconstrain "ValveBiped.Bip01_R_Thigh" y limit -8 75 0 $jointconstrain "ValveBiped.Bip01_R_Thigh" z limit -97 32 0 $jointconstrain "ValveBiped.Bip01_R_Calf" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_R_Calf" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_R_Calf" z limit -12 126 0 $jointconstrain "ValveBiped.Bip01_L_Thigh" x limit -12 12 0 $jointconstrain "ValveBiped.Bip01_L_Thigh" y limit -73 6 0 $jointconstrain "ValveBiped.Bip01_L_Thigh" z limit -93 30 0 $jointconstrain "ValveBiped.Bip01_L_Calf" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_L_Calf" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_L_Calf" z limit -8 126 0 $jointconstrain "ValveBiped.Bip01_L_Foot" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_L_Foot" y limit -19 19 0 $jointconstrain "ValveBiped.Bip01_L_Foot" z limit -15 35 0 $jointconstrain "ValveBiped.Bip01_Spine" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_Spine" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_Spine" z limit 0 0 0 $jointconstrain "ValveBiped.Bip01_Spine2" x limit -48 48 0 $jointconstrain "ValveBiped.Bip01_Spine2" y limit -25 25 0 $jointconstrain "ValveBiped.Bip01_Spine2" z limit -25 50 0 $jointconstrain "ValveBiped.Bip01_R_UpperArm" x limit -39 39 0 $jointconstrain "ValveBiped.Bip01_R_UpperArm" y limit -79 95 0 $jointconstrain "ValveBiped.Bip01_R_UpperArm" z limit -93 23 0 $jointconstrain "ValveBiped.Bip01_L_UpperArm" x limit -30 30 0 $jointconstrain "ValveBiped.Bip01_L_UpperArm" y limit -95 84 0 $jointconstrain "ValveBiped.Bip01_L_UpperArm" z limit -86 26 0 $jointconstrain "ValveBiped.Bip01_L_Forearm" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_L_Forearm" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_L_Forearm" z limit -149 4 0 $jointconstrain "ValveBiped.Bip01_L_Hand" x limit -37 37 0 $jointconstrain "ValveBiped.Bip01_L_Hand" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_L_Hand" z limit -57 59 0 $jointconstrain "ValveBiped.Bip01_R_Forearm" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_R_Forearm" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_R_Forearm" z limit -149 4 0 $jointconstrain "ValveBiped.Bip01_R_Hand" x limit -60 60 0 $jointconstrain "ValveBiped.Bip01_R_Hand" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_R_Hand" z limit -57 70 0 $jointconstrain "ValveBiped.Bip01_Head1" x limit -20 20 0 $jointconstrain "ValveBiped.Bip01_Head1" y limit -25 25 0 $jointconstrain "ValveBiped.Bip01_Head1" z limit -13 30 0 $jointconstrain "ValveBiped.Bip01_R_Foot" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_R_Foot" y limit -25 6 0 $jointconstrain "ValveBiped.Bip01_R_Foot" z limit -15 35 0 } $CollisionText { animatedfriction  { "animfrictionmin" "1.000000" "animfrictionmax" "400.000000" "animfrictiontimein" "0.500000" "animfrictiontimeout" "0.300000" "animfrictiontimehold" "0.000000" } editparams  { "rootname" "valvebiped.bip01_pelvis" "totalmass" "70.000000" "jointmerge" "valvebiped.bip01_pelvis,valvebiped.bip01" "jointmerge" "valvebiped.bip01_pelvis,valvebiped.bip01_spine1" } } If this helps, this female skeleton came with a_proportions to begin with, though this is just extra info which could help towards fixing it, maybe not. Thank you for reading and to people that reply to this!
I think the most important part about the model is having it use the correct proportions, you could try for now removing all of the unnecessary parts to simplify the QC (save the old QC), this won't do anything but it will help, and maybe it will get fixed after deleting something that might have caused the error to happen. A more importart question: Is the model itself EXTREMELY small or did it become that small for some unknown problem? It's using normal player proportions, even if stretched the model itself would be way too small to use proportions, you can use it but a model that small is bound to create problems, besides, since we know it uses normal player proportions we can conclude that maybe you have the wrong order, did you make sure that you didn't switch a_proportions (how it should be) with reference (normal player proportions)? Lastly, if the problem itself is because of the process in the modelling software you could take a look at this thread: Custom playermodel the problem is only slightly related to yours, but it contains a video that helps show the first steps of using proportions in the software, making sure the model itself isn't the problem is also very important, and once you nailed down the process you'll wonder why you thought it was hard in the first place.
Thanks for your swift reply, what would you deem unnecessary in the .qc? I know the basics of .qc's but there isn't much that I would deem unnecessary there unless I'm getting it all wrong, there were 2 attachments which aren't used which I deleted, I've also read on that thread that IKChains are bad for you with a_proportions, so I removed those too, apart from that I don't know what else isn't needed. For your 2nd question about the size of the model, I've just realised that I didn't scale it up, I kept forgetting to apply visual transformation which after opening up the file again, made it shrink again, this actually got the model to work for me in-game; So a huge thank you for that! I've never seen that tutorial before and it seems to be really good as far as I watched it, I was hoping for a video tutorial but couldn't find one before, this will help definitely, and a good resou rce to others when starting with this. Though, now I'm facing another problem, the model now seems to be stretching to fit the ValveBiped model, which is what I don't want, as that ruins the a_proportions purpose, here's a little image of what I mean (the last text says 'Female Reference') https://i.imgur.com/egydZ17.jpg What could I do to fix this, appreciate your help so far by the way! Perhaps a different line of code would do the trick?
You're actually very much close to being finished, and seeing the model it probably won't have any more problems. As for the unnecessary parts, I was talking about REALLY cutting it dry, removing $cbox, $bbox and $hbox if you don't plan on it having critical hitboxes, those are all done automatically, $collisiontext has no place in a playermodel as far as I can say, $maxeyedeflection are useless if the model has no eyes, $contents solid is the default value so it can also be removed, lastly the attachments, you can keep them but most weapons and addons use bones anyways instead of attachments, as they should since most people forget to add them in the first place. Now onto the MEAT of the problem, usually when the model is still stretched out when using proportions it means that the "a_proportions" use the position that "reference" should use, "reference" is the normal size for a player, so it should have a single frame of animation of the valve biped t-posing, "a_proportions" is exactly the same as "ragdoll", I used to copy and paste "ragdoll" and just rename it, both are the proportion (hence the name) you want the model to follow, so, if you already replaced all of the bones just do the same as the "reference". As for the last part, the code is pretty much always the same, and hey, if it works there's no need to change it... that being said you can change it, I rummaged through my folders and found this used in one of my older addons: $sequence reference "anims/reference.smd" fps 1 $animation a_proportions "anims/a_proportions.smd" subtract reference 0 $sequence proportions a_proportions predelta autoplay it's old and I'm not sure if it works, but it is an alternative and past me hasn't deleted it, so that's a good sign.
Hey, sorry for still pestering you about this issue but I'm still having problems, I did what you said and removed the poinless lines in the .qc and then re-did the reference, ragdoll and a_proportions, as before I had them the wrong way round but this time having ragdoll and a_proportions as the same file just different names and reference being the original valve biped, I'm still having the same issue with this unfortunately. I've added the code you sent and done the steps (I believe so anyways, I re-read it several times and attempted to do it again making sure I'm doing each step correctly, even swapping the reference to be proportions, etc. with no avail). What else could I possibly doing wrong? As mentioned before, you got me really far into this model and regardless of if I get it to work or not, I'm thankful for the help and you teaching me the a_proportions. Here's my .qc if you'd like to take a look at it: // Created by Crowbar 0.42.0.0 $ModelName "konnie/valorice/valorice.mdl" $Model "valorice" "proportions.smd" $SurfaceProp "flesh" $CDMaterials "models\valorice\" $BoneMerge "ValveBiped.Bip01_Pelvis" $BoneMerge "ValveBiped.Bip01_Spine" $BoneMerge "ValveBiped.Bip01_Spine1" $BoneMerge "ValveBiped.Bip01_Spine2" $BoneMerge "ValveBiped.Bip01_Spine4" $BoneMerge "ValveBiped.Bip01_R_Clavicle" $BoneMerge "ValveBiped.Bip01_R_UpperArm" $BoneMerge "ValveBiped.Bip01_R_Forearm" $BoneMerge "ValveBiped.Bip01_R_Hand" $BoneMerge "ValveBiped.Anim_Attachment_RH" $sequence reference "anims/reference.smd" fps 1 $animation a_proportions "anims/a_proportions.smd" subtract reference 0 $sequence proportions a_proportions predelta autoplay $IncludeModel "f_anm.mdl" $IncludeModel "f_gst.mdl" $IncludeModel "f_pst.mdl" $IncludeModel "f_shd.mdl" $IncludeModel "f_ss.mdl" $CollisionJoints "valorice_physics.smd" { $mass 0 $inertia 10 $damping 0.01 $rotdamping 1.5 $rootbone "ValveBiped.Bip01_Pelvis" $jointconstrain "ValveBiped.Bip01_R_Thigh" x limit -12 12 0 $jointconstrain "ValveBiped.Bip01_R_Thigh" y limit -8 75 0 $jointconstrain "ValveBiped.Bip01_R_Thigh" z limit -97 32 0 $jointconstrain "ValveBiped.Bip01_R_Calf" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_R_Calf" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_R_Calf" z limit -12 126 0 $jointconstrain "ValveBiped.Bip01_L_Thigh" x limit -12 12 0 $jointconstrain "ValveBiped.Bip01_L_Thigh" y limit -73 6 0 $jointconstrain "ValveBiped.Bip01_L_Thigh" z limit -93 30 0 $jointconstrain "ValveBiped.Bip01_L_Calf" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_L_Calf" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_L_Calf" z limit -8 126 0 $jointconstrain "ValveBiped.Bip01_L_Foot" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_L_Foot" y limit -19 19 0 $jointconstrain "ValveBiped.Bip01_L_Foot" z limit -15 35 0 $jointconstrain "ValveBiped.Bip01_Spine" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_Spine" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_Spine" z limit 0 0 0 $jointconstrain "ValveBiped.Bip01_Spine2" x limit -48 48 0 $jointconstrain "ValveBiped.Bip01_Spine2" y limit -25 25 0 $jointconstrain "ValveBiped.Bip01_Spine2" z limit -25 50 0 $jointconstrain "ValveBiped.Bip01_R_UpperArm" x limit -39 39 0 $jointconstrain "ValveBiped.Bip01_R_UpperArm" y limit -79 95 0 $jointconstrain "ValveBiped.Bip01_R_UpperArm" z limit -93 23 0 $jointconstrain "ValveBiped.Bip01_L_UpperArm" x limit -30 30 0 $jointconstrain "ValveBiped.Bip01_L_UpperArm" y limit -95 84 0 $jointconstrain "ValveBiped.Bip01_L_UpperArm" z limit -86 26 0 $jointconstrain "ValveBiped.Bip01_L_Forearm" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_L_Forearm" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_L_Forearm" z limit -149 4 0 $jointconstrain "ValveBiped.Bip01_L_Hand" x limit -37 37 0 $jointconstrain "ValveBiped.Bip01_L_Hand" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_L_Hand" z limit -57 59 0 $jointconstrain "ValveBiped.Bip01_R_Forearm" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_R_Forearm" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_R_Forearm" z limit -149 4 0 $jointconstrain "ValveBiped.Bip01_R_Hand" x limit -60 60 0 $jointconstrain "ValveBiped.Bip01_R_Hand" y limit 0 0 0 $jointconstrain "ValveBiped.Bip01_R_Hand" z limit -57 70 0 $jointconstrain "ValveBiped.Bip01_Head1" x limit -20 20 0 $jointconstrain "ValveBiped.Bip01_Head1" y limit -25 25 0 $jointconstrain "ValveBiped.Bip01_Head1" z limit -13 30 0 $jointconstrain "ValveBiped.Bip01_R_Foot" x limit 0 0 0 $jointconstrain "ValveBiped.Bip01_R_Foot" y limit -25 6 0 $jointconstrain "ValveBiped.Bip01_R_Foot" z limit -15 35 0 } If you want, I can send you the original files so you can look into it yourself, I'd pm you the link but newpunch doesn't have pm's since I last checked, if you'd like this option, you can message me on Discord and I can send you a download there: Konnie#1620 Thanks again!
After analyzing the model I forgot about a crucial part of the model which I should've noticed when viewing the QC, a_proportion only works with ikchains , these babies that got deleted: $IKChain "rhand" "ValveBiped.Bip01_R_Hand" knee 0.707 0.707 0 $IKChain "lhand" "ValveBiped.Bip01_L_Hand" knee 0.707 0.707 0 $IKChain "rfoot" "ValveBiped.Bip01_R_Foot" knee 0.707 -0.707 0 $IKChain "lfoot" "ValveBiped.Bip01_L_Foot" knee 0.707 -0.707 0
Grodbert managed to help me out with this model entirely, from literally having no idea what to do to doing and helping me out through each step! To people that are looking at this in the future: Be sure to watch the video in the thread that Grodbert linked in his 1st post here, it explains the process and how to fix some issues like bent legs, which occured with my model and that fixed it. IKChains are important to have, a_proportions and ragdoll animations are the models 'altered' bones, reference is the default valve biped you use animation. If the model is looking anorexic, it's probably way too small. Thank you again to Grodbert for the help and good luck to other out there with a_proportions, there aren't many resources out there but I provided simplified steps of what I did to make my model in the first post, good luck and thanks for reading!
Sorry, you need to Log In to post a reply to this thread.