Pfau/crops

This commit is contained in:
Monty Marz 2020-04-20 19:52:46 +00:00 committed by Joshua Barretto
parent 431e199731
commit 44c5002db3
39 changed files with 173 additions and 91 deletions

View File

@ -9,27 +9,27 @@
lateral: ("npc.giant.male.shoulder_r"),
),
hand_l: (
offset: (-3.0, -2.5, -14.0),
offset: (-2.5, -2.5, -14.0),
lateral: ("npc.giant.male.hand_l"),
),
hand_r: (
offset: (-3.0, -2.5, -14.0),
offset: (-2.5, -2.5, -14.0),
lateral: ("npc.giant.male.hand_r"),
),
leg_l: (
offset: (-3.0, -3.5, -7.0),
offset: (-6.0, -3.5, -7.0),
lateral: ("npc.giant.male.leg_l"),
),
leg_r: (
offset: (-3.0, -3.5, -7.0),
offset: (0.0, -3.5, -7.0),
lateral: ("npc.giant.male.leg_r"),
),
foot_l: (
offset: (-3.0, -5.5, -2.5),
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.giant.male.foot_l"),
),
foot_r: (
offset: (-3.0, -5.5, -2.5),
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.giant.male.foot_r"),
)
),
@ -43,27 +43,27 @@
lateral: ("npc.giant.female.shoulder_r"),
),
hand_l: (
offset: (-3.0, -2.5, -14.0),
offset: (-2.5, -2.5, -14.0),
lateral: ("npc.giant.female.hand_l"),
),
hand_r: (
offset: (-3.0, -2.5, -14.0),
offset: (-2.5, -2.5, -14.0),
lateral: ("npc.giant.female.hand_r"),
),
leg_l: (
offset: (-3.0, -3.5, -7.0),
offset: (-6.0, -3.5, -7.0),
lateral: ("npc.giant.female.leg_l"),
),
leg_r: (
offset: (-3.0, -3.5, -7.0),
offset: (0.0, -3.5, -7.0),
lateral: ("npc.giant.female.leg_r"),
),
foot_l: (
offset: (-3.0, -5.5, -2.5),
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.giant.female.foot_l"),
),
foot_r: (
offset: (-3.0, -5.5, -2.5),
offset: (-3.0, -5.0, -2.5),
lateral: ("npc.giant.female.foot_r"),
)
),

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
assets/voxygen/voxel/sprite/door/door-0.vox (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
assets/voxygen/voxel/sprite/misc/street_lamp.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/sprite/pumpkin/1.vox (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/voxel/sprite/pumpkin/2.vox (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/voxel/sprite/pumpkin/3.vox (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/voxel/sprite/pumpkin/4.vox (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/voxel/sprite/pumpkin/5.vox (Stored with Git LFS)

Binary file not shown.

BIN
assets/voxygen/voxel/sprite/pumpkin/6.vox (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/voxel/sprite/pumpkin/7.vox (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -56,6 +56,8 @@ pub enum BlockKind {
Window3,
Window4,
Scarecrow,
StreetLamp,
Door,
}
impl BlockKind {
@ -116,6 +118,8 @@ impl BlockKind {
BlockKind::Window3 => true,
BlockKind::Window4 => true,
BlockKind::Scarecrow => true,
BlockKind::StreetLamp => true,
BlockKind::Door => false,
_ => false,
}
}
@ -176,6 +180,8 @@ impl BlockKind {
BlockKind::Window3 => false,
BlockKind::Window4 => false,
BlockKind::Scarecrow => false,
BlockKind::StreetLamp => false,
BlockKind::Door => false,
_ => true,
}
}
@ -204,7 +210,7 @@ impl BlockKind {
BlockKind::Mushroom => false,
BlockKind::Liana => false,
BlockKind::Chest => true,
BlockKind::Pumpkin => false,
BlockKind::Pumpkin => true,
BlockKind::Welwitch => false,
BlockKind::LingonBerry => false,
BlockKind::LeafyPlant => false,
@ -215,14 +221,16 @@ impl BlockKind {
BlockKind::Corn => false,
BlockKind::WheatYellow => false,
BlockKind::WheatGreen => false,
BlockKind::Cabbage => false,
BlockKind::Cabbage => true,
BlockKind::Flax => false,
BlockKind::Carrot => false,
BlockKind::Carrot => true,
BlockKind::Tomato => true,
BlockKind::Radish => false,
BlockKind::Turnip => false,
BlockKind::Coconut => false,
BlockKind::Radish => true,
BlockKind::Turnip => true,
BlockKind::Coconut => true,
BlockKind::Scarecrow => true,
BlockKind::StreetLamp => true,
BlockKind::Door => false,
_ => true,
}
}
@ -235,6 +243,14 @@ impl BlockKind {
BlockKind::Tomato => 1.65,
BlockKind::LargeCactus => 2.5,
BlockKind::Scarecrow => 3.0,
BlockKind::Turnip => 0.36,
BlockKind::Pumpkin => 0.81,
BlockKind::Cabbage => 0.45,
BlockKind::Chest => 1.09,
BlockKind::StreetLamp => 3.0,
BlockKind::Carrot => 0.18,
BlockKind::Radish => 0.18,
BlockKind::Door => 3.0,
_ => 1.0,
}
}

View File

@ -145,10 +145,10 @@ impl<'a> From<&'a comp::biped_large::Body> for SkeletonAttr {
(Giant, _) => (6.0, 0.5, 2.5),
},
hand: match (body.species, body.body_type) {
(Giant, _) => (8.5, -1.0, 4.0),
(Giant, _) => (10.5, -1.0, 3.5),
},
leg: match (body.species, body.body_type) {
(Giant, _) => (3.5, 0.0, -5.0),
(Giant, _) => (0.0, 0.0, -6.0),
},
foot: match (body.species, body.body_type) {
(Giant, _) => (4.0, 0.5, 2.5),

View File

@ -17,21 +17,30 @@ impl Animation for RunAnimation {
) -> Self::Skeleton {
let mut next = (*skeleton).clone();
let lab = 1.0;
let lab = 10.0;
let legl = (anim_time as f32 * lab as f32).sin();
let legr = (anim_time as f32 * lab as f32 + PI).sin();
let belt = (anim_time as f32 * lab as f32 + 1.5 * PI).sin();
let foothoril = (anim_time as f32 * lab as f32).sin();
let foothorir = (anim_time as f32 * lab as f32 + PI).sin();
let foothoril = (anim_time as f32 * lab as f32 + PI * 1.4).sin();
let foothorir = (anim_time as f32 * lab as f32 + PI * 0.4).sin();
let footvertl = (anim_time as f32 * lab as f32 + PI * 1.4).sin().max(0.0);
let footvertr = (anim_time as f32 * lab as f32 + PI * 0.4).sin().max(0.0);
let footvertl = (anim_time as f32 * lab as f32).sin().max(0.1);
let footvertr = (anim_time as f32 * lab as f32 + PI).sin().max(0.1);
next.head.offset =
Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1 + belt * 1.0) * 1.02;
next.head.ori = Quaternion::rotation_z(belt * 0.1) * Quaternion::rotation_x(0.3);
let footrotl = (((5.0)
/ (1.0 + (4.0) * ((anim_time as f32 * lab as f32 + PI * 1.4).sin()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * lab as f32 + PI * 1.4).sin());
let footrotr = (((5.0)
/ (1.0 + (4.0) * ((anim_time as f32 * lab as f32 + PI * 0.4).sin()).powf(2.0 as f32)))
.sqrt())
* ((anim_time as f32 * lab as f32 + PI * 0.4).sin());
next.head.offset = Vec3::new(0.0, skeleton_attr.head.0, skeleton_attr.head.1) * 1.02;
next.head.ori = Quaternion::rotation_z(belt * -0.3) * Quaternion::rotation_x(0.3);
next.head.scale = Vec3::one() * 1.02;
next.upper_torso.offset = Vec3::new(
@ -39,7 +48,7 @@ impl Animation for RunAnimation {
skeleton_attr.upper_torso.0,
skeleton_attr.upper_torso.1 + belt * 1.0,
) / 8.0;
next.upper_torso.ori = Quaternion::rotation_z(belt * 0.3) * Quaternion::rotation_x(0.0);
next.upper_torso.ori = Quaternion::rotation_z(belt * 0.40) * Quaternion::rotation_x(0.0);
next.upper_torso.scale = Vec3::one() / 8.0;
next.lower_torso.offset = Vec3::new(
@ -47,7 +56,7 @@ impl Animation for RunAnimation {
skeleton_attr.lower_torso.0,
skeleton_attr.lower_torso.1,
);
next.lower_torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
next.lower_torso.ori = Quaternion::rotation_z(belt * -0.55) * Quaternion::rotation_x(0.0);
next.lower_torso.scale = Vec3::one() * 1.02;
next.shoulder_l.offset = Vec3::new(
@ -55,7 +64,8 @@ impl Animation for RunAnimation {
skeleton_attr.shoulder.1,
skeleton_attr.shoulder.2,
);
next.shoulder_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(legr * 0.06);
next.shoulder_l.ori =
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(footrotl * -0.15);
next.shoulder_l.scale = Vec3::one();
next.shoulder_r.offset = Vec3::new(
@ -63,7 +73,8 @@ impl Animation for RunAnimation {
skeleton_attr.shoulder.1,
skeleton_attr.shoulder.2,
);
next.shoulder_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(legl * 0.1);
next.shoulder_r.ori =
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(footrotr * -0.15);
next.shoulder_r.scale = Vec3::one();
next.hand_l.offset = Vec3::new(
@ -71,7 +82,8 @@ impl Animation for RunAnimation {
skeleton_attr.hand.1,
skeleton_attr.hand.2,
);
next.hand_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.3 + legr * 0.5);
next.hand_l.ori =
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.3 + footrotl * -0.8);
next.hand_l.scale = Vec3::one() * 1.02;
next.hand_r.offset = Vec3::new(
@ -79,42 +91,46 @@ impl Animation for RunAnimation {
skeleton_attr.hand.1,
skeleton_attr.hand.2,
);
next.hand_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.3 - legr * 0.5);
next.hand_r.ori =
Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.3 + footrotr * -0.8);
next.hand_r.scale = Vec3::one() * 1.02;
next.leg_l.offset = Vec3::new(
-skeleton_attr.leg.0,
skeleton_attr.leg.1,
skeleton_attr.leg.2 + legl * 0.4,
skeleton_attr.leg.2,
) * 1.02;
next.leg_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-legl * 0.3);
next.leg_l.ori =
Quaternion::rotation_z(belt * -0.8) * Quaternion::rotation_x(foothoril * 0.2);
next.leg_l.scale = Vec3::one() * 1.02;
next.leg_r.offset = Vec3::new(
skeleton_attr.leg.0,
skeleton_attr.leg.1,
skeleton_attr.leg.2 + legr * 0.4,
skeleton_attr.leg.2,
) * 1.02;
next.leg_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-legr * 0.3);
next.leg_r.ori =
Quaternion::rotation_z(belt * -0.8) * Quaternion::rotation_x(foothorir * 0.2);
next.leg_r.scale = Vec3::one() * 1.02;
next.foot_l.offset = Vec3::new(
-skeleton_attr.foot.0,
skeleton_attr.foot.1 + foothoril * -4.0,
skeleton_attr.foot.2 + footvertl * 3.0,
skeleton_attr.foot.1 + foothoril * 8.0 + 3.0,
skeleton_attr.foot.2 + footvertl * 4.0,
) / 8.0;
next.foot_l.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
next.foot_l.ori = Quaternion::rotation_x(footrotl * 0.5);
next.foot_l.scale = Vec3::one() / 8.0 * 0.98;
next.foot_r.offset = Vec3::new(
skeleton_attr.foot.0,
skeleton_attr.foot.1 + foothorir * -4.0,
skeleton_attr.foot.2 + footvertr * 3.0,
skeleton_attr.foot.1 + foothorir * 8.0 + 3.0,
skeleton_attr.foot.2 + footvertr * 4.0,
) / 8.0;
next.foot_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(0.0);
next.foot_r.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(footrotr * 0.5);
next.foot_r.scale = Vec3::one() / 8.0 * 0.98;
next.torso.offset = Vec3::new(0.0, 0.0, 0.0);
next.torso.offset = Vec3::new(0.0, 0.0, belt * 0.15);
next.torso.ori = Quaternion::rotation_z(0.0) * Quaternion::rotation_x(-0.2);
next.torso.scale = Vec3::one();
next

View File

@ -81,7 +81,7 @@ impl SkeletonAttr {
(Human, Female) => 0.75,
(Elf, Male) => 0.85,
(Elf, Female) => 0.8,
(Dwarf, Male) => 0.7,
(Dwarf, Male) => 0.1,
(Dwarf, Female) => 0.65,
(Undead, Male) => 0.8,
(Undead, Female) => 0.75,

View File

@ -167,7 +167,7 @@ fn sprite_config_for(kind: BlockKind) -> Option<SpriteConfig> {
wind_sway: 0.1,
}),
BlockKind::Pumpkin => Some(SpriteConfig {
variations: 5,
variations: 7,
wind_sway: 0.0,
}),
BlockKind::LingonBerry => Some(SpriteConfig {
@ -234,6 +234,14 @@ fn sprite_config_for(kind: BlockKind) -> Option<SpriteConfig> {
variations: 1,
wind_sway: 0.0,
}),
BlockKind::StreetLamp => Some(SpriteConfig {
variations: 1,
wind_sway: 0.0,
}),
BlockKind::Door => Some(SpriteConfig {
variations: 1,
wind_sway: 0.0,
}),
_ => None,
}
}
@ -924,6 +932,20 @@ impl<V: RectRasterableVol> Terrain<V> {
Vec3::new(-6.0, -6.0, -0.0),
),
),
(
(BlockKind::Pumpkin, 5),
make_model(
"voxygen.voxel.sprite.pumpkin.6",
Vec3::new(-7.0, -6.5, -0.0),
),
),
(
(BlockKind::Pumpkin, 6),
make_model(
"voxygen.voxel.sprite.pumpkin.7",
Vec3::new(-7.0, -9.5, -0.0),
),
),
//Lingonberries
(
(BlockKind::LingonBerry, 0),
@ -1572,6 +1594,22 @@ impl<V: RectRasterableVol> Terrain<V> {
Vec3::new(-9.5, -3.0, -0.25),
),
),
// Street Light
(
(BlockKind::StreetLamp, 0),
make_model(
"voxygen.voxel.sprite.misc.street_lamp",
Vec3::new(-4.5, -4.5, 0.0),
),
),
// Door
(
(BlockKind::Door, 0),
make_model(
"voxygen.voxel.sprite.door.door-0",
Vec3::new(-6.5, -6.5, 0.0),
),
),
]
.into_iter()
.collect(),