Hitboxes preview

Users who are viewing this thread

mtarini

Sergeant Knight
Next version will let you see hitboxes as defined in Data/SkeletonBodies.xml ...

In case you are curious, here are the hitboxes native game uses for human and horses!
hitbox_human.png

hitbox_horse.png


 
can we modders edit the hitboxes? I'd love to smooth it out and make the hitbox out of the man body mesh. :wink:
 
Short answer, no; you can just adjust the sizes and offsets of the capsules.  Don't fret; you never noticed how blobby they were before, and with a bit of work (and this visualization) you could make characters with unusual proportions match up quite nicely.

This really is going to be incredibly handy, for people wanting to make humanoids with non-standard proportions.
 
I had noticed a bit before. I play games like halo reach and halo ce anniversary, where the hotbot literally is so close to the body that it's insane (once shot a rocket an inch from an elites leg, recorded it, and it didn't blow up). I just wanted to see it in mb :wink:
 
Great! Now, will OpenBRF allow us to change those or will we need to edit the text files, refresh to check the effect, and re-edit the text until we come to the right size?
 
Specialist: I'm not an expert but my first reaction at looking at these hitboxes is that they were already a bit too complex. Having hitboxes for Feet and shoulders seems maybe a little excessive, in the optics of finding a good balance between computational-burden and shape-fidelity.


Mandible: Very good question! :wink: 

For now, just edit-text-of-xml => refresh.

For later, I was thinking of letting hitboxes be exported as an editable mesh, so that you edit it in 3D outside openBRF, then re-import it back with a special command, similarly to what is already there for skeletons. That would sure be useful, but it would also take me to write not only the re-importer itself (a piece of codes which tries to understand which capsule you meant to use, by looking at the generic shape of the 3D mesh), but also the piece of code which exports the results inside the XML. Both are possible...

But first, let me commit a version with what we have now.
 
True...

So, in editing the XML..how exactly would I edit the hitboxes in, say, a copy, so that I could make both the original for men and women, and then make a custom race with a custom skeleton and custom HB?
 
Answer:

Step 1: duplicate a human skeleton in openBRF, modify it and and rename it.

Step 2: open skeleton_bodies.xml (inside data folder) in a text editor, copy-paste human skeleton there (it's some easily identified 20 lines), change its name to match the name used in step 1. XML is easy to edit (it's like HTML).

Step 3: in you module_skins.py, duplicate a race into a new race, make it use the new skeleton.

Step 4 (optional): right click on the new skeleton, pick "add it to reference skeletons"; that way you will be able to use the new skeleton in the future to preview your animations and your rigged objects.

These steps are needed even now to add a skeleton.

(If you omit Step 2, it has the weirdest effect: your new race will have no hitbox so it cannot be hit at all--this might infact be an usueful trick for modders, to grant invulnerability or the like).

Nothing of that has anything to do with hitbox customization. These steps were needed before, and will be needed even after (and if) I'll make openBRF customize hitboxes and save them in XML. That file includes also other information (for ragdolling, like the fact that knees bend in only one direction etc), so it is needed anyway.


Now the customization part: open brf (next version), see the new skeleton (or an animation and set it to use the new skeleton), check "view hitboxes", edit manually xml file, hit F5 (refresh). OR, you might want to wait for the version that lets you edit them more intuitively in 3D, as described 2 posts above.
 
Now that is great! The trick/bug is useful, since I need to make a troop that is invisible and therefore can't be hit. Thanks for the info though. :wink:

then I suggest you still duplicate the data, only delete the hitboxes only, and leave the rest. Safer this way. mtarini
 
Update: since cheking intersections is useful here, I've made the rendering in a way that hopefully helps to visualize how much the hitbox intersects the mesh, as clearly as I could, like this:
hitbox_human_2.png


By the way, that's the hitbox M&B used before WB... it has a fatter head (easier headshots?), no collision for feet, and has a gap between abdomen and chest... (unless I'm interpreting it wrong after all, which is unlikely at this point).
 
Love the rendering method, that's really going to work well.

Huh, that's really funky; the head hitbox is well under where the head actually is visually; I may have a strong urge to fix that if it's still that goofy in Warband, I don't mind if hitboxes are a little big but I don't like them to be offset that much.
 
it is much better in warband actually. You can see it yourself with the last version, but here's a side to side:

hitbox_mab.png
hitbox_wb.png
vanilla M&B
vanilla WB
 
Yeah, they fixed it.  I am so, so tired tonight, I do not think I can get the walker in... maybe tomorrow tho, I'm not too busy.  Really looking forward to playing with this but my eyes are starting to cross, lol.
 
Carefully looking close, I found that I probably did an interpretation error on that hitbox data.

Details: by trial and error, and by looking at the vanilla hitboxes,
I at first came to the conclusion that (X,Y,Z) in XML file
had to be mapped to (-Z, X, -Y),
but now I think I discovered they should actually gets mapped to (Z, X, -Y).

Difference is very small (as almost all vanilla hitboxes have X which is zero, so it makes very little difference) BUT now I've seen that, where it does make a difference (that is, only in upper arm of WB human), it is a closer match mapping X to Z, not -Z. So I assume that's the way the game interprets it.

Just uploaded the corrected version (0.0.70b)
 
Just stretch the head a bit. It bugs me when it happens as well (headshots in WW3 are always hard to guage, since it may hit over the hitbox)
 
Back
Top Bottom