THE MODEL ITSELF IS OWNED BY MY ALT, NOT THIS MAIN ACCOUNT, FYI
Hello everybody! Recently, I stumbled upon a post of a user who had made a destruction module but it was just not equipped to be used as a community resource, and so I rewrote it, added some features, and without further ado, I present Vex!
Vex is a module created to convert parts to smaller voxel parts, to allow you to make fully destructible buildings and environments, provided they are regular parts.
How to Install and Use It
- Grab the model from here: Vex - Roblox
- Put it in Replicated Storage.
- Read the provided documentation in the post, and begin using it!
Documentation
- Voxelize - Used to turn a part, or a model consisting of only parts in voxels. Parameters are the model you want to convert.
destructionWrapper.voxelize(game.Workspace.MahHouse)
Pros and Cons of Vex (Current)
- Pros
- Extremely simple to use.
- Simplifies destruction.
- Is a way to have destruction for nearly anything, with little effort.
- Physics-based, meaning stuff adheres to gravity.
- Cons
- Only parts are supported, for now.
- It is not optimized for large-scale destruction.
- Voxels are only cubes of 1x1x1 for now.
Examples
Here is an open-source place, so that you may see it before you download it, and learn how it is implemented! DestructionTest - Roblox
Quick note + Disclaimer
Currently, Vex is designed to be used on a small scale, so it will lag when used for a lot of voxelization at once or if it is attempting to destroy a ton of voxels at once. For the sake of letting your game run, only voxelize parts that NEED to be destructible, and do it WHEN they need to be destructible and good practice is to just destroy voxels that are being destroyed.
Future Plans
- Heavy optimization because it is trash currently.
- A greedy meshing system for the sake of optimization?
Voxel size that adheres to parts outside of 1 stud increments.(VERSION 1.5)
- Yes, I would use this in my game the way it is!
- Maybe, if it was more developed and polished.
- No, I would not. (Tell me why in the replies!)
0 voters
I do hope that you enjoy using Vex, please report any bugs you find in the replies, and be sure to let me know what you would like to see in the next version!
If you know of a good way to optimize it, please DM me.
Credit
(Credit goes to @Doglord120 for the overall base idea, and certain parts of the code that were not rewritten.)