Difference between revisions of "MNSI:Quick Materials"

From Mischys Awesome Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is a quick brief of defining physical materials in the MNSI plugin. It is not exhaustive, please look at the in depth pages for each topic mentioned to gain better understanding.
[[Category:MNSI]]This is a quick brief of defining physical materials in the MNSI plugin. It is not exhaustive, please look at the in depth pages for each topic mentioned to gain better understanding.


MNSI works on Physical Materials. Meshes loaded in blueprints actors that have the MNSI component must use a material that has a set Physical Material.
MNSI works on Physical Materials. Meshes loaded in blueprints actors that have the MNSI component must use a material that has a set Physical Material.
Line 30: Line 30:


The area of interest here are the Default Values. This is where all physical materials are written down for MNSI to look them up.  
The area of interest here are the Default Values. This is where all physical materials are written down for MNSI to look them up.  
"Impact_Hard_Sounds" is where Hard impact sounds are added.
*"Impact_Hard_Sounds" is where Hard impact sounds are added.
"Impact_Soft_Sounds" is
*"Impact_Soft_Sounds" is where Soft impact sounds are added.
*"Friction_Roll_Sounds" is where looping sounds for rolling are added.
*"Friction_Linear_Sounds" is where looping sounds for sliding are added.
 
You will notice that each field is pre-filled with "DoNotLeaveTheseBlank-WillCrash". This is to fix a bug where trying to load an empty struct in a blueprint can cause the editor to crash.
 
# Time to add ReallyCoolWood to the struct. It should look like this.
[[File:PhysMat 05.JPG]]
 
Keys are added in the form of "The Name Of Physical Material" followed by either the name of another physical material, Or, the tag "DEFINT" which means; "Default to this sound for all sounds if no specific physical material is defined."
 
The two physical materials or the DEFINT tag are separated by the token distinction string "-". In this case, the final key looks like this. "ReallyCoolWood-DEFINT". This means that whenever MNSI sees a collision event, from a prop that has a material with the ReallyCoolWood physical material, it will play the sound defined for either the physical material key pair, or if none are found, the DEFINT sounds.
 
The actual sounds are Sound Cues.

Latest revision as of 19:04, 6 June 2019

This is a quick brief of defining physical materials in the MNSI plugin. It is not exhaustive, please look at the in depth pages for each topic mentioned to gain better understanding.

MNSI works on Physical Materials. Meshes loaded in blueprints actors that have the MNSI component must use a material that has a set Physical Material.

Example; MyProp is a blueprint actor that has a static mesh component and the MNSI component. The static mesh uses a material with MyPhysicalMaterial set as its physical material. Each time the static mesh actor sends out a collision event, the MNSI plugin will look at what physical material is it using to determine the sound.

The supplied starting physical materials that have sounds assigned to them are located in MNSI-MainPlugin/MNSI-PhysicalMaterials. To create a custom physical material with custom sounds, see below.

The How

Quick Run - Defining your own physical material;

  1. Create new physical material. Make note of its name.
  2. Open Default Sound Set struct and add your material as a new key pair. "MaterialName-DEFINT"
  3. Assign sounds for each set. Light, Hard, Roll and Friction sets.
  4. Assign your new physical material to any new material you wish to use it on.

Illustrated!

  1. Create a new Physical Material.

PhysMat 01.JPG

  1. Give it a unique name, in this case "ReallyCoolWood". Note. Do not use dashes "-" in the unique name. Dashes tell the plugin that the physical material is an "instance". Example; ReallyCoolWood, ReallyCoolWood-HighFriction, ReallyCoolWood-NoFallDamage, ReallyCoolWood-Slip and ReallyCoolWood-LiterallyWhatever will all play the sounds associated "ReallyCoolWood"

PhysMat 02.JPG

  1. Go to MNSI-MainPlugin/MNSI-BasicSoundSet. There are two structs there. A Blank ((MyCustomSoundSet)), and the DefaultSoundSet structs. Lets add the new physical materal to the MyCustomSoundSet struct. It doesn't matter where it is added, but for clarity, it is easier to start learning this using the blank MyCustomSoundSet struct.

PhysMat 03.JPG

  1. Open MyCustomSoundSet and will look like this.

PhysMat 04.JPG

The area of interest here are the Default Values. This is where all physical materials are written down for MNSI to look them up.

  • "Impact_Hard_Sounds" is where Hard impact sounds are added.
  • "Impact_Soft_Sounds" is where Soft impact sounds are added.
  • "Friction_Roll_Sounds" is where looping sounds for rolling are added.
  • "Friction_Linear_Sounds" is where looping sounds for sliding are added.

You will notice that each field is pre-filled with "DoNotLeaveTheseBlank-WillCrash". This is to fix a bug where trying to load an empty struct in a blueprint can cause the editor to crash.

  1. Time to add ReallyCoolWood to the struct. It should look like this.

PhysMat 05.JPG

Keys are added in the form of "The Name Of Physical Material" followed by either the name of another physical material, Or, the tag "DEFINT" which means; "Default to this sound for all sounds if no specific physical material is defined."

The two physical materials or the DEFINT tag are separated by the token distinction string "-". In this case, the final key looks like this. "ReallyCoolWood-DEFINT". This means that whenever MNSI sees a collision event, from a prop that has a material with the ReallyCoolWood physical material, it will play the sound defined for either the physical material key pair, or if none are found, the DEFINT sounds.

The actual sounds are Sound Cues.