Announcement

Collapse
No announcement yet.

Sounds for ground materials?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Sounds for ground materials?

    Is it possible to make a sound play when a player is walking on a specific material. For instance, cling with metal floors or a low pat for soft ground? I know it has to be possible, anyone know where a tutorial can be found to do this?

    #2
    This is what I'm aware of :

    For static meshes you can do this :

    Open up the mesh's properties, expand the "Collision" section, the "CollisionComponent", the expand "Physics". You will see the "PhysMaterialOverride" field.

    Now go to your Generic Browser and look for the "PhysicalMaterials" group, which is greyed out. Load the entire package. Select the appropriate material (make sure that the "Phsical Material" resource type is checked).

    Now go back to your properties and select that button with the green arrow at the right of the PhysMaterialOverride field.

    For the terrain, for some reason, the ground sound can't be changed. At least until patch 1.3.

    For CSG brushes, I don't think you can. But if there is a way, I also want to know how

    Good luck.

    Comment


      #3
      I thought it was based on the Physical Material associated with the material applied to the mesh/surface. Every material can have its own Physical Material set in its properties and the Pawn code uses the GetMaterialBelowFeet() function which does a trace to determine what type of material the Pawn is standing on and plays the footstep sound based on this. You can see where the type of material is set in the Physical Material by expanding the PhysicalMaterialProperty and looking at the value of the MaterialType property. Although, it is possible the PhysicalMaterial applied to the PhysicalMaterialOverride does override the material's PhysicalMaterial.

      The UTPawnSoundGroup has an array of footstep sounds associated with the various material types and a default:
      Code:
         FootstepSounds(0)=(MaterialType="Stone",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_StoneCue')
         FootstepSounds(1)=(MaterialType="Dirt",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_DirtCue')
         FootstepSounds(2)=(MaterialType="Energy",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_EnergyCue')
         FootstepSounds(3)=(MaterialType="Flesh_Human",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_FleshCue')
         FootstepSounds(4)=(MaterialType="Foliage",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_FoliageCue')
         FootstepSounds(5)=(MaterialType="Glass",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_GlassPlateCue')
         FootstepSounds(6)=(MaterialType="Water",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_WaterDeepCue')
         FootstepSounds(7)=(MaterialType="ShallowWater",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_WaterShallowCue')
         FootstepSounds(8)=(MaterialType="Metal",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_MetalCue')
         FootstepSounds(9)=(MaterialType="Snow",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_SnowCue')
         FootstepSounds(10)=(MaterialType="Wood",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_WoodCue')
         DefaultFootstepSound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_DefaultCue'
      The same basic principle goes for landing sounds, jumping sounds, etc.

      Jumping Sounds:
      Code:
         JumpingSounds(0)=(MaterialType="Stone",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_StoneJumpCue')
         JumpingSounds(1)=(MaterialType="Dirt",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_DirtJumpCue')
         JumpingSounds(2)=(MaterialType="Energy",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_EnergyJumpCue')
         JumpingSounds(3)=(MaterialType="Flesh_Human",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_FleshJumpCue')
         JumpingSounds(4)=(MaterialType="Foliage",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_FoliageJumpCue')
         JumpingSounds(5)=(MaterialType="Glass",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_GlassPlateJumpCue')
         JumpingSounds(6)=(MaterialType="GlassBroken",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_GlassBrokenJumpCue')
         JumpingSounds(7)=(MaterialType="Grass",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_GrassJumpCue')
         JumpingSounds(8)=(MaterialType="Metal",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_MetalJumpCue')
         JumpingSounds(9)=(MaterialType="Mud",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_MudJumpCue')
         JumpingSounds(10)=(MaterialType="Metal",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_MetalJumpCue')
         JumpingSounds(11)=(MaterialType="Snow",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_SnowJumpCue')
         JumpingSounds(12)=(MaterialType="Tile",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_TileJumpCue')
         JumpingSounds(13)=(MaterialType="Water",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_WaterDeepJumpCue')
         JumpingSounds(14)=(MaterialType="ShallowWater",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_WaterShallowJumpCue')
         JumpingSounds(15)=(MaterialType="Wood",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_WoodJumpCue')
      Landing Sounds:
      Code:
         LandingSounds(0)=(MaterialType="Stone",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_StoneLandCue')
         LandingSounds(1)=(MaterialType="Dirt",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_DirtLandCue')
         LandingSounds(2)=(MaterialType="Energy",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_EnergyLandCue')
         LandingSounds(3)=(MaterialType="Flesh_Human",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_FleshLandCue')
         LandingSounds(4)=(MaterialType="Foliage",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_FoliageLandCue')
         LandingSounds(5)=(MaterialType="Glass",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_GlassPlateLandCue')
         LandingSounds(6)=(MaterialType="GlassBroken",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_GlassBrokenLandCue')
         LandingSounds(7)=(MaterialType="Grass",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_GrassLandCue')
         LandingSounds(8)=(MaterialType="Metal",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_MetalLandCue')
         LandingSounds(9)=(MaterialType="Mud",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_MudLandCue')
         LandingSounds(10)=(MaterialType="Metal",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_MetalLandCue')
         LandingSounds(11)=(MaterialType="Snow",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_SnowLandCue')
         LandingSounds(12)=(MaterialType="Tile",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_TileLandCue')
         LandingSounds(13)=(MaterialType="Water",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_WaterDeepLandCue')
         LandingSounds(14)=(MaterialType="ShallowWater",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_WaterShallowLandCue')
         LandingSounds(15)=(MaterialType="Wood",Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_WoodLandCue')
         DefaultLandingSound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_DirtLandCue'

      Comment


        #4
        Originally posted by ffejnosliw View Post
        I thought it was based on the Physical Material associated with the material applied to the mesh/surface.
        It does. If you double click on a material in the generic browser to open up the material editor, click on the "Preview Material" node (should be on the left side of all the nodes.

        If you look at the bottom of the window, you will see it's properties and the first field is PhysMaterial. The only why I know how to change it is to select all of the nodes (except the Preview Materials), then create a new material in your map's package, past all the nodes, and reconnect them back to the Preview Material node (all of the other connections will be remembered.

        Then you should be able to set your own PhysMaterial with out it affecting the stock one. Be sure to use your new material in the map as it will be lost when you do a full rebuild/save (can never remember which one).

        I don't know a lot about Materials, but at least I know this much?

        Comment


          #5
          Odedge, your my man !

          After a quick check in my material, I saw that option and assign the sound it was missing (arrow) for CSG.

          THX

          [screenshot]http://img389.imageshack.us/img389/8450/station12dv4.jpg[/screenshot]

          Comment


            #6
            Originally posted by stevelois View Post
            Odedge, your my man !

            After a quick check in my material, I saw that option and assign the sound it was missing (arrow) for CSG.

            THX
            *Odedge does the "I am Stevelois' man" dance... ummm, nevermind

            Comment


              #7
              Originally posted by Odedge View Post
              *Odedge does the "I Stevelois' man" dance... ummm, nevermind
              Ha ha

              Good one

              Comment


                #8
                are you applying the material to a static mesh or csg? I cant seem to get the physicalmaterial to work. All i'm doing is choosing the physicalmaterial to apply to the material, and then finally applying the material to csg, but sounds remain the same. Is there something else I need to do?

                Comment


                  #9
                  Originally posted by Idiot View Post
                  are you applying the material to a static mesh or csg? I cant seem to get the physicalmaterial to work. All i'm doing is choosing the physicalmaterial to apply to the material, and then finally applying the material to csg, but sounds remain the same. Is there something else I need to do?
                  What was just explained is for materials being applied to CSG/BSP. A lot of epic sounds are correct, though some aren't correct. If you want to do this for static meshes, you just need to expand the Collision section, then Collision Compoenet. then there is a PhysMaterial field. Just apply a different one and all should be fine.

                  Comment


                    #10
                    I'm trying for CSG/BSP, still no worky. I'm basically just trying it out to see how to implement it, but when walking, jumping, or shooting the surface, only the default sound plays. Do I need to do something in code? (i'm not a coder, so i hope that isnt the case).

                    Comment


                      #11
                      Originally posted by Idiot View Post
                      I'm trying for CSG/BSP, still no worky. I'm basically just trying it out to see how to implement it, but when walking, jumping, or shooting the surface, only the default sound plays. Do I need to do something in code? (i'm not a coder, so i hope that isnt the case).
                      What material is giving you problems and what Phys Material did you choose?

                      Comment


                        #12
                        just created my own material and applied the "metal" physical material to it.

                        Comment


                          #13
                          Originally posted by Idiot View Post
                          just created my own material and applied the "metal" physical material to it.
                          Hmm, I just tried it and it worked fine for me. Can you post a screenshot of the properties when you click the PreviewMaterial node (far left)? If not, you can send me the map (odedge at odedge dot com).

                          Comment


                            #14
                            Did anybody found way to add custom physics material (with sound) to material, i mean totally custom, not one from predefined physics materials.

                            Comment


                              #15
                              Originally posted by Odedge View Post
                              Hmm, I just tried it and it worked fine for me. Can you post a screenshot of the properties when you click the PreviewMaterial node (far left)? If not, you can send me the map (odedge at odedge dot com).
                              I semi-sorta understand. Before I was applying a physical material from the Engine Materials package and not the physical materials package. So, i was thinking "OHHHHHH, i think i got it now". I applied the physical material from physical materials package and it did indeed work. So i thought, "ok, alright, i see where we're goin' with this. we're banging on all cylinders now!" So i decided to create my own physical material and apply THAT to my material. Sadly, back to square one.

                              I try to learn from what's already in the engine, but all of them have a "physicalmaterialproperty" which i can only assume refers to code that makes it work. Unfortunately, I'm not a coder and hope i dont have to do any to make my own physical materials.

                              Comment

                              Working...
                              X