MIT License

项目介绍

AstrorEnales/blender_magicavoxel 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 MIT License 许可证,目前获得 62 个 Star、10 次 Fork。

仓库全名
AstrorEnales/blender_magicavoxel
开源许可证
MIT License
Star 数
62
Fork 数
10
未关闭 Issue
4

README 摘要

blendermagicavoxel Addon for the Blender 3D modeling software for loading MagicaVoxel VOX files. If you enjoy the addon and want to support the maintenance and future development feel free to chip in on itch.io. 💾 Download The latest version can be downloaded here. 🧪️ Version Compatibility The primary goal is the support of the newest version of both MagicaVoxel and Blender. Of course the addon works well with…

完整内容见 GitHub 原始 README 或本页 。

常见问题

blender_magicavoxel 用什么语言开发?

主要使用 Python 编写,采用 MIT License 许可证,目前有 62 个 Star。

blender_magicavoxel 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 blender_magicavoxel 的源码?

可以直接克隆仓库:git clone https://github.com/AstrorEnales/blender_magicavoxel.git;安装与运行步骤见仓库 README。

blender_magicavoxel 最近还在维护吗?

仓库最近一次更新为 7月27日,当前有 4 个未关闭 Issue;Star 数为 62,可作为社区活跃度的参考。

关于

Addon for the Blender 3D modeling software for loading MagicaVoxel VOX files

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
144
价值分
46
活跃状态
活跃

语言占比

Python

Release

README

GitHub release (latest by date) GitHub GitHub all releases Discord itch.io blender.org

blender_magicavoxel

Addon for the Blender 3D modeling software for loading MagicaVoxel VOX files.

If you enjoy the addon and want to support the maintenance and future development feel free to chip in on itch.io.

💾 Download

The latest version can be downloaded here.

🧪️ Version Compatibility

The primary goal is the support of the newest version of both MagicaVoxel and Blender. Of course the addon works well with other versions as well (see Compatibility). If you need support for specific (older) versions, please feel free to create an issue with the version info.

🔧 Installation

Blender 4.2 or newer

Starting with Blender 4.2, the addon can be installed directly inside Blender from the extensions platform!

Before Blender 4.2

A detailed description of how to install addons in Blender can be found in the Blender documentation for installing addons .

Go to Edit > Preferences > Add-ons, click on Install, and select blender_magicavoxel.py. After that, activate the addon.

✈️ Usage

Go to File > Import > MagicaVoxel (.vox) and select the file you want to import.

Import Hierarchy

This options determines whether the hierarchy from MagicaVoxel is imported as empty axis objects in blender and all transformations (translation and rotation) are applied hierarchically. If not, all transformations are calculated and applied to each model and no hierarchy parent structure is created.

Join Models

This option allows all models in the MagicaVoxel file to be merged into one. Joining is done on a voxel basis and before meshing which is superior to just combining the blender meshes for generating the voxel hull and greedy meshing.

Center Origins

MagicaVoxel object origins are located at the center of the object bounds and always between voxels. That means for uneven bounds (for example 5x5x3) the origin is not at (2.5, 2.5, 1.5) but rather at (2, 2, 1). This option calculates the object center from the geometry instead and moves the mesh origin at that center in post-processing.

Voxel Size

The voxel size parameter can be used to define the unit voxel size. The example below shows a voxel model imported with voxel size 1.0, 1.5, and 2.0.

Material Modes

MagicaVoxel files contain a color palette and additional material properties per color in the palette. This addon supports different modes how this information is imported.

⚠️ Please note: Additional material props are still experimental and under development

Mode Description
Ignore Neither colors nor materials are imported.
Vertex Color Only the color palette will be imported and assigned to face vertex colors. A simple material is added using the vertex colors as ‘Base Color’.
Material Per Color A material is added per color in the color palette and assigned to the faces material index.
Materials As Texture The color palette is created as a 256x1 texture. A simple material is added using this texture.
Textured Models (UV unwrap) Each model is assigned a material and texture with UV unwrap. (Only usable/sensible for Greedy meshing)

Import Material Properties

Depending on the material mode, additional material properties are either added as a separate vertex color layer, texture, or blender material nodes.

Mode Description
Vertex Color + Prop The color palette and certain material properties are assigned as vertex color layers. A simple material is added using the vertex color layers.
Material Per Color + Prop A material is added per color in the color palette and assigned to the faces material index. Additional material properties are stored for each material.
Materials As Texture + Prop The color palette and certain material properties are created as a 256x1 texture. A simple material is added using these textures.
Textured Models (UV unwrap) + Prop Each model is assigned a material and textures with UV unwrap. (Only usable/sensible for Greedy meshing)
Textured Models (UV unwrap)

To simplify the workflow from MagicaVoxel to “Game Ready” assets the “Textured Models (UV unwrap)” material model generates textures for base color, emission, roughness, and metallic in combination with UV unwrapping the model faces onto these textures.

As game assets are generally only sensible as optimized meshes, this material mode is only usable/sensible for the “Greedy” meshing mode.

Voxel Hull

This option is only available for certain meshing types and implicitly active for others. If checked, each model is analyzed to find the voxel hull and all other voxels inside the model are deleted/ignored.

Meshing Types

This addon supports different methods of representing the loaded voxel models.

Voxel as Models

Voxel as models meshing generates a six-sided cube for each voxel as separate models. Depending on the voxel hull option, cubes are only generated for the hull or all voxels defined in the model.

⚠️ Beware that this option may be slow as alot of cube models may be generated!

Simple Cubes

Simple cubes meshing generates a six-sided cube for each voxel combined in one mesh per model. Depending on the voxel hull option, cubes are only generated for the hull or all voxels defined in the model.

Simple Quads

Simple quads meshing generates the voxel hull of all models and creates only faces where voxel cube faces are visible from outside.

Greedy (+Watertight)

Greedy meshing is equivalent to simple quads as it only creates faces of the voxel hull visible from outside, with the addition of greedily joining quads where possible. Optionally, the “Greedy (Watertight)” mode removes T-junctions by expanding quads to N-gons where other quad vertices coincide with a quad edge.

You may read more about greedy meshing here and here.

This Texnist/
MagicaVoxel_Importer
RichysHub/
MagicaVoxel-VOX-importer
ldo/
blender_magivox_import
Active ✅ ❌ [ref] Last update 25.12.2023 ❌ Last update 13.04.2022 ❌ Last update 06.07.2021
Supported VOX version 150, 200 200 150 150
Hierarchy ✅ ✅ ❌ ❌
Material ✅ (MATT, MATL) ✅ (MATL) ~ (MATT) ~ (MATT)
Textures with UV unwrap ✅ ❌ ❌ ❌
Camera WIP [#3] ❌ ❌ ❌
Rendering Properties WIP [#4] ❌ ❌ ❌
Join Models ✅ ❌ ✅ ❌
Voxel Scale ✅ ✅ ✅ ❌
Custom Meshing Types ✅ ❌ ❌ ❌
Watertight ✅ ❌ ❌ ❌
Reduce To Voxel Hull ✅ ❌ ❌ ❌

Contributors

I would like to thank the following contributors:

  • Miguel Fernandez Arce (muit)
    • IMAP support
  • playmyskay
    • Color space conversion and emission fixes

评论

暂无评论