Difference between revisions of "MNSI:Optimisation"
(Created page with "Outlines here are ways to optimize resource usage of a MNSI component. File:OptimisationSettings1.JPG") |
|||
Line 1: | Line 1: | ||
Outlines here are ways to optimize resource usage of a MNSI component. | Outlines here are ways to optimize resource usage of a MNSI component. | ||
==Basics== | |||
[[File:OptimisationSettings1.JPG]] | [[File:OptimisationSettings1.JPG]] | ||
Pictured are the settings relevant to optimization. Since every prop can have totally different usage scenarios, it is useful to be able to manually adjust the "quality" of the MNSI component. So that a small rock debris could be made to utilize 1/4th of the resources MNSI would utilise at full default quality settings. | |||
===Friction sounds=== | |||
Currently, the most expensive feature are the Friction Sounds. Rolling and Linear friction sounds despite numerous iterations and architecture changes, are still asynchronous and can continue to update their math even if the prop is no longer moving. | |||
There are several things possible to mitigate their expense. The obvious, is to turn off friction sounds entirely using the Do Friction Sounds boolean toggle. This is a bit of an overkill. But. It is usefil to turn off the option for small props, debris, props that aren't expected to slide or roll, or props that are spawned by the thousands from particle effects. Sometimes the geometry of the prop can also render friction and rolling sounds pointless. Imagine a prop with great friction coefficient that has no round surfaces. | |||
For props that still need Some friction and rolling sounds, there are three settings to adjust their cost. | |||
; User Component Cleanup time : Expected performance gain from tweaking - Low - When roll and friction sounds are played, a single audio component is created once, and then modulated based on speed and other math. Once the prop is detected to be stationary, this variable tells MNSI how long to wait before the rolling and friction audio components are automatically deleted. | |||
; User Linear and Roll sound update frequency : Expected performance gain from tweaking - High - This value defines how often math is performed on the roll and friction components. | |||
; User Linear and Roll sound cut time : Expected performance gain from tweaking - Medium - This is a special timer that constantly checks if the prop is actually in contact with a surface. As soon as a prop becomes airborn and this many seconds pass, rolling and friction sounds are muted, and the Component Cleanup timer starts. | |||
It is clear that props like barrels or bottles can have a relatively slow update frequency. The default 0.25 is meant for them. Props that change their motion quickly, car wheels, players, can be tweaked to have much faster update frequencies. | |||
The Cut time can also be adjusted for props that experience a lot of surface irregularities. Train Wheels would need a fast cut time to simulate rail joint sounds, and a bottles on a table can be given a longer cut time to reduce their cost. | |||
===Impact sounds=== | |||
Relatively inexpensive. Can be used as is almost always. | |||
The one relative setting is; | |||
; User Impact Sound Frequency : How often is the impact math and sounds performed and played after an impact sound has already been performed. | |||
The User Impact Sound Frequency is useful for large prop piles. Let's say a wall where every brick is an individual prop, can benefit greatly from a slow frequency. No one will notice that half the bricks fail to play impact sounds. | |||
In contrast, bouncy props, or props that do a lot of small motions can be given a faster frequency. It seems that really light weight props sometimes end up needing a faster frequency. | |||
=== Player Distance=== | |||
For really large levels, there is no need for any math to happen unless the player's close enough to hear the results. That's why all MNSI componetns are rendered inert if the player's too far away. | |||
It is important to match this distance with the sound that has the largest attenuation distance for any given prop. |
Latest revision as of 21:25, 7 June 2019
Outlines here are ways to optimize resource usage of a MNSI component.
Basics
Pictured are the settings relevant to optimization. Since every prop can have totally different usage scenarios, it is useful to be able to manually adjust the "quality" of the MNSI component. So that a small rock debris could be made to utilize 1/4th of the resources MNSI would utilise at full default quality settings.
Friction sounds
Currently, the most expensive feature are the Friction Sounds. Rolling and Linear friction sounds despite numerous iterations and architecture changes, are still asynchronous and can continue to update their math even if the prop is no longer moving.
There are several things possible to mitigate their expense. The obvious, is to turn off friction sounds entirely using the Do Friction Sounds boolean toggle. This is a bit of an overkill. But. It is usefil to turn off the option for small props, debris, props that aren't expected to slide or roll, or props that are spawned by the thousands from particle effects. Sometimes the geometry of the prop can also render friction and rolling sounds pointless. Imagine a prop with great friction coefficient that has no round surfaces.
For props that still need Some friction and rolling sounds, there are three settings to adjust their cost.
- User Component Cleanup time
- Expected performance gain from tweaking - Low - When roll and friction sounds are played, a single audio component is created once, and then modulated based on speed and other math. Once the prop is detected to be stationary, this variable tells MNSI how long to wait before the rolling and friction audio components are automatically deleted.
- User Linear and Roll sound update frequency
- Expected performance gain from tweaking - High - This value defines how often math is performed on the roll and friction components.
- User Linear and Roll sound cut time
- Expected performance gain from tweaking - Medium - This is a special timer that constantly checks if the prop is actually in contact with a surface. As soon as a prop becomes airborn and this many seconds pass, rolling and friction sounds are muted, and the Component Cleanup timer starts.
It is clear that props like barrels or bottles can have a relatively slow update frequency. The default 0.25 is meant for them. Props that change their motion quickly, car wheels, players, can be tweaked to have much faster update frequencies.
The Cut time can also be adjusted for props that experience a lot of surface irregularities. Train Wheels would need a fast cut time to simulate rail joint sounds, and a bottles on a table can be given a longer cut time to reduce their cost.
Impact sounds
Relatively inexpensive. Can be used as is almost always.
The one relative setting is;
- User Impact Sound Frequency
- How often is the impact math and sounds performed and played after an impact sound has already been performed.
The User Impact Sound Frequency is useful for large prop piles. Let's say a wall where every brick is an individual prop, can benefit greatly from a slow frequency. No one will notice that half the bricks fail to play impact sounds.
In contrast, bouncy props, or props that do a lot of small motions can be given a faster frequency. It seems that really light weight props sometimes end up needing a faster frequency.
Player Distance
For really large levels, there is no need for any math to happen unless the player's close enough to hear the results. That's why all MNSI componetns are rendered inert if the player's too far away.
It is important to match this distance with the sound that has the largest attenuation distance for any given prop.