diff --git a/Cargo.lock b/Cargo.lock index b6ee0a0..d158a26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4828,7 +4828,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vox-uristi" -version = "0.15.0" +version = "0.15.1" dependencies = [ "anyhow", "bitflags 2.5.0", diff --git a/Cargo.toml b/Cargo.toml index 188f83b..8209603 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vox-uristi" -version = "0.15.0" +version = "0.15.1" edition = "2021" [features] diff --git a/site/_pages/tips.md b/site/_pages/tips.md index 7be27a3..4ea1131 100644 --- a/site/_pages/tips.md +++ b/site/_pages/tips.md @@ -13,9 +13,11 @@ further customization when rendering pictures. Navigating to the "Layers" in MagicaVoxel, as seen on the left side, it's possible to hide and show various features of the export. For example, hiding -the spatters and the roughness will lead to a less cluttered look. The "hidden" -layer represent all the black tiles that are not discovered by the player. -Hiding this layer can be useful to render a multi-level underground fortress. +the spatters and the roughness will lead to a less cluttered look. + +The "hidden" layer represent all the black tiles that are not discovered by the +player. Hiding this layer can be useful to render a multi-level underground +fortress, while showing it gives a look closer to what's visible in game. On the right side, the "Outline" can be used to hide part of the export. Each individual Z-Level can be hidden there, to show the interior of buildings for diff --git a/src/export.rs b/src/export.rs index d2f0661..550ea0b 100644 --- a/src/export.rs +++ b/src/export.rs @@ -232,6 +232,9 @@ pub fn try_export_voxels( .attributes .insert("_name".to_string(), format!("{}", layer).to_lowercase()); } + vox.data.layers[*Layers::Hidden.id()] + .attributes + .insert("_hidden".to_string(), "1".to_string()); let min_z = z_range.start * HEIGHT as i32; let block_count = map.levels.values().map(|l| l.blocks.len()).sum();