My model has hitbox data I don't want and can't get rid of

Got problems with your models? Struggling with textures? Get help with your custom assets.

My model has hitbox data I don't want and can't get rid of

Postby 2007CA on Thu Jan 06, 2011 10:57 pm

Basically I'm trying to edit one of Valve's handrail cluster apartment stairwell models into just a single upward rail. Everything seems to work so far except the hitbox data which is either from the model I began editing or simply incorrect. I don't know where such data is located or how editing it is done. Any help in this matter would be appreciated.
2007CA
Member
Member
 
Joined: Mon May 17, 2010 6:09 pm

Re: My model has hitbox data I don't want and can't get rid

Postby Smurftyours on Fri Jan 07, 2011 3:54 am

Your hitbox data you are referring to is called a collision mesh. You need to edit it to fit the new model too.
jangalomph wrote:Wise words from a wise man. ^
User avatar
Smurftyours
Senior Member
Senior Member
 
Joined: Tue Aug 04, 2009 6:11 pm
Location: California, US.

Re: My model has hitbox data I don't want and can't get rid

Postby 2007CA on Fri Jan 07, 2011 5:46 pm

Smurftyours wrote:Your hitbox data you are referring to is called a collision mesh. You need to edit it to fit the new model too.


I'm pretty sure that I did.
Image
Image
2007CA
Member
Member
 
Joined: Mon May 17, 2010 6:09 pm

Re: My model has hitbox data I don't want and can't get rid

Postby ScarT on Sun Jan 09, 2011 12:49 pm

In HLMV go to the "Bones" tab. Set the bone to whatever hitbox you want to edit. Using the X Y Z edit boxes you can change the origin and size of your hitbox. Press generate QC, paste the information in your clipboard into your QC. Recompile the model with this information.
User avatar
ScarT
Senior Member
Senior Member
 
Joined: Sat Apr 02, 2005 7:33 pm
Location: Denmarkian Land

Re: My model has hitbox data I don't want and can't get rid

Postby tron00 on Sun Jan 16, 2011 7:02 am

ScarT wrote:In HLMV go to the "Bones" tab. Set the bone to whatever hitbox you want to edit. Using the X Y Z edit boxes you can change the origin and size of your hitbox. Press generate QC, paste the information in your clipboard into your QC. Recompile the model with this information.


This is one of the most useful posts I've seen in a long time. Thanks!
User avatar
tron00
Regular
Regular
 
Joined: Wed Jul 01, 2009 6:32 am
Location: Cincinnati, Ohio, USA

Re: My model has hitbox data I don't want and can't get rid

Postby tron00 on Sun Jan 16, 2011 10:32 am

ScarT wrote:In HLMV go to the "Bones" tab. Set the bone to whatever hitbox you want to edit. Using the X Y Z edit boxes you can change the origin and size of your hitbox. Press generate QC, paste the information in your clipboard into your QC. Recompile the model with this information.


This was very helpful but can you expand on this? I always thought the red lines below showed the collision model. In HLMV, I can adjust the hitbox, which I did. But the red lines show it at 90 degrees. What am I missing? Can I fix this with HLMV?

I've noticed when I decompile / recompile some models to reskin them my model ends up at 90 degrees in-game.

Image
User avatar
tron00
Regular
Regular
 
Joined: Wed Jul 01, 2009 6:32 am
Location: Cincinnati, Ohio, USA

Re: My model has hitbox data I don't want and can't get rid

Postby tron00 on Sun Jan 16, 2011 10:34 pm

Sorry, to beat this to death but you guys always teach me a lot. With the above model, I fixed it by turning the phymodel.smd 90 degrees in 3DS Max, and then recompiling.

I guess I still don't understand the difference between the collision mesh and a hitbox. In the model below that I reskinned, the collision looks right but the hitbox is off. Do I need to fix this one, too?

Image
User avatar
tron00
Regular
Regular
 
Joined: Wed Jul 01, 2009 6:32 am
Location: Cincinnati, Ohio, USA

Re: My model has hitbox data I don't want and can't get rid

Postby Gradius on Mon Jan 17, 2011 3:11 am

Collision models are purely for physics and player movement stuff. Hitboxes register player and enemy attacks though (so if you shoot the head of an enemy they die quicker than if you shoot their feet, etc).
So a moving enemy would only really have a huge cubeoid for a collision model but a far more detailed set of hitboxes.
User avatar
Gradius
1337 p0st3r
1337 p0st3r
 
Joined: Thu Aug 27, 2009 2:52 pm

Re: My model has hitbox data I don't want and can't get rid

Postby tron00 on Mon Jan 17, 2011 4:11 pm

Okay, thanks. I've seen some models with no hitbox. Are they optional, then?
User avatar
tron00
Regular
Regular
 
Joined: Wed Jul 01, 2009 6:32 am
Location: Cincinnati, Ohio, USA

Re: My model has hitbox data I don't want and can't get rid

Postby Gradius on Mon Jan 17, 2011 6:31 pm

I'd certainly assume so unless you want the object to react depending on where you hit it.
User avatar
Gradius
1337 p0st3r
1337 p0st3r
 
Joined: Thu Aug 27, 2009 2:52 pm

Re: My model has hitbox data I don't want and can't get rid

Postby crazycarl on Tue Jan 18, 2011 2:04 am

Hit boxes are generated automatically unless you specify them in the QC file. I think if you put in an empty hitbox set, you will end up with no hitboxes.

You'll notice the QC files that MDLDecompiler creates do have the $hbox and $hboxset commands. If you delete those lines, studiomdl will generate new hitboxes for you.
crazycarl
Been Here A While
Been Here A While
 
Joined: Tue Jan 12, 2010 9:12 pm

Re: My model has hitbox data I don't want and can't get rid

Postby tron00 on Tue Jan 18, 2011 7:23 am

Awesome.. Thanks guys for all of the great information!
User avatar
tron00
Regular
Regular
 
Joined: Wed Jul 01, 2009 6:32 am
Location: Cincinnati, Ohio, USA

Re: My model has hitbox data I don't want and can't get rid

Postby 2007CA on Sun Feb 13, 2011 4:09 pm

Figured out how to make some new hitbox data, thanks for your help. Thought that would fix the problem of placing it accurately in hammer, but it doesn't. Seems there's also some kind of "Seq. Box" that doesn't fit correctly around my model earlier, and I think this is why its hammer positioning is weird. Can anyone tell me about this?

EDIT: Seems as if an LOD model was in the wrong position and that kind of messed up everything, now the Seq. Box seems to match like it should.
2007CA
Member
Member
 
Joined: Mon May 17, 2010 6:09 pm

Re: My model has hitbox data I don't want and can't get rid

Postby 2007CA on Sun Feb 13, 2011 4:23 pm

One strange thing though. When I select my model in hammer, it vanishes in the wireframe views. Otherwise it behaves as normal.

EDIT: Seems it's missing a $staticprop line in its .qc file? Will check.
2007CA
Member
Member
 
Joined: Mon May 17, 2010 6:09 pm

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users