mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Music, ambience tweaks, and more
This commit is contained in:
parent
1e3b5383cf
commit
194b1866c6
@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Weather generated on server is sent to clients, and seen on clients as rain/clouds.
|
||||
- Updated Brazilian Portuguese Translation
|
||||
- Lightning storms
|
||||
- More varied ambient birdcalls
|
||||
|
||||
### Changed
|
||||
|
||||
|
BIN
assets/voxygen/audio/ambience/leaves.ogg
(Stored with Git LFS)
BIN
assets/voxygen/audio/ambience/leaves.ogg
(Stored with Git LFS)
Binary file not shown.
@ -11,8 +11,16 @@
|
||||
),
|
||||
Birdcall: (
|
||||
files: [
|
||||
"voxygen.audio.sfx.ambient.birdcall_1",
|
||||
"voxygen.audio.sfx.ambient.birdcall_2",
|
||||
"voxygen.audio.sfx.ambient.birdcall_01",
|
||||
"voxygen.audio.sfx.ambient.birdcall_02",
|
||||
"voxygen.audio.sfx.ambient.birdcall_03",
|
||||
"voxygen.audio.sfx.ambient.birdcall_04",
|
||||
"voxygen.audio.sfx.ambient.birdcall_05",
|
||||
"voxygen.audio.sfx.ambient.birdcall_06",
|
||||
"voxygen.audio.sfx.ambient.birdcall_07",
|
||||
"voxygen.audio.sfx.ambient.birdcall_08",
|
||||
"voxygen.audio.sfx.ambient.birdcall_09",
|
||||
"voxygen.audio.sfx.ambient.birdcall_10",
|
||||
],
|
||||
threshold: 10.0,
|
||||
),
|
||||
|
BIN
assets/voxygen/audio/sfx/ambient/birdcall_01.ogg
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/audio/sfx/ambient/birdcall_01.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/audio/sfx/ambient/birdcall_02.ogg
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/audio/sfx/ambient/birdcall_02.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/audio/sfx/ambient/birdcall_03.ogg
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/audio/sfx/ambient/birdcall_03.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/audio/sfx/ambient/birdcall_04.ogg
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/audio/sfx/ambient/birdcall_04.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/audio/sfx/ambient/birdcall_05.ogg
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/audio/sfx/ambient/birdcall_05.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/audio/sfx/ambient/birdcall_06.ogg
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/audio/sfx/ambient/birdcall_06.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/audio/sfx/ambient/birdcall_07.ogg
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/audio/sfx/ambient/birdcall_07.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/audio/sfx/ambient/birdcall_08.ogg
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/audio/sfx/ambient/birdcall_08.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/audio/sfx/ambient/birdcall_09.ogg
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/audio/sfx/ambient/birdcall_09.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/audio/sfx/ambient/birdcall_1.ogg
(Stored with Git LFS)
BIN
assets/voxygen/audio/sfx/ambient/birdcall_1.ogg
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/audio/sfx/ambient/birdcall_10.ogg
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/audio/sfx/ambient/birdcall_10.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/audio/sfx/ambient/birdcall_2.ogg
(Stored with Git LFS)
BIN
assets/voxygen/audio/sfx/ambient/birdcall_2.ogg
(Stored with Git LFS)
Binary file not shown.
@ -67,6 +67,7 @@
|
||||
timing: Some(Night),
|
||||
biomes: [
|
||||
(Forest, 1),
|
||||
(Taiga, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
music_state: Activity(Explore),
|
||||
@ -79,6 +80,7 @@
|
||||
timing: Some(Night),
|
||||
biomes: [
|
||||
(Forest, 2),
|
||||
(Taiga, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
music_state: Activity(Explore),
|
||||
@ -226,7 +228,6 @@
|
||||
weather: None,
|
||||
biomes: [
|
||||
(Snowland, 1),
|
||||
(Taiga, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
music_state: Activity(Explore),
|
||||
@ -268,6 +269,7 @@
|
||||
weather: None,
|
||||
biomes: [
|
||||
(Forest, 2),
|
||||
(Taiga, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
music_state: Activity(Explore),
|
||||
@ -282,6 +284,7 @@
|
||||
biomes: [
|
||||
(Forest, 2),
|
||||
(Jungle, 1),
|
||||
(Taiga, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
music_state: Activity(Explore),
|
||||
@ -322,7 +325,6 @@
|
||||
weather: None,
|
||||
biomes: [
|
||||
(Snowland, 1),
|
||||
(Taiga, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
music_state: Activity(Explore),
|
||||
@ -336,7 +338,6 @@
|
||||
weather: None,
|
||||
biomes: [
|
||||
(Snowland, 1),
|
||||
(Taiga, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
music_state: Activity(Explore),
|
||||
@ -376,6 +377,7 @@
|
||||
weather: None,
|
||||
biomes: [
|
||||
(Forest, 2),
|
||||
(Taiga, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
music_state: Activity(Explore),
|
||||
@ -389,6 +391,7 @@
|
||||
weather: None,
|
||||
biomes: [
|
||||
(Mountain, 1),
|
||||
(Taiga, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
music_state: Activity(Explore),
|
||||
@ -402,6 +405,7 @@
|
||||
weather: None,
|
||||
biomes: [
|
||||
(Forest, 2),
|
||||
(Taiga, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
music_state: Activity(Explore),
|
||||
@ -521,6 +525,16 @@
|
||||
|
||||
// Cave music
|
||||
|
||||
Individual((
|
||||
title: "Stars Like Stalactites",
|
||||
path: "voxygen.audio.soundtrack.cave.stars_like_stalactites",
|
||||
length: 130.0,
|
||||
timing: None,
|
||||
biomes: [],
|
||||
site: Some(Cave),
|
||||
music_state: Activity(Explore),
|
||||
artist: "DragonDee",
|
||||
)),
|
||||
Individual((
|
||||
title: "Cavernous Hollow",
|
||||
path: "voxygen.audio.soundtrack.cave.cavernous_hollow",
|
||||
|
BIN
assets/voxygen/audio/soundtrack/cave/saturated_hallows.ogg
(Stored with Git LFS)
BIN
assets/voxygen/audio/soundtrack/cave/saturated_hallows.ogg
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/audio/soundtrack/cave/stars_like_stalactites.ogg
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/audio/soundtrack/cave/stars_like_stalactites.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/audio/soundtrack/overworld/between_the_fairies.ogg
(Stored with Git LFS)
BIN
assets/voxygen/audio/soundtrack/overworld/between_the_fairies.ogg
(Stored with Git LFS)
Binary file not shown.
@ -53,10 +53,10 @@ impl AmbientMgr {
|
||||
// If the conditions warrant creating a channel of that tag
|
||||
if AmbientChannelTag::get_tag_volume(tag, client, camera)
|
||||
> match tag {
|
||||
AmbientChannelTag::Wind => 0.0,
|
||||
AmbientChannelTag::Wind => 0.1,
|
||||
AmbientChannelTag::Rain => 0.1,
|
||||
AmbientChannelTag::Thunder => 0.0,
|
||||
AmbientChannelTag::Leaves => 0.1,
|
||||
AmbientChannelTag::Thunder => 0.1,
|
||||
AmbientChannelTag::Leaves => 0.05,
|
||||
}
|
||||
&& audio.get_ambient_channel(tag).is_none()
|
||||
{
|
||||
@ -122,7 +122,7 @@ impl AmbientChannelTag {
|
||||
// Tree density factors into wind volume. The more trees,
|
||||
// the lower wind volume. The trees make more of an impact
|
||||
// the closer the camera is to the ground.
|
||||
let tree_multiplier = ((1.0 - tree_density)
|
||||
let tree_multiplier = ((1.0 - (tree_density * 0.5))
|
||||
+ ((cam_pos.z - terrain_alt).abs() / 150.0).powi(2))
|
||||
.min(1.0);
|
||||
|
||||
@ -131,13 +131,14 @@ impl AmbientChannelTag {
|
||||
// Client wind speed is a float approx. -30.0 to 30.0 (polarity depending on
|
||||
// direction)
|
||||
let wind_speed_multiplier = (client.weather_at_player().wind.magnitude_squared()
|
||||
/ 30.0_f32.powi(2))
|
||||
.min(1.0);
|
||||
/ 15.0_f32.powi(2))
|
||||
.min(1.33);
|
||||
|
||||
alt_multiplier
|
||||
((alt_multiplier
|
||||
* tree_multiplier
|
||||
* (wind_speed_multiplier + ((cam_pos.z - terrain_alt).abs() / 150.0).powi(2))
|
||||
.min(1.0)
|
||||
* (wind_speed_multiplier + ((cam_pos.z - terrain_alt).abs() / 150.0).powi(2)))
|
||||
+ ((alt_multiplier * 0.15) * tree_multiplier))
|
||||
.min(1.15)
|
||||
},
|
||||
AmbientChannelTag::Rain => {
|
||||
let focus_off = camera.get_focus_pos().map(f32::trunc);
|
||||
@ -152,12 +153,10 @@ impl AmbientChannelTag {
|
||||
let camera_multiplier =
|
||||
1.0 - ((cam_pos.z - terrain_alt).abs() / 75.0).powi(2).min(1.0);
|
||||
|
||||
let rain_intensity = (client.weather_at_player().rain * 500.0) * camera_multiplier;
|
||||
|
||||
rain_intensity.min(0.9)
|
||||
((client.weather_at_player().rain * 2.5) * camera_multiplier).min(0.95)
|
||||
},
|
||||
AmbientChannelTag::Thunder => {
|
||||
let rain_intensity = client.weather_at_player().rain * 500.0;
|
||||
let rain_intensity = (client.weather_at_player().rain * 2.5).min(1.33);
|
||||
|
||||
if rain_intensity < 0.7 {
|
||||
0.0
|
||||
@ -183,8 +182,13 @@ impl AmbientChannelTag {
|
||||
+ ((cam_pos.z - terrain_alt + 20.0).abs() / 150.0).powi(2))
|
||||
.min(1.0));
|
||||
|
||||
// Take into account wind speed too, which amplifies tree noise
|
||||
let wind_speed_multiplier = (client.weather_at_player().wind.magnitude_squared()
|
||||
/ 20.0_f32.powi(2))
|
||||
.min(1.0);
|
||||
|
||||
if tree_multiplier > 0.1 {
|
||||
tree_multiplier
|
||||
(tree_multiplier * (1.0 + wind_speed_multiplier)).min(1.33)
|
||||
} else {
|
||||
0.0
|
||||
}
|
||||
@ -219,12 +223,9 @@ fn get_target_volume(
|
||||
{
|
||||
volume_multiplier *= 0.1;
|
||||
}
|
||||
// Is the camera roughly under the terrain?
|
||||
if cam_pos.z < terrain_alt - 20.0 {
|
||||
volume_multiplier = 0.0;
|
||||
}
|
||||
|
||||
volume_multiplier.clamped(0.0, 1.0)
|
||||
// Is the camera underneath the terrain? Fade out the lower it goes beneath.
|
||||
volume_multiplier * ((cam_pos.z - terrain_alt) / 30.0 + 1.0).clamped(0.0, 1.0)
|
||||
}
|
||||
|
||||
pub fn load_ambience_items() -> AssetHandle<AmbientCollection> {
|
||||
|
@ -212,7 +212,7 @@ impl EventMapper for BlockEventMapper {
|
||||
// block of interest type which picks fewer leaf blocks
|
||||
// Hack to reduce the number of bird, frog, and water sounds
|
||||
if ((sounds.sfx == SfxEvent::Birdcall || sounds.sfx == SfxEvent::Owl)
|
||||
&& thread_rng().gen_bool(0.999))
|
||||
&& thread_rng().gen_bool(0.9995))
|
||||
|| (sounds.sfx == SfxEvent::Frog && thread_rng().gen_bool(0.75))
|
||||
|| (sounds.sfx == SfxEvent::RunningWaterSlow
|
||||
&& thread_rng().gen_bool(0.5))
|
||||
|
@ -38,7 +38,7 @@ impl Default for AudioSettings {
|
||||
Self {
|
||||
master_volume: 1.0,
|
||||
inactive_master_volume_perc: 0.5,
|
||||
music_volume: 0.3,
|
||||
music_volume: 0.25,
|
||||
sfx_volume: 0.6,
|
||||
ambience_volume: 0.6,
|
||||
num_sfx_channels: 60,
|
||||
|
Loading…
Reference in New Issue
Block a user