so let’s say i’ve got my gunshot/explosion/whatever set to a maximum audible distance of 1200 meters. the problem is, when that sound plays from about 800 meters away, it plays instantly. is there anyway to simulate the speed of sound (~340m/s) using an effect or otherwise?
velocity or seek speed seemed like my best bet in parameter properties, but produced strange and unexpected results. for instance, velocity set to 340 units/s would play all the layers at strange intervals. like if the sound went off at 50 meters, it would play the first layer (set to go quiet at 100 meters), then shortly after would play the next layer, then the last layer, as if playing through the distance parameter like a timeline.
so my best bet is probably an effect, right? a time delay maybe? or is there an easier way that i am missing?
thanks in advance.
- solecist asked 10 years ago
[quote="solecist":rd6lpg1r]now it’s working! thanks.
first issue seems to be that time offset is not a time delay, but an actual offset in the timeline of the sound. so if the time offset is 1 second, it skips the first second of the sound and plays the remainder immediately (no delay – regardless of distance). is this right or i am i just missing something?[/quote:rd6lpg1r]
The time offset is variable, the amount of silence played at the start of sound is set by the distance parameter. If you always want delay you could simply adjust the time offset envelope accordingly/
When the listener and sound emiter are close, the time offset = 1, meaning the the silent section of the file is skipped, playback of the actual important part of the audio file is played immediately.
When the listener and sound emiter are far apart, the time offset = 0, meaning no section of the file is skipped, both the silence and meaningful part of the sound occurs.
To answer your question:
Playback isn’t delayed, however there is a variable amount of silence added to the front of the actual sound.
As I stated in a previous post, this technique is a little hacky – but it does simulate the delay effect of distance.
from my viewpoint i can’t see how that would be possible. i follow you up until i have to actually place the sound in the -100 to 0 area of my timeline. wouldn’t that mess up my distance parameter? here is a screenshot of one of the sound’s setup:
sorry if i’m totally ignorant. i just started using this a couple of days ago.
one little bit of confusion after attempting to use this method…setting the delay parameter.
[quote:1wu1cpge]To use this event, you would set the "delay" parameter to the appropriate distance (e.g. 500 if the event is 500 meters away) before starting the event. This won’t work in Designer, as the parameter will be reset to -100 when the event is started, but you can see the effect by starting the event and then setting the "delay" parameter to the appropriate distance. The sounds won’t start until the "delay" parameter reaches 0. [/quote:1wu1cpge]
this seems to imply that i have to set the distance manually, whereas i am looking for a dynamic speed simulation based on whatever distance my avatar happens to be from the sound. am i right to assume this or have i just misunderstood?
why don’t you just use the distance parameter to control the delay of when the sound is played? You already have the distance parameter setup. Just add Fmod Echo to both layers with the following settings:
delay – starting at 0.0sec for 0 distance, then line to 3.53sec for distance 1200.
decay – 0
max channels – 0
dry mix – 0
wet mix – 100
This will give you the realistic delay over distance like you are looking for. You might want to also use the low pass filter also controlled by distance to simulate the effects air has on sounds at a distance. Good luck. Hopefully this helps.
[quote="solecist":2nrdkklk]this seems to imply that i have to set the distance manually, whereas i am looking for a dynamic speed simulation based on whatever distance my avatar happens to be from the sound. am i right to assume this or have i just misunderstood?[/quote:2nrdkklk]
Yes, that is correct. In your game engine, you would need to set the "delay" parameter manually just before starting the event.
- Guest answered 10 years ago
No, problem. The only down fall for this is the amount of memory it could comsume. Try it out and be careful to either use it sparingly on only the sounds it is necessary for or find a better way to do it using programming. Using the programming in your game you can just delay the message being sent rather than delaying a sampled sound. The sample goes into a buffer which takes up lots of memory if used simultaneously by lots of events.
we did this using the delay effect at first but like mentioned elsewhere canned that because the memory footprint for those and echo was just too big on ps3.
in the end, we just triggered the sound from the engine at the appropriate time. it was easy because we also included a small camera shake and had a shockwave vfx that also needed to reach the player at the correct time.. so we already knew in the engine when the sound was supposed to hit the player and just triggered the event then, with no fancy parameter or layer tricks needed.
this is probably not as useful a solution for your case however. we only did this for explosions, not weapons or other fast firing stuff because it just became kind of confusing, it felt like the sound was out of sync rather than seeming more realistic. (and the explosions had 2 components, one crack that triggers on the explosion, and then one which is the shockwave/thump that was heard at speed-of-sound distance.)
- acrosby answered 10 years ago
I have had a quick thought about adding a variable delay. This is a little bit ‘hacky’ until a start delay is added to designer.
Has anyone tried adding silence to the front of the sample, then using the ‘time offset’ effect with the distance parameter?
Add one second of silence to the front of the gunshot sample. When using compressed formats, this will not take up much space.
Place the sample on a layer of an event.
- Add a distance parameter (min = 0, max= 1100 feet)
- Add the ‘time offset’ effect.
Set the effect envelope so that:
at parameter 0 the time offset = 1 sec.
at parameter 1100 the time offset = 0 sec.
This means at a small distance, the delay is small and at a large distance the delay is large.
- You can then use the occlusion effect to manipulate the direct and reverb effects to make the gunshot sound more distant.
All this would be controlled by a single distance parameter.
If anyone is interested I can put a project up on the website.
hmm, well i’m almost certain i have it set up properly otherwise. it almost feels like they’re overlapping eachother or something, because if it is quiet for a moment the first next two or three sounds come in loud and clear, but the rest following are silent. this is in a scene with hundreds of these sounds playing at once, by the way. i didn’t notice much of a drop in framerate, though.
i also tried testing the sounds one at a time, and i’d say it has a 60% success rate…the other 40% of the time it is cutting the sound off early.
[quote="solecist":1jrvlkjm]i am definitely interested! thanks for reviving this…i thought it was long-gone[/quote:1jrvlkjm]
I’ve put an example here:
The example demonstrates how to create a variable pre-delay and simulate distance with a single parameter.
Please login first to submit.