{"id":2186,"date":"2019-02-15T13:05:30","date_gmt":"2019-02-15T04:05:30","guid":{"rendered":"https:\/\/blog.criware.com\/?p=2186"},"modified":"2019-02-15T13:19:59","modified_gmt":"2019-02-15T04:19:59","slug":"simulating-space","status":"publish","type":"post","link":"https:\/\/blog.criware.com\/index.php\/2019\/02\/15\/simulating-space\/","title":{"rendered":"Simulating Space"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>Ambience is an important part of a video game\u2019s soundscape, applying additional context to the visuals and enhancing the player\u2019s overall sense of immersion. Beyond this, it can also imply a set of rules and gameplay mechanics. In this month\u2019s blog, we will look at setting up a state-machine in Atom Craft 3, which will help us to create the effect of stepping out into space. This same method can be applied to any ambience\/atmosphere which switches in a binary fashion, such as diving underwater, or perhaps something more esoteric like entering a dream-state.<\/p>\n<div style=\"max-width: 800px; margin: 0 auto; margin-bottom: 20px;\">\n<div style=\"width: 800px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-2186-1\" width=\"800\" height=\"450\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/outerspaceambience.mp4?_=1\" \/><a href=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/outerspaceambience.mp4\">https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/outerspaceambience.mp4<\/a><\/video><\/div>\n<\/div>\n<p>This project is an extension of the one used in \u00a0<a href=\"https:\/\/blog.criware.com\/index.php\/2019\/01\/21\/sonifying-ammo-count-in-ue4-with-adx2\/\">last month\u2019s blog<\/a> so that we have the sound effects element (in this case a gunshot) already set up. Download the finished product below to check it out.<\/p>\n<p><a href=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/1902_spacevaccuum.zip\" rel=\"\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1813\" style=\"display: inline-block;\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2018\/06\/zip.png\" alt=\"zip\" width=\"80\" height=\"78\" \/><br \/>\n1902_spacevacuum.zip<br \/>\n<em>This project was created using CRI Atom Craft V3.40.07<\/em><br \/>\n<\/a><\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"font-size: 180%;\">Ambience Selector<\/h2>\n<p>If you want to switch between discrete ambience states, you can use the \u201cTrack Transition by Selector\u201d Cue. For example, you might want to switch from being indoors to outdoors, or from being submerged to afloat. This is an efficient Cue type which keeps track of the current playback position, preventing tracks from starting over after each switch.<\/p>\n<ul>\n<li>Create a new Selector, and name it AmbienceSelector<\/li>\n<li>Right-click AmbienceSelector and Create Selector Label x 2\n<ul>\n<li>Name then \u201cinside\u201d, and \u201coutside\u201d respectively<\/li>\n<\/ul>\n<\/li>\n<li>Create Track Transition by Selector Cue, and in the Inspector:\n<ul>\n<li>Set <strong>Name<\/strong> = Cue_AmbienceSelector<\/li>\n<li>Set <strong>Fade-in Time for \u201cTrack Transition by Selector\u201d<\/strong> = 100<\/li>\n<li>Set <strong>Fade-out Time for \u201cTrack Transition by Selector\u201d<\/strong> = 100<\/li>\n<\/ul>\n<\/li>\n<li>Right-Click Cue_AbmienceSelector and Create BeatSync Parameter, and in the Inspector:\n<ul>\n<li>Set <strong>BPM <\/strong>= 960 (not essential, but it results in a more responsive transition speed)<\/li>\n<\/ul>\n<\/li>\n<li>Create ambience tracks for inside and outside layers<\/li>\n<li>Click the Selector tab on the left-hand panel of the Timeline View and match the Selector for each respective track<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2196\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-1.png\" alt=\"4-1\" width=\"1587\" height=\"520\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-1.png 1587w, https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-1-300x98.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-1-768x252.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-1-1024x336.png 1024w\" sizes=\"auto, (max-width: 1587px) 100vw, 1587px\" \/><\/p>\n<p>This can now be auditioned in the Session Window. Listen to the way that the ambiences transition, and experiment with different transition lengths and curves to hear their effects. A dream-state might require a slower transition, whereas jumping into water would likely want to be a lot quicker.<\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"font-size: 180%;\">Effects Switching<\/h2>\n<p>To sell the effect of stepping into space, we are going to use a low-pass filter effect. Snapshots offer a handy way of dealing with this, by allowing us to set up several mixes which can be switched between on the fly.<\/p>\n<ul>\n<li>Head to the DspSettings view and Create DSP Bus\n<ul>\n<li>Set <strong>Name<\/strong> = BUS_SFX<\/li>\n<li>Apply Biquad Effects<\/li>\n<li>Send this Bus to MasterOut<\/li>\n<\/ul>\n<\/li>\n<li>Select BusMap_Default and set <strong>DspBusName1<\/strong> = BUS_SFX<\/li>\n<li>Select Cue_GunShot, then in Inspector\n<ul>\n<li>Enable <strong>BusSend1<\/strong><\/li>\n<li>Set <strong>BusSend0<\/strong> = 0.00<\/li>\n<\/ul>\n<\/li>\n<li>Right-click DspBusSetting_0 and Create Snapshot x 2\n<ul>\n<li>Name them \u201cinside\u201d, and \u201coutside\u201d respectively<\/li>\n<\/ul>\n<\/li>\n<li>Select \u201coutside\u201d Snapshot and in Inspector\n<ul>\n<li>Set <strong>Biquad Cof<\/strong> <strong>Hz<\/strong> = 250<\/li>\n<li>Set <strong>Biquad Q<\/strong> = 2.00<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2197\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-2.png\" alt=\"4-2\" width=\"1587\" height=\"520\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-2.png 1587w, https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-2-300x98.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-2-768x252.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-2-1024x336.png 1024w\" sizes=\"auto, (max-width: 1587px) 100vw, 1587px\" \/><\/p>\n<p>This can also be auditioned in the Session Window in conjunction with the Selector switch, and we can adjust the Snapshot Change Time to preference (setting this to 100 will match our Selector transition times). However, in order to achieve this, we have to manually change both the Snapshot state and the Label state in order to hear the intended outcome. We can set up a quick prototype in UE4 to facilitate this.<\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"font-size: 180%;\">Implementation<\/h2>\n<p>As with the Atom Craft project, we can simply jump into the UE4 project from last month to get started. All we need is a Trigger Box (labelled OutsideSpace below) which we can walk in and out of, and to drag our Cue_AmbienceSelector into the level. Select this AtomSound and disable Auto Activate under Activation in the Details Tab.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2198\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-3.png\" alt=\"4-3\" width=\"1515\" height=\"753\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-3.png 1515w, https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-3-300x149.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-3-768x382.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-3-1024x509.png 1024w\" sizes=\"auto, (max-width: 1515px) 100vw, 1515px\" \/><\/p>\n<p>Next, from the Blueprints menu at the top, select Open Level Blueprint. The Blueprint below represents some simple logic for the level, which:<\/p>\n<ul>\n<li>Plays the Ambience Cue when the game starts<\/li>\n<li>Sets the default ASR rack to a variable called DefaultASRRack (this is just for neatness)<\/li>\n<li>Sets the Selector Label relative to the Trigger box<\/li>\n<li>Applies a DSP Bus Snapshot relative to the Trigger box<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2199\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-4.png\" alt=\"4-4\" width=\"1527\" height=\"738\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-4.png 1527w, https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-4-300x145.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-4-768x371.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2019\/02\/4-4-1024x495.png 1024w\" sizes=\"auto, (max-width: 1527px) 100vw, 1527px\" \/><\/p>\n<p>This blueprint is self-documenting and does exactly what you\u2019d expect. When the player enters the Trigger Box that we set up, the Selector and Snapshot update to \u201coutside\u201d, and then back to \u201cinside\u201d when the player leaves. It\u2019s a very rough system, but a good one for testing the \u201cfeel\u201d in a deeper context than that which can be achieved using Atom Craft\u2019s Session Window alone.<\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"font-size: 180%;\">Conclusion<\/h2>\n<p>ADX2 has many great features which can be used together to create complex interactive systems. Better still, they are easy to implement and further experiment with.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Ambience is an important part of a video game\u2019s soundscape, applying additional context to the visuals and enhancing the<\/p>\n","protected":false},"author":2,"featured_media":2210,"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-2186","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\/2186","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=2186"}],"version-history":[{"count":15,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/2186\/revisions"}],"predecessor-version":[{"id":2218,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/2186\/revisions\/2218"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/media\/2210"}],"wp:attachment":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/media?parent=2186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/categories?post=2186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/tags?post=2186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}