mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
single file orichalcum armor
This commit is contained in:
parent
4da41b0dd0
commit
8d2b9b9a9c
@ -2769,32 +2769,32 @@
|
|||||||
),
|
),
|
||||||
//Orichalcum Set
|
//Orichalcum Set
|
||||||
Simple("common.items.armor.mail.orichalcum.chest"): VoxTrans(
|
Simple("common.items.armor.mail.orichalcum.chest"): VoxTrans(
|
||||||
"voxel.armor.mail.orichalcum.chest",
|
"voxel.armor.mail.orichalcum",
|
||||||
(0.0, 1.0, 0.0), (-120.0, 210.0,15.0), 1.1,
|
(0.0, 1.0, 0.0), (-120.0, 210.0,15.0), 1.1, 0,
|
||||||
),
|
),
|
||||||
Simple("common.items.armor.mail.orichalcum.pants"): VoxTrans(
|
Simple("common.items.armor.mail.orichalcum.pants"): VoxTrans(
|
||||||
"voxel.armor.mail.orichalcum.pants",
|
"voxel.armor.mail.orichalcum",
|
||||||
(0.0, 1.0, 0.0), (-120.0, 210.0,15.0), 0.9,
|
(0.0, 1.0, 0.0), (-120.0, 210.0,15.0), 0.9, 1,
|
||||||
),
|
),
|
||||||
Simple("common.items.armor.mail.orichalcum.belt"): VoxTrans(
|
Simple("common.items.armor.mail.orichalcum.belt"): VoxTrans(
|
||||||
"voxel.armor.mail.orichalcum.belt",
|
"voxel.armor.mail.orichalcum",
|
||||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9,
|
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9, 2,
|
||||||
),
|
),
|
||||||
Simple("common.items.armor.mail.orichalcum.foot"): VoxTrans(
|
Simple("common.items.armor.mail.orichalcum.foot"): VoxTrans(
|
||||||
"voxel.armor.mail.orichalcum.foot",
|
"voxel.armor.mail.orichalcum",
|
||||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9,
|
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9, 3,
|
||||||
),
|
),
|
||||||
Simple("common.items.armor.mail.orichalcum.hand"): VoxTrans(
|
Simple("common.items.armor.mail.orichalcum.hand"): VoxTrans(
|
||||||
"voxel.armor.mail.orichalcum.hand",
|
"voxel.armor.mail.orichalcum",
|
||||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9,
|
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9, 4,
|
||||||
),
|
),
|
||||||
Simple("common.items.armor.mail.orichalcum.shoulder"): VoxTrans(
|
Simple("common.items.armor.mail.orichalcum.shoulder"): VoxTrans(
|
||||||
"voxel.armor.mail.orichalcum.shoulder",
|
"voxel.armor.mail.orichalcum",
|
||||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 1.0,
|
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 1.0, 5,
|
||||||
),
|
),
|
||||||
Simple("common.items.armor.mail.orichalcum.back"): VoxTrans(
|
Simple("common.items.armor.mail.orichalcum.back"): VoxTrans(
|
||||||
"voxel.armor.mail.orichalcum.back",
|
"voxel.armor.mail.orichalcum",
|
||||||
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9,
|
(0.0, 0.0, 0.0), (-120.0, 210.0,15.0), 0.9, 6,
|
||||||
),
|
),
|
||||||
//misc
|
//misc
|
||||||
Simple("common.items.armor.misc.pants.hunting"): VoxTrans(
|
Simple("common.items.armor.misc.pants.hunting"): VoxTrans(
|
||||||
|
BIN
assets/voxygen/voxel/armor/mail/orichalcum.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/mail/orichalcum.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/mail/orichalcum/back.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/mail/orichalcum/back.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/mail/orichalcum/belt.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/mail/orichalcum/belt.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/mail/orichalcum/chest.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/mail/orichalcum/chest.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/mail/orichalcum/foot.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/mail/orichalcum/foot.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/mail/orichalcum/hand.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/mail/orichalcum/hand.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/mail/orichalcum/pants.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/mail/orichalcum/pants.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/mail/orichalcum/shoulder.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/armor/mail/orichalcum/shoulder.vox
(Stored with Git LFS)
Binary file not shown.
@ -137,7 +137,7 @@
|
|||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
"common.items.armor.mail.orichalcum.back": (
|
"common.items.armor.mail.orichalcum.back": (
|
||||||
vox_spec: ("armor.mail.orichalcum.back", (-5.0, -4.5, -12.0)),
|
vox_spec: ("armor.mail.orichalcum", (-5.0, -4.5, -12.0), 6),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
"common.items.armor.merchant.back": (
|
"common.items.armor.merchant.back": (
|
||||||
|
@ -173,7 +173,7 @@
|
|||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
"common.items.armor.mail.orichalcum.belt":(
|
"common.items.armor.mail.orichalcum.belt":(
|
||||||
vox_spec: ("armor.mail.orichalcum.belt", (-4.0, -3.5, 1.0)),
|
vox_spec: ("armor.mail.orichalcum", (-4.0, -3.5, 1.0), 2),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
"common.items.armor.cardinal.belt": (
|
"common.items.armor.cardinal.belt": (
|
||||||
|
@ -243,7 +243,7 @@
|
|||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
"common.items.armor.mail.orichalcum.chest": (
|
"common.items.armor.mail.orichalcum.chest": (
|
||||||
vox_spec: ("armor.mail.orichalcum.chest", (-7.0, -4.0, 1.0)),
|
vox_spec: ("armor.mail.orichalcum", (-7.0, -4.0, 1.0), 0),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
"common.items.armor.cardinal.chest": (
|
"common.items.armor.cardinal.chest": (
|
||||||
|
@ -161,7 +161,7 @@
|
|||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
"common.items.armor.mail.orichalcum.foot": (
|
"common.items.armor.mail.orichalcum.foot": (
|
||||||
vox_spec: ("armor.mail.orichalcum.foot", (-2.5, -3.5, -2.0)),
|
vox_spec: ("armor.mail.orichalcum", (-2.5, -3.5, -2.0), 3),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
"common.items.armor.cardinal.foot": (
|
"common.items.armor.cardinal.foot": (
|
||||||
|
@ -382,11 +382,11 @@
|
|||||||
),
|
),
|
||||||
"common.items.armor.mail.orichalcum.hand": (
|
"common.items.armor.mail.orichalcum.hand": (
|
||||||
left: (
|
left: (
|
||||||
vox_spec: ("armor.mail.orichalcum.hand", (-4.5, -2.0, -4.0)),
|
vox_spec: ("armor.mail.orichalcum", (-4.5, -2.0, -4.0), 4),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
right: (
|
right: (
|
||||||
vox_spec: ("armor.mail.orichalcum.hand", (-1.5, -2.0, -4.0)),
|
vox_spec: ("armor.mail.orichalcum", (-1.5, -2.0, -4.0), 4),
|
||||||
color: None
|
color: None
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
@ -201,7 +201,7 @@
|
|||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
"common.items.armor.mail.orichalcum.pants": (
|
"common.items.armor.mail.orichalcum.pants": (
|
||||||
vox_spec: ("armor.mail.orichalcum.pants", (-6.0, -4.0, 0.5)),
|
vox_spec: ("armor.mail.orichalcum", (-6.0, -4.0, 0.5), 1),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
"common.items.armor.cardinal.pants": (
|
"common.items.armor.cardinal.pants": (
|
||||||
|
@ -453,11 +453,11 @@
|
|||||||
),
|
),
|
||||||
"common.items.armor.mail.orichalcum.shoulder": (
|
"common.items.armor.mail.orichalcum.shoulder": (
|
||||||
left: (
|
left: (
|
||||||
vox_spec: ("armor.mail.orichalcum.shoulder", (-7.5, -3.0 , -2.0)),
|
vox_spec: ("armor.mail.orichalcum", (-7.5, -3.0 , -2.0), 5),
|
||||||
color: None
|
color: None
|
||||||
),
|
),
|
||||||
right: (
|
right: (
|
||||||
vox_spec: ("armor.mail.orichalcum.shoulder", (-1.5, -3.0, -2.0)),
|
vox_spec: ("armor.mail.orichalcum", (-1.5, -3.0, -2.0), 5),
|
||||||
color: None
|
color: None
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
@ -20,8 +20,8 @@ pub fn main() {
|
|||||||
let manifest = ItemImagesSpec::load_expect("voxygen.item_image_manifest");
|
let manifest = ItemImagesSpec::load_expect("voxygen.item_image_manifest");
|
||||||
for (_, spec) in manifest.read().0.iter() {
|
for (_, spec) in manifest.read().0.iter() {
|
||||||
match spec {
|
match spec {
|
||||||
ImageSpec::Vox(specifier) => voxel_to_png(&specifier, Transform::default(), args.scale),
|
ImageSpec::Vox(specifier, model_index) => voxel_to_png(&specifier, Transform::default(), args.scale, model_index),
|
||||||
ImageSpec::VoxTrans(specifier, offset, [rot_x, rot_y, rot_z], zoom) => voxel_to_png(
|
ImageSpec::VoxTrans(specifier, offset, [rot_x, rot_y, rot_z], zoom, model_index) => voxel_to_png(
|
||||||
&specifier,
|
&specifier,
|
||||||
Transform {
|
Transform {
|
||||||
ori: Quaternion::rotation_x(rot_x * std::f32::consts::PI / 180.0)
|
ori: Quaternion::rotation_x(rot_x * std::f32::consts::PI / 180.0)
|
||||||
@ -36,6 +36,7 @@ pub fn main() {
|
|||||||
stretch: false,
|
stretch: false,
|
||||||
},
|
},
|
||||||
args.scale,
|
args.scale,
|
||||||
|
model_index,
|
||||||
),
|
),
|
||||||
ImageSpec::Png(specifier) => {
|
ImageSpec::Png(specifier) => {
|
||||||
println!("Skip png image {}", specifier);
|
println!("Skip png image {}", specifier);
|
||||||
@ -45,7 +46,7 @@ pub fn main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn voxel_to_png(specifier: &String, transform: Transform, scale: u32) {
|
fn voxel_to_png(specifier: &String, transform: Transform, scale: u32, model_index: u32) {
|
||||||
let voxel = match DotVoxAsset::load(&format!("voxygen.{}", specifier)) {
|
let voxel = match DotVoxAsset::load(&format!("voxygen.{}", specifier)) {
|
||||||
Ok(dot_vox) => dot_vox,
|
Ok(dot_vox) => dot_vox,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
@ -56,7 +57,7 @@ fn voxel_to_png(specifier: &String, transform: Transform, scale: u32) {
|
|||||||
let dot_vox_data = &voxel.read().0;
|
let dot_vox_data = &voxel.read().0;
|
||||||
let model_size = dot_vox_data
|
let model_size = dot_vox_data
|
||||||
.models
|
.models
|
||||||
.get(0)
|
.get(model_index)
|
||||||
.expect("Error getting model from voxel")
|
.expect("Error getting model from voxel")
|
||||||
.size;
|
.size;
|
||||||
let ori_mat = Mat4::from(transform.ori);
|
let ori_mat = Mat4::from(transform.ori);
|
||||||
|
@ -20,24 +20,24 @@ pub fn animate_by_pulse(ids: &[Id], pulse: f32) -> Id {
|
|||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
pub enum ImageSpec {
|
pub enum ImageSpec {
|
||||||
Png(String),
|
Png(String),
|
||||||
Vox(String),
|
Vox(String, #[serde(default)] u32),
|
||||||
// (specifier, offset, (axis, 2 * angle / pi), zoom)
|
// (specifier, offset, (axis, 2 * angle / pi), zoom, model_index)
|
||||||
VoxTrans(String, [f32; 3], [f32; 3], f32),
|
VoxTrans(String, [f32; 3], [f32; 3], f32, #[serde(default)] u32),
|
||||||
}
|
}
|
||||||
impl ImageSpec {
|
impl ImageSpec {
|
||||||
fn create_graphic(&self) -> Graphic {
|
fn create_graphic(&self) -> Graphic {
|
||||||
match self {
|
match self {
|
||||||
ImageSpec::Png(specifier) => Graphic::Image(graceful_load_img(specifier), None),
|
ImageSpec::Png(specifier) => Graphic::Image(graceful_load_img(specifier), None),
|
||||||
ImageSpec::Vox(specifier) => Graphic::Voxel(
|
ImageSpec::Vox(specifier, model_index) => Graphic::Voxel(
|
||||||
graceful_load_segment_no_skin(specifier),
|
graceful_load_segment_no_skin(specifier, *model_index),
|
||||||
Transform {
|
Transform {
|
||||||
stretch: false,
|
stretch: false,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
SampleStrat::None,
|
SampleStrat::None,
|
||||||
),
|
),
|
||||||
ImageSpec::VoxTrans(specifier, offset, [rot_x, rot_y, rot_z], zoom) => Graphic::Voxel(
|
ImageSpec::VoxTrans(specifier, offset, [rot_x, rot_y, rot_z], zoom, model_index) => Graphic::Voxel(
|
||||||
graceful_load_segment_no_skin(specifier),
|
graceful_load_segment_no_skin(specifier, *model_index),
|
||||||
Transform {
|
Transform {
|
||||||
ori: Quaternion::rotation_x(rot_x * std::f32::consts::PI / 180.0)
|
ori: Quaternion::rotation_x(rot_x * std::f32::consts::PI / 180.0)
|
||||||
.rotated_y(rot_y * std::f32::consts::PI / 180.0)
|
.rotated_y(rot_y * std::f32::consts::PI / 180.0)
|
||||||
@ -163,9 +163,9 @@ fn graceful_load_img(specifier: &str) -> Arc<DynamicImage> {
|
|||||||
handle.read().to_image()
|
handle.read().to_image()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn graceful_load_segment_no_skin(specifier: &str) -> Arc<Segment> {
|
fn graceful_load_segment_no_skin(specifier: &str, model_index: u32) -> Arc<Segment> {
|
||||||
use common::figure::{mat_cell::MatCell, MatSegment};
|
use common::figure::{mat_cell::MatCell, MatSegment};
|
||||||
let mat_seg = MatSegment::from(&graceful_load_vox(specifier).read().0);
|
let mat_seg = MatSegment::from((&graceful_load_vox(specifier).read().0, model_index as usize));
|
||||||
let seg = mat_seg
|
let seg = mat_seg
|
||||||
.map(|mat_cell| match mat_cell {
|
.map(|mat_cell| match mat_cell {
|
||||||
MatCell::None => None,
|
MatCell::None => None,
|
||||||
|
Loading…
Reference in New Issue
Block a user