Mesh to cube converter - #977
Open
ewanhowell5195 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This plugin detects cuboids within meshes and converts them into real Blockbench cubes, including rotated cuboids and meshes made up of multiple merged cubes.
UVs are transferred exactly. A detected cuboid is only converted when every face maps cleanly onto a cube face, meaning no distorted UVs and no rotations other than 90 degree steps.
Usage
Select the meshes you want to convert, or select nothing to convert every mesh in the project.
Use Tools > Convert Mesh to Cubes to run the conversion.
Valid cuboids are extracted into cubes, and any remaining geometry stays behind as a mesh. Meshes that convert completely are removed.
Detection rules
Complete 6 sided cuboids always convert, even when merged into other geometry.
Partial cuboids with missing faces (such as a hidden face deleted where a slope was merged on) convert when at least 4 faces remain. Missing faces become disabled faces on the cube.
Isolated geometry that is not attached to anything else converts with any number of faces, so a lone flat plane becomes a zero thickness cube.