Godot-Voxel-Destruction
Allows dynamic voxel destruction with debris along with other voxel features. Allows importing .vox files and damaging…
git clone https://github.com/Terabase-Studios/Godot-Voxel-Destruction.gitTerabase-Studios/Godot-Voxel-DestructionGodot Voxel Destruction
A flexible and efficient voxel-based destruction system for Godot 4.1+. This addon allows you to create dynamic, destructible objects from .vox files.
Please check out the roadmap!
Features
- Custom Importer: Includes a custom importer for MagicaVoxel
.voxfiles. - High Performance: Utilizes
MultiMeshInstance3Dfor high-performance rendering of voxels. - Debris Modes: Offers multiple debris modes for varying levels of realism and performance.
- Dithering: Supports adjustable dithering effects for enhanced visual realism during destruction.
- Easy Integration: Designed for seamless integration into existing Godot projects.
- VoxelObject Health and Damage tracking Mark voxels and track health for enemies or indivisual voxels.
- Custom Monitors View VoxelDestruction specific statistics real time in Debugger/Monitors.
- Custom Project Settings Change VoxelDestruction specific settings built into the ProjectSettings.
Project State
This project is active! I cycle back to this project here or there, so if you see a lag in commits don't worry about the project being abandoned. All issues and pull requests will be addressed promptly.
Contribution
I want to make this the best addon it can be! Feel free to open an issue or pull request. If you need any assistance what so ever, please reach me at support@terabasestudios.com =)
Installation
-
Godot Asset Library:
- Open the "AssetLib" tab in the Godot editor.
- Search for "Voxel Destruction" and click on the addon.
- Click "Download" and then "Install".
-
Enable the Plugin:
- Go to
Project>Project Settings>Plugins. - Find "Voxel Destruction" in the list and check the "Enable" box.
- Go to
Getting Started
-
Import a
.voxfile:- Drag and drop a
.voxfile into your project's file system. - The custom importer will automatically create a
VoxelResourcefile.
- Drag and drop a
-
Create a
VoxelObject:- Add a
VoxelObjectnode to your scene. - In the Inspector, assign the
VoxelResourceyou just created to theVoxel Resourceproperty of theVoxelObject. - Click the
(Re)populate Meshbutton at the top of the Inspector.
- Add a
-
Create a
VoxelDamager:- Add a
VoxelDamagernode to your scene. This is anArea3Dthat defines the area of effect for damage. - Add a
CollisionShape3Dto theVoxelDamagerwith aBoxShape3D. The size of the box determines the range of the damager.
- Add a
-
Damage the
VoxelObject:- Call the
hit()function on theVoxelDamagerto damage anyVoxelObjects within its range.
# Example of how to use the VoxelDamager func _physics_process(delta): if Input.is_action_just_pressed("fire"): $VoxelDamager.hit() - Call the
API Reference
VoxelDamager
hit(): Damages allVoxelObjects within the damager's range.
Contributing
Contributions are welcome! If you find a bug or have an idea for a new feature, please open an issue on the GitHub repository.
License
This addon is licensed under the MIT License. See the LICENSE file for more details.
more like this
voxel-wiki.github.io
Voxel.Wiki is a website that is all about voxels: Values on regular grids in three-dimensional space!



