Difference between revisions of "Documentation/Engine/Sound/TruckRemote"

From SCS Modding Wiki
Jump to navigation Jump to search
(Created page with "=== Sounds - Remote Truck === The sound of a remote truck is in principle very similar to the sound of a player's truck engine.<br> (Please see the Documentation/Engine/Soun...")
 
(Event (remote/)"engine")
(One intermediate revision by the same user not shown)
Line 6: Line 6:
 
* The engine sound is integrated into one event (usually remote / engine). Including exhaust and turbo sounds.
 
* The engine sound is integrated into one event (usually remote / engine). Including exhaust and turbo sounds.
 
* Due to the performance, the sound for the remote truck needs to be significantly simplified.
 
* Due to the performance, the sound for the remote truck needs to be significantly simplified.
* It is not recommended to combine events of different banks for the engine sound.
 
  
=== Event (remote/)"engine" ===
+
=== Event "(remote/)engine" ===
  
 
Event "engine" plays sound of the engine of remote truck.<br>
 
Event "engine" plays sound of the engine of remote truck.<br>
Line 19: Line 18:
 
* load<br>the value is in the range <0 - 1><br>value represents the motor load<br>value < 0.05 means idle engine sound
 
* load<br>the value is in the range <0 - 1><br>value represents the motor load<br>value < 0.05 means idle engine sound
 
* rpm<br>the value is in the range <0 - 3000><br>the value represents the number of engine revs per second
 
* rpm<br>the value is in the range <0 - 3000><br>the value represents the number of engine revs per second
* engine/turbo<br>the value is in the range <0 - 1> and represents the action of the turbo system
+
* turbo<br>the value is in the range <0 - 1> and represents the action of the turbo system
 +
 
 +
== Remote Engine Sound Configuration ==
 +
 
 +
The sound configuration of the engine sounds is stored in the "accessory_engine_data" data.<br>
 +
There is array "sounds" which contents specification for the mandatory events of the engine.<br>
 +
That means that each type of the engine can have assigned its own sound bank.<br>
 +
The item "remote" has been added for the remote engine sound (since version 1.42)
 +
<br>
 +
Example:<br>
 +
There are configuration files of engines for the "Peterbilt 579" at the folder "\def\vehicle\truck\peterbilt.579\engine".<br>
 +
Each engine include ''@include "sound.sui" '' file which contents indirect definition of the events:
 +
<pre>
 +
sounds: 5
 +
sounds[]: "engine|/def/vehicle/truck/peterbilt.579/engine/sound_engine.soundref"
 +
...
 +
sounds[]: "remote|/def/vehicle/truck/peterbilt.579/engine/sound_engine_rm.soundref"
 +
</pre>
 +
There are .soundref file (for each event) to specify bank end FMOD event of the sound.
 +
 
 +
Content of the sound_engine_rm.soundref is:
 +
<pre>
 +
"source="/sound/truck/peterbilt_579_rm.bank#remote/engine"
 +
</pre>
 +
 
 +
== Engine Sound Example ==
 +
 
 +
Visit the [[Documentation/Engine/Sound/Downloads|Downloads]] section to get template project or sound examples.

Revision as of 08:24, 21 October 2021

Sounds - Remote Truck

The sound of a remote truck is in principle very similar to the sound of a player's truck engine.
(Please see the Sounds - Truck Engine for a better understanding.)

However, there are a few key differences to keep in mind:

  • The engine sound is integrated into one event (usually remote / engine). Including exhaust and turbo sounds.
  • Due to the performance, the sound for the remote truck needs to be significantly simplified.

Event "(remote/)engine"

Event "engine" plays sound of the engine of remote truck.
It has to be 3D event. The event should be routed to the "traffic" audio bus.
The event must be looped and its living cycle is controlled by "play" parameter (see bellow).

These event parameters must exist:

  • play
    The parameter "play" control living cycle of the event:
    value play = 1 means - sound is playing
    value play = 0 means - sound should be stopped
  • brake
    the value is in the range <0 - 1> and represents the action of the motor brake
  • load
    the value is in the range <0 - 1>
    value represents the motor load
    value < 0.05 means idle engine sound
  • rpm
    the value is in the range <0 - 3000>
    the value represents the number of engine revs per second
  • turbo
    the value is in the range <0 - 1> and represents the action of the turbo system

Remote Engine Sound Configuration

The sound configuration of the engine sounds is stored in the "accessory_engine_data" data.
There is array "sounds" which contents specification for the mandatory events of the engine.
That means that each type of the engine can have assigned its own sound bank.
The item "remote" has been added for the remote engine sound (since version 1.42)
Example:
There are configuration files of engines for the "Peterbilt 579" at the folder "\def\vehicle\truck\peterbilt.579\engine".
Each engine include @include "sound.sui" file which contents indirect definition of the events:

	sounds: 5
	sounds[]: "engine|/def/vehicle/truck/peterbilt.579/engine/sound_engine.soundref"
	...
	sounds[]: "remote|/def/vehicle/truck/peterbilt.579/engine/sound_engine_rm.soundref"

There are .soundref file (for each event) to specify bank end FMOD event of the sound.

Content of the sound_engine_rm.soundref is:

"source="/sound/truck/peterbilt_579_rm.bank#remote/engine"

Engine Sound Example

Visit the Downloads section to get template project or sound examples.