# UE4 - Sound occlusion with walls

**URL:** <https://qa.fmod.com/t/ue4-sound-occlusion-with-walls/14866>\
**Category:** FMOD Studio\
**Created:** [July 18, 2019, 9:26am UTC](https://qa.fmod.com/t/ue4-sound-occlusion-with-walls/14866 "2019-07-18T09:26:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![blast](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/blast/32/520_2.png) [@blast](https://qa.fmod.com/u/blast)\
**Post date:** [July 18, 2019, 9:26am UTC](https://qa.fmod.com/t/ue4-sound-occlusion-with-walls/14866/1 "2019-07-18T09:26:51Z")

</div>

Hello,

I want to setup an occlusion system to filter out sounds based on being in the room that is producing audio vs. being outside of the room. I have a sound attached to a object in the room, and I feel like I need to do a bit of Blueprint work. But if anyone knows a good way to set this up, please let me know,

Thanks,  
🙂

---

<div class="post-metadata">

**Author:** ![sdjknights](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@sdjknights](https://qa.fmod.com/u/sdjknights)\
**Post date:** [July 18, 2019, 10:29am UTC](https://qa.fmod.com/t/ue4-sound-occlusion-with-walls/14866/2 "2019-07-18T10:29:41Z")

</div>

So, annoyingly, occlusion is included with UE4’s tools but I don’t believe we can use them through Fmod.

However, before this was included, I did this by performing a line trace between the sound source and the player, getting any collision, measuring it and working that into the volume/frequency offset.

---

<div class="post-metadata">

**Author:** ![blast](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/blast/32/520_2.png) [@blast](https://qa.fmod.com/u/blast)\
**Post date:** [July 18, 2019, 10:41am UTC](https://qa.fmod.com/t/ue4-sound-occlusion-with-walls/14866/3 "2019-07-18T10:41:19Z")

</div>

Ok awesome. Any references for doing either of these? Is the ray tracing way good if I have many sound sources in a level? Where can I setup occlusion within ue4?

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [July 18, 2019, 10:42pm UTC](https://qa.fmod.com/t/ue4-sound-occlusion-with-walls/14866/4 "2019-07-18T22:42:06Z")

</div>

An Occlusion system is built into the FMOD UE4 Integration: [https://fmod.com/resources/documentation-ue4?version=2.0&page=user-guide.html#occlusion](https://fmod.com/resources/documentation-ue4?version=2.0&page=user-guide.html#occlusion)

Although it sounds like you want to use Ambient Zones: [https://fmod.com/resources/documentation-ue4?version=2.0&page=user-guide.html#ambient-zone-settings](https://fmod.com/resources/documentation-ue4?version=2.0&page=user-guide.html#ambient-zone-settings)

---

<div class="post-metadata">

**Author:** ![blast](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/blast/32/520_2.png) [@blast](https://qa.fmod.com/u/blast)\
**Post date:** [July 19, 2019, 12:51am UTC](https://qa.fmod.com/t/ue4-sound-occlusion-with-walls/14866/5 "2019-07-19T00:51:42Z")

</div>

Does the object that I want to have the sound attached need to use the FMOD audio components ‘Event’ field, or can i use ‘PlayEventAtLocation’ in Blueprint? And do i need to set the value of ‘Occlusion’ parameter anywhere? I set it up according to the documentation but nothing is happening.

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [July 19, 2019, 5:59am UTC](https://qa.fmod.com/t/ue4-sound-occlusion-with-walls/14866/6 "2019-07-19T05:59:26Z")

</div>

Only FMODAudioComponents are able to use Occlusion in this way. If you have set the occlusion parameter in the Settings and made sure that occlusion is enabled on the component, then the Integration will take care of setting it for you. Also check that the trace channel suits your requirement.
