Say Goodbye to Hitboxes
The limiting step on getting animated characters into Leadwerks is the creation of "hitboxes". Since vertex sknning is done entirely on the GPU, static boxes are attached to bones to approximate the shape of each limb. This works well and is efficient, but very tedious to set up. The zombie character pack, for example, would have been released much sooner if not for this task.
This morning I began with the intention of adding an option in the Model Editor to automatically calculate hit boxes for an animated model. However, I quickly realized this could be made completely automatic at load time.
I added a new pick mode called BoxPick, which you can probably guess does what. An Entity::SetPickBox() command was added. Then I modified the bone entity class. When a model is loaded, each bone automatically calculates its own pick box from any vertices in the model that are attached to that bone, with a weight of 50% or greater. The results are completely automatic hitboxes on all animated models that aliminate the need to manually attach these:
Combined with yesterday's convex decomposition update, the major bottlenecks in the model import process have been eradicated, making it easier for third party artists to add content to the Leadwerks Workshop. An update will be available later tonight with these additions.
- 8
2 Comments
Recommended Comments