Generated Gore Dismemberment Kit
System allows to dismember characters, create broken bones and wound effects. Whole logic is implemented into single Actor Component and Data Table. That allows the quick setup and management for many characters with different properties. Everything is written with Blueprints, no C++ involved. Code and variables are commented and categorized.
Creating broken gore bones doesn't require model editing and steps from 1 to 4.
This is a guide for users that already know how to weight their models, import from and export to UE4. Expanded version of the tutorial (or short video) will be created to cover basic topics like ‘how to export’ or ‘how to set the weights’, if requested.
- Prepare your skeletal meshes for dismemberment.
- To do this, the part you want to break needs to have its own unique polygons/vertices where you’d want to break it. UE4 will not break your meshes, only the bones, your meshes must already come “pre-broken”. To be sure it’s correct, in 3dsMax go to sub-object -> element, select the one you’d want to break and move it, if you see stretching then it won’t break off. It needs to look breakable like this:
- Using Gore Kit, it's easier and faster to remove vertices that you don't need, e.g. torso for human-like creature. That way we have 5 body parts and can export it as a whole model to UE4, Gore Kit will do the rest of the work.
- Modify the bone weights so that the breaking bone (e.g. head bone) fully affects the breakable element of the mesh and nothing more (ie. the neck bone needs to have zero influence on the head section, and the head bone to have zero influence on the neck).
- After export to UE4 make sure your "body parts character" uses the same Physics Asset of your original character or newly generated. What you’ll really be breaking isn’t really the bones of the character, but the phys bodies attached to those bones instead. This means that for a bone to be breakable, there needs to be a phys body specifically attached to that bone in your Phys Asset (bodies attached only to child bones won’t work).
- In the DataTable create a new row and choose Blueprint that uses this character model. In the bottom list of body parts, create 5 elements and set bones names for them (Head, UpperArm_L, UpperArm_R, Thigh_L, Thigh_R). For each of these 5 elements set the same mesh (our exported cutted body parts model) or different, if body parts were exported separetely.
- On event when character takes damage, call the function "TryToDismember" of the GoreComponent instance.