From 954cede352404d50a7753fdc3f19db47868ba11a Mon Sep 17 00:00:00 2001 From: Treeco <5021038-Treeco@users.noreply.gitlab.com> Date: Fri, 22 Mar 2024 18:01:09 +0000 Subject: [PATCH] Add new LOD trees and objects --- assets/voxygen/lod/acacia.obj | 3 +++ assets/voxygen/lod/arena.obj | 3 +++ assets/voxygen/lod/baobab.obj | 3 +++ assets/voxygen/lod/birch.obj | 3 +++ assets/voxygen/lod/desert_houses.obj | 3 +++ assets/voxygen/lod/frostpine.obj | 3 +++ assets/voxygen/lod/haniwa.obj | 3 +++ assets/voxygen/lod/mangrove.obj | 3 +++ assets/voxygen/lod/palm.obj | 3 +++ assets/voxygen/lod/redwood.obj | 3 +++ common/src/lod.rs | 10 ++++++++++ voxygen/src/scene/lod.rs | 22 ++++++++++++++++++++++ world/src/lib.rs | 26 +++++++++++++++++++++++--- 13 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 assets/voxygen/lod/acacia.obj create mode 100644 assets/voxygen/lod/arena.obj create mode 100644 assets/voxygen/lod/baobab.obj create mode 100644 assets/voxygen/lod/birch.obj create mode 100644 assets/voxygen/lod/desert_houses.obj create mode 100644 assets/voxygen/lod/frostpine.obj create mode 100644 assets/voxygen/lod/haniwa.obj create mode 100644 assets/voxygen/lod/mangrove.obj create mode 100644 assets/voxygen/lod/palm.obj create mode 100644 assets/voxygen/lod/redwood.obj diff --git a/assets/voxygen/lod/acacia.obj b/assets/voxygen/lod/acacia.obj new file mode 100644 index 0000000000..92499bbdd7 --- /dev/null +++ b/assets/voxygen/lod/acacia.obj @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5936bfdb8c4b520624a114ca483a2f98b8dc06e73adeb249c10102cc855e5d3 +size 6105 diff --git a/assets/voxygen/lod/arena.obj b/assets/voxygen/lod/arena.obj new file mode 100644 index 0000000000..9df00fa2f4 --- /dev/null +++ b/assets/voxygen/lod/arena.obj @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9faa484801eb344e91107fabaf53759833991deadc29c006ffe04853b2144aad +size 144682 diff --git a/assets/voxygen/lod/baobab.obj b/assets/voxygen/lod/baobab.obj new file mode 100644 index 0000000000..80e47b5482 --- /dev/null +++ b/assets/voxygen/lod/baobab.obj @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3becd9ff1cdf7c4194d39189c2145b8d0780720b6fad6087c1c2367be3cba71 +size 14974 diff --git a/assets/voxygen/lod/birch.obj b/assets/voxygen/lod/birch.obj new file mode 100644 index 0000000000..180f7b0025 --- /dev/null +++ b/assets/voxygen/lod/birch.obj @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af6e9710ce261466e6c119567dce579a8c87e35ad86a7533d5a40551ebb3aa8c +size 8034 diff --git a/assets/voxygen/lod/desert_houses.obj b/assets/voxygen/lod/desert_houses.obj new file mode 100644 index 0000000000..cf8ba54a67 --- /dev/null +++ b/assets/voxygen/lod/desert_houses.obj @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:febef70cb56c24e97ba4f0f2b4bf33a7597bb7363385afc39db7b346060acedf +size 16963 diff --git a/assets/voxygen/lod/frostpine.obj b/assets/voxygen/lod/frostpine.obj new file mode 100644 index 0000000000..a6a675a429 --- /dev/null +++ b/assets/voxygen/lod/frostpine.obj @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33cc8309dbaf6f7bf8658f4321d1300477204e2f89158caf0ee5db12be423a10 +size 14068 diff --git a/assets/voxygen/lod/haniwa.obj b/assets/voxygen/lod/haniwa.obj new file mode 100644 index 0000000000..4b20090d4a --- /dev/null +++ b/assets/voxygen/lod/haniwa.obj @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfb7b45d428e8b0f67f38b18f31bd08e9510af5b52b8268dd7dae886b75aadba +size 41276 diff --git a/assets/voxygen/lod/mangrove.obj b/assets/voxygen/lod/mangrove.obj new file mode 100644 index 0000000000..b0557065e8 --- /dev/null +++ b/assets/voxygen/lod/mangrove.obj @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9193266ea57f68ff020cdda45fbeced3bd17ed1e7edb6da6c5638eca798b01b2 +size 5505 diff --git a/assets/voxygen/lod/palm.obj b/assets/voxygen/lod/palm.obj new file mode 100644 index 0000000000..cdfac45e31 --- /dev/null +++ b/assets/voxygen/lod/palm.obj @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e847f15047894e01a834797a0a7a8064426215f84e41ee1a1bca174631bac0c0 +size 4646 diff --git a/assets/voxygen/lod/redwood.obj b/assets/voxygen/lod/redwood.obj new file mode 100644 index 0000000000..a1aef8de8d --- /dev/null +++ b/assets/voxygen/lod/redwood.obj @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aefe57aacf6706d382a718b4bb3fee506db069ee06776606b12bb8bc0d9b0c6a +size 37168 diff --git a/common/src/lod.rs b/common/src/lod.rs index 68c1c539b8..2878318229 100644 --- a/common/src/lod.rs +++ b/common/src/lod.rs @@ -22,6 +22,16 @@ pub enum ObjectKind { Dead, House, GiantTree, + Mangrove, + Acacia, + Birch, + Redwood, + Baobab, + Frostpine, + Haniwa, + Desert, + Palm, + Arena, } #[derive(Clone, Debug, Serialize, Deserialize)] diff --git a/voxygen/src/scene/lod.rs b/voxygen/src/scene/lod.rs index 41dc8d50ed..d57b826038 100644 --- a/voxygen/src/scene/lod.rs +++ b/voxygen/src/scene/lod.rs @@ -84,6 +84,28 @@ impl Lod { lod::ObjectKind::GiantTree, make_lod_object("giant_tree", renderer), ), + ( + lod::ObjectKind::Mangrove, + make_lod_object("mangrove", renderer), + ), + (lod::ObjectKind::Acacia, make_lod_object("acacia", renderer)), + (lod::ObjectKind::Birch, make_lod_object("birch", renderer)), + ( + lod::ObjectKind::Redwood, + make_lod_object("redwood", renderer), + ), + (lod::ObjectKind::Baobab, make_lod_object("baobab", renderer)), + ( + lod::ObjectKind::Frostpine, + make_lod_object("frostpine", renderer), + ), + (lod::ObjectKind::Haniwa, make_lod_object("haniwa", renderer)), + ( + lod::ObjectKind::Desert, + make_lod_object("desert_houses", renderer), + ), + (lod::ObjectKind::Palm, make_lod_object("palm", renderer)), + (lod::ObjectKind::Arena, make_lod_object("arena", renderer)), ] .into(), } diff --git a/world/src/lib.rs b/world/src/lib.rs index fe2703635a..020a64a7f7 100644 --- a/world/src/lib.rs +++ b/world/src/lib.rs @@ -622,9 +622,14 @@ impl World { Some(lod::Object { kind: match tree.forest_kind { all::ForestKind::Dead => lod::ObjectKind::Dead, - all::ForestKind::Pine - | all::ForestKind::Frostpine - | all::ForestKind::Redwood => lod::ObjectKind::Pine, + all::ForestKind::Pine => lod::ObjectKind::Pine, + all::ForestKind::Mangrove => lod::ObjectKind::Mangrove, + all::ForestKind::Acacia => lod::ObjectKind::Acacia, + all::ForestKind::Birch => lod::ObjectKind::Birch, + all::ForestKind::Redwood => lod::ObjectKind::Redwood, + all::ForestKind::Baobab => lod::ObjectKind::Baobab, + all::ForestKind::Frostpine => lod::ObjectKind::Frostpine, + all::ForestKind::Palm => lod::ObjectKind::Palm, _ => lod::ObjectKind::GenericTree, }, pos: { @@ -677,6 +682,21 @@ impl World { t.leaf_color(), lod::ObjectKind::GiantTree, )), + site2::plot::PlotKind::Haniwa(_) => Some(( + site.tile_wpos(plot.root_tile), + Rgb::black(), + lod::ObjectKind::Haniwa, + )), + site2::plot::PlotKind::DesertCityMultiPlot(_) => Some(( + site.tile_wpos(plot.root_tile), + Rgb::black(), + lod::ObjectKind::Desert, + )), + site2::plot::PlotKind::DesertCityArena(_) => Some(( + site.tile_wpos(plot.root_tile), + Rgb::black(), + lod::ObjectKind::Arena, + )), _ => None, }) })