Hello FacePunch,
I am an Administrator at one of the top Spanish Garry's Mod servers and I need help.
We have some problems with some skins not having head hit boxes so I decided to take a further look into this. I managed to decompile the .mdl file for a HL2 skin and now I have 4 files: 3 are ".smd" and 1 is ".qc".
I tried using a HLMV but every time I import the .mdl file it just crashes out and I'm not sure what to do with the other 4 files I got from decompiling.
I am trying to fix these hit boxes for improvements in our server and help would be EXTREMELY thanked.
Any suggestions how I can edit the head hit boxes?
All the best,
Seriialz
Thank you
The problem might actually be either the skeleton that was used got messed up or the phymodel (physics model) was not done to all of the body parts meant to move (head, leg, arm, etc.).
[QUOTE=Pinhead Larry;43644990]The problem might actually be either the skeleton that was used got messed up or the phymodel (physics model) was not done to all of the body parts meant to move (head, leg, arm, etc.).[/QUOTE]
The hit boxes are there the only thing is that it doesn't have a head shot one. Well it does in the .QC file, but I'm guessing the max and min coords are wrong for it... That's why I'm trying to get into the mdl or something to see if I can edit them and then recompile the whole model fixed
[QUOTE=Pinhead Larry;43644990]The problem might actually be either the skeleton that was used got messed up or the phymodel (physics model) was not done to all of the body parts meant to move (head, leg, arm, etc.).[/QUOTE]
The phymodel really only handles the ragdoll's movement and such. Anything else is handled specifically by the bones.
[QUOTE=Seriialz;43645093]The hit boxes are there the only thing is that it doesn't have a head shot one. Well it does in the .QC file, but I'm guessing the max and min coords are wrong for it... That's why I'm trying to get into the mdl or something to see if I can edit them and then recompile the whole model fixed[/QUOTE]
I'd be careful with that. When you decompile a model it usually just spits out some of the basic QC commands that [i]might[/i] let you get it recompiled. Depending on how well the model was made and compiled, you might be losing optimization in the process. If you send me the model, I'll see if I can open it in modelviewer for you.
[QUOTE=Seriialz;43645093]The hit boxes are there the only thing is that it doesn't have a head shot one. Well it does in the .QC file, but I'm guessing the max and min coords are wrong for it... That's why I'm trying to get into the mdl or something to see if I can edit them and then recompile the whole model fixed[/QUOTE]
[QUOTE=CaptainBigButt;43646308]The phymodel really only handles the ragdoll's movement and such. Anything else is handled specifically by the bones.
I'd be careful with that. When you decompile a model it usually just spits out some of the basic QC commands that [i]might[/i] let you get it recompiled. Depending on how well the model was made and compiled, you might be losing optimization in the process. If you send me the model, I'll see if I can open it in modelviewer for you.[/QUOTE]
Ah, thanks for clarifying CaptainBigButt. Hope either of us can help you Seriialz. CaptainBigButt might be better at assisting you because I am busy porting some models over to Garry's Mod. If anyone needs me, let me know!
Hey,
Thanks for the replies.
@CaptainBigButt: [url]http://www.mediafire.com/download/0p3b3v47fedfr2i/Dremora.rar[/url]
This is the player model I am trying to edit
Seriialz
The hitboxes on this model are autogenerated.
Auto (Daedric):
[IMG]http://i.imgur.com/gWYLWSc.png[/IMG]
Manual (playermodels, NPCs, etc):
(Apparently SFM modelviewer has a weird render bug for me, so that large yellow hand hitbox doesn't even actually exist).
[IMG]http://i.imgur.com/2DZswsN.png[/IMG]
Basically this model was compiled without hitboxes and instead the author chose to let modelviewer autogenerate the boxes for every bone. I'm not sure why it works for other areas but not the head, though if you change the hitboxes on this model, I'd just drop the citizen hitboxes on and edit them to fit this mesh since the current ones aren't really going to help you much at all.
And is there any way I can use that player model (Daedric) but create the hitboxes myself?
Here is a useful addon to see how the hitboxes for your model look: [url]http://steamcommunity.com/sharedfiles/filedetails/?id=219747243&searchtext=[/url]
[QUOTE=Pinhead Larry;43682187]Here is a useful addon to see how the hitboxes for your model look: [url]http://steamcommunity.com/sharedfiles/filedetails/?id=219747243&searchtext=[/url][/QUOTE]
I managed to open the model in HLMV and it has automated hit boxes. I still can't understand why the head one doesn't work yet all the others do...
[QUOTE=Seriialz;43690219]I managed to open the model in HLMV and it has automated hit boxes. I still can't understand why the head one doesn't work yet all the others do...[/QUOTE]
Try making the hitboxes manually. That should probably do the trick. One question, does your model have a head bone?
[QUOTE=Seriialz;43690219]I managed to open the model in HLMV and it has automated hit boxes. I still can't understand why the head one doesn't work yet all the others do...[/QUOTE]
[QUOTE=Pinhead Larry;43706674]Try making the hitboxes manually. That should probably do the trick. One question, does your model have a head bone?[/QUOTE]
You guys are silly, but I already explained that. The model's hitboxes are auto generated for every bone rather than manually generated and grouped (see the pictures above). Models automatically generate hitboxes if they are not made manually, but if you give the model hitboxes manually then it'll use those instead. The easiest thing you can do is compile the model with citizen hitboxes and try it in-game. If the hitboxes are working properly, take it back to HLMV and adjust them so they match the model a little better. Note that the hitbox only needs to cover the fleshy areas -- shooting the horns on the Daedric's helmet is just shooting metal so it wouldn't exactly damage you. I reccomend viewing how hitboxes cover citizens before adjusting just to be sure.
Anyway, [URL="http://pastebin.com/Y90DgXMQ"]here's[/URL] the basic male05 hitbox.qci file. Just drop this in the QC or save it as hitbox.qci and add [ $include "hitbox.qci" ] (without the brackets) to your QC to keep it a little cleaner and easier to work with. To actually edit the hitboxes, just use the Bones tab in modelviewer and adjust the values at the bottom right and then click update hitbox until it's aligned the way you want it to be.
That should cover it hopefully, but let me know if I missed anything.
SO if the playermodel I'm using doesn't have a head bone how can i add a headshot hitbox?
I am using the Left Shark model on my TTT server and the stupid designer of the model didn't make a headshot hitbox. As you can imagine this creates huge advantages in aim fights.
(For your convenience here is the model extracted with the decompiled files as well: [url]http://pwnageentertainmentnetwork.com/sharkfiles.zip[/url] )
(also my bad for doing this on a 11 year old post <3)
Dammit stop decompiling playermodels. Use originl sources with proper hitboxes:
[url]https://github.com/robotboy655/gmod-animations/raw/master/gm_playermodel_examples.7z[/url]
[editline]10th March 2017[/editline]
If you already messed up, just pick up hitbox qci file from that archive and include it into your qc
Sorry, you need to Log In to post a reply to this thread.