{"id":4323,"date":"2023-05-11T11:13:54","date_gmt":"2023-05-11T02:13:54","guid":{"rendered":"https:\/\/blog.criware.com\/?p=4323"},"modified":"2024-05-20T15:03:38","modified_gmt":"2024-05-20T06:03:38","slug":"using-the-doppler-effect","status":"publish","type":"post","link":"https:\/\/blog.criware.com\/index.php\/2023\/05\/11\/using-the-doppler-effect\/","title":{"rendered":"Using the Doppler effect"},"content":{"rendered":"<p>The Doppler effect can be used to emphasize the sense of speed when a 3D sound source is in motion. In this post, \u00a0we will see how to set this effect in Atom Craft and use it in a simple Unreal project.<\/p>\n<div class=\"wp-video\" style=\"width: 800px; display: block; margin: 40px auto;\">\n<div style=\"width: 800px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-4323-1\" width=\"800\" height=\"450\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/Video_Doppler.mp4?_=1\" \/><a href=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/Video_Doppler.mp4\">https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/Video_Doppler.mp4<\/a><\/video><\/div>\n<\/div>\n<h2 style=\"font-size: 150%; font-weight: bold; margin-top: 40px;\">Atom Craft<\/h2>\n<p>We will use a droid probe moving back and forth to demonstrate the effect. We designed two sounds, one for the engine, and the other for its vocalization.<\/p>\n<ul>\n<li>The engine is a simple loop with enough tonal components to effectively showcase the doppler effect.<\/li>\n<li>The vocalizations consist of randomized bleep sequences.<\/li>\n<\/ul>\n<p>Once the sounds are generated, we can import them as Materials in Atom Craft and create the Cues:<\/p>\n<ul>\n<li>For the engine, set the <em>Override loop information Flag<\/em> property to <em>True<\/em>.<\/li>\n<li>Drag and drop the engine Material on a newly created <strong>Polyphonic Cue<\/strong>.<\/li>\n<li>Then, for the vocalizations, create a <strong>Shuffle Cue<\/strong> using all the variations and set the <em>Pitch Random Range<\/em> to 200.<\/li>\n<li>Set the <em>Playback mode<\/em> to  <em>PlayList<\/em>.<\/li>\n<li>Finally, in the <strong>List Editor<\/strong>, change the <em>Playback Timing Random<\/em> to 3000 and the <em>Predelay Time Random Range<\/em> to 500 in order to get random vocalization timings.<\/li>\n<\/ul>\n<p>The Cues also\u00a0 need to be switched to 3D. \u00a0Since they will be triggered from the same source, the exact same settings can be used for both Cues:<\/p>\n<ul>\n<li>Select a Cue and change the <em>Pan Type<\/em> to <em>3D Positioning<\/em>.<\/li>\n<li>Set the <em>Min Attenuation Distance<\/em> to 1.50, and the <em>Max Attenuation Distance<\/em> to 20.<\/li>\n<li>Then, set the <em>3D Positioning Doppler Coefficient<\/em> between 1 and 3 (values above 1 will produce an exagerated Doppler effect).<\/li>\n<\/ul>\n<p style=\"text-align:center;\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/01-3D-Settings.png\" alt=\"01 - 3D Settings\" width=\"498\" height=\"735\" class=\"alignnone size-full wp-image-4333\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/01-3D-Settings.png 498w, https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/01-3D-Settings-203x300.png 203w\" sizes=\"auto, (max-width: 498px) 100vw, 498px\" \/>\n<\/p>\n<p>&nbsp;<\/p>\n<p>Optionally , an AISAC can be assigned to the 3D Distance parameter. In that case, be sure to create a <em>Volume graph<\/em> and a <em>Biquad \u2013 Cutoff<\/em> graph in each Cue to achieve a more convincing effect.<\/p>\n<p style=\"text-align:center;\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/02-Aisac.png\" alt=\"02 - Aisac\" width=\"922\" height=\"402\" class=\"alignnone size-full wp-image-4334\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/02-Aisac.png 922w, https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/02-Aisac-300x131.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/02-Aisac-768x335.png 768w\" sizes=\"auto, (max-width: 922px) 100vw, 922px\" \/>\n<\/p>\n<p>With the Cues ready, <strong>build the Atom CueSheet binary.<\/strong> This example does not require any specific settings, so simply make sure to tick <em>Output ACF Binary<\/em>.<\/p>\n<h2 style=\"font-size: 150%; font-weight: bold; margin-top: 40px;\">Unreal Engine<\/h2>\n<p>In Unreal, drag and drop the .acb and .acf files in the content browser to create the Unreal assets. The two Cues will appear in the browser.<\/p>\n<p>We prepared a Blueprint for a Pawn, in order to make the probe move back and forth, by following these steps:<\/p>\n<ul>\n<li>Create an <strong>Event BeginPlay<\/strong><\/li>\n<li>Connect the event to a <strong>Move Component To.<\/strong><\/li>\n<li>Set the probe\u2019s targeted coordinates in <em>Target Relative Location<\/em>.<\/li>\n<li>Connect the <em>Completed<\/em> pin to a new <strong>Move Component To<\/strong>.<\/li>\n<li>This time, set the <em>Target Relative Location<\/em> to the origin point of the probe.<\/li>\n<li>Finally, connect the <em>Completed<\/em> pin to the first <strong>Move Component To<\/strong>, in order to loop the movement.<\/li>\n<\/ul>\n<p style=\"text-align:center;\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/03-Blueprint.png\" alt=\"03 - Blueprint\" width=\"1180\" height=\"534\" class=\"alignnone size-full wp-image-4335\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/03-Blueprint.png 1180w, https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/03-Blueprint-300x136.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/03-Blueprint-768x348.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/03-Blueprint-1024x463.png 1024w\" sizes=\"auto, (max-width: 1180px) 100vw, 1180px\" \/>\n<\/p>\n<p>Now the probe is moving as expected and just needs to emit sounds:<\/p>\n<ul>\n<li>Select the two Cues in the content browser, then drag and drop them onto the Pawn component.<\/li>\n<li>It will create two new <strong>Atom Components<\/strong> with our two Cues automatically loaded.<\/li>\n<\/ul>\n<p style=\"text-align:center;\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/04-Atom-Component.png\" alt=\"04 - Atom Component\" width=\"1353\" height=\"729\" class=\"alignnone size-full wp-image-4336\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/04-Atom-Component.png 1353w, https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/04-Atom-Component-300x162.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/04-Atom-Component-768x414.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/04-Atom-Component-1024x552.png 1024w\" sizes=\"auto, (max-width: 1353px) 100vw, 1353px\" \/>\n<\/p>\n<p>Play the level, and you should hear the Doppler effect when the probe is moving.<\/p>\n<p>Implementing the Doppler effect is quite simple, but it can make your levels sound more convincing, so do not hesitate to use it!<\/p>\n<div style=\"max-width: 800px; margin: 0 auto; margin-bottom: 20px; text-align: center;\"><a style=\"display: block; border: 1px solid #ccc; padding: 20px; max-width: 100%; margin: 0 auto;\" href=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2023\/05\/AtomCraft_Project_Doppler.zip\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1813\" style=\"display: block; margin: 0 auto;\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2018\/06\/zip.png\" alt=\"zip\" width=\"80\" height=\"78\" \/>AtomCraft_Project_Doppler.zip<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Doppler effect can be used to emphasize the sense of speed when a 3D sound source is in motion.<\/p>\n","protected":false},"author":2,"featured_media":5426,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[5,7],"tags":[],"class_list":["post-4323","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-adx","category-tutorials"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/4323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/comments?post=4323"}],"version-history":[{"count":10,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/4323\/revisions"}],"predecessor-version":[{"id":5425,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/4323\/revisions\/5425"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/media\/5426"}],"wp:attachment":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/media?parent=4323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/categories?post=4323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/tags?post=4323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}