Results 1 to 39 of 39
  1. #1
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    58

    Default Custom Pawn Sounds

    UPDATE >>> Jump to post 16 for the solution.


    I've looked all over and can't find this question or a relevant answer. So I've been trying for MONTHS to get my own footstep sounds working.

    Here's what I've done so far:

    1. Import my footstep sounds & make sound cues. Copy full name to clipboard from one of my footstep sound cues.

    2. Create a new class extending from UTPawnSoundGroup and replace all (for testing purposes) of Epic's footstep sounds with mine by pasting the path to them from which I copied in Step 1, above.

    3. Edit UTEditor.ini, found in the UTGame>Config folder, by adding "ModPackages=CustomPawnSounds" at the very bottom, directly underneath "ModOutputDir=..\..\UTGame\Unpublished\CookedPC\Sc ript"

    (CustomPawnSounds is the name of the folder in UTGame>Src> which holds my custom SoundGroup class, which I created in Steps 1 & 2 above.)

    4. Full Compile using UnrealFrontEnd, found in Binaries folder.

    5. Copy and paste the new U file from the UTGame>Unpublished>CookedPC>Script folder to the UTGame>Script folder.

    6. Launch UDK and open ExampleMap (included with UDK).

    7. Run around and hear nothing but Epic's footstep sounds.

    ***I also did all the same stuff for a second custom class extending from UTPawnSoundGroup_Liandri


    I feel like I've tried everything, with no luck. I don't know if this has anything to do with it, but I noticed that all of Epic's footstep sounds are under the Sound Class "Character" - - - however, I can't change my footstep sound cues to "Character", only "Character Friend" or "Character Enemy." I'm wondering if my sounds aren't being recognized because they are not set to the right Sound Class, "Character." I would like to try it but I can't figure out how to select Character, it doesn't show up on the Sound Class drop down list in the Content Browser.

    Thanks for taking the time to read!
    Last edited by BirthNight; 08-07-2011 at 09:30 AM. Reason: Update

  2. #2
    MSgt. Shooter Person
    Join Date
    Aug 2006
    Posts
    296

    Default

    you probably need to to create your own pawn or a mutator that modify's the defualt pawn to use your sound group

  3. #3
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    58

    Default

    Thanks for the quick reply Bananna_manuk Thanks to you, I think I'm getting much closer, but there seems to be one last "disconnect" in the process. I feel like there is one final link in the chain that needs to be realized.

    Now, in my UTGame>Src folder I have my CustomPawnSounds folder, which is where I'm keeping all my extended UC files dealing with PawnSounds. Inside the Classes folder, I have custom, extended versions of:

    UTPawnSoundGroup
    UTPawnSoundGroup_Liandri (just to be safe)
    UTPawn
    UTFamilyInfo

    So far, these are the only UC files that I have found dealing with player sounds (footsteps, hit sounds etc.) I have renamed each above file, ie. UTPawnSoundGroupMyGame, UTPawnMyGame, UTPawnSoundGroup_LiandriMyGame, and UTFamilyInfoMyGame.

    **************************************************

    So inside my new, extended UTPawn UC file, I have the following:

    Code:
    class UTFamilyInfoMygame extends UTFamilyInfo
    	dependsOn(UTPawnMyGame)
    	abstract;
    
    defaultproperties
    {
    	SoundGroupClass=class'UTPawnSoundGroupMyGame'
    }
    **************************************************

    And inside my UTFamilyInfoMyGame UC file, I have:

    Code:
    class UTFamilyInfoMyGame extends UTFamilyInfo
    	dependsOn(UTPawnMyGame)
    	abstract;
    
    defaultproperties
    {
    	SoundGroupClass=class'UTPawnSoundGroupMyGame'
    }

    **************************************************

    In my UTPawnSoundGroupMyGame UC file, I have:

    Code:
    class UTPawnSoundGroupMyGame extends UTPawnSoundGroup
    	abstract
    	dependson(UTPhysicalMaterialProperty);
    .. ^ followed by all the defaultproperties stuff (just replacing Epic's sounds with mine). I left that stuff out because, for the problem I'm having this is irrelevant and would take up too much space in this already really long post.

    **************************************************

    My UTPawnSoundGroup_LiandriMyGame UC file is pretty much identical to the UTPawnSoundGroupMyGame. I just extended it to be safe.


    So, if you're still with me here, my problem now occurs during compile.

    I get this warning:

    Warning, ClassProperty UTGame.UTPawn:SoundGroupClass: unresolved reference to 'class'UTGame.UTPawnSoundGroupMyGame''

    Where is the disconnect? Am I pointing everything to the right folders and files? I really appreciate any help that may come my way. I have to believe that there is a very simple fix here, but I'm absolutely not a programmer, so I'm sure I have just left some line or file out. THANKS!

  4. #4
    MSgt. Shooter Person
    Join Date
    Jan 2010
    Posts
    49

    Default

    You sure UTPawnSoundGroupMyGame is in the UTGame folder?

    if you are using for example MyMod folder, and your UTPawnSoundGroupMyGame script file is inside MyMod
    you will have to use
    class'MyMod.UTPawnSoundGroupMyGame'

    Ę
    Also I notice in the warning message
    'class'UTGame.UTPawnSoundGroupMyGame''
    it should be
    class'UTPawnSoundGroupMyGame'


    EDIT:

    in your first post you have modeditpackage CustomPawnSounds so I guess the pawnsoundgroup script is in the CustomPawnSounds folder
    which makes it
    SoundGroupClass=class'CustomPawnSounds.UTPawnSound GroupMyGame'

    there is not supposed to be a space in the end of aboveline, dunno why its there
    Last edited by Zerav; 03-06-2010 at 03:22 PM.

  5. #5
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    58

    Default

    Thanks to you Zerav, I'm not getting that error message during compile. It compiled just fine which is cool, but I'm still hearing Epic's footsteps. I'll keep working on it and I'll be sure to post if I find some way to fix this.

    It is incredible how complicated changing the FREAKING footstep sounds is....but then again...I'm not a programmer.

  6. #6
    MSgt. Shooter Person
    Join Date
    Jan 2010
    Posts
    49

    Default

    Hmm, also noticed you said you extend your soundgroup class from the old class soundgroupclass? why?

    just copy everything you need from the utsoundgroups to your customsoundgroup and class yoursoundclass extends Object, nothing in the soundgroups is native code from what i can see.

    UTPawnSoundGroup

    since you dont mention if you have multiple classes you should just create the pawnsoundgroup from scratch look at top^

    change and remove the sounds you dont need.

  7. #7
    MSgt. Shooter Person
    Join Date
    Jan 2010
    Posts
    211

    Default

    I've looked into this and changing the defaults isn't enough. UTPawn spawn the sound class dynamicaly depending on the pawn's UTFamiltyInfo class passed to SetCharacterClassFromInfo(UTFamilyInfo). you can overwrite the soundgroup
    there or in the actual info class.

    SetCharacterClassFromInfo(UTFamilyInfo) is defined in UTPawn.

  8. #8
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    58

    Default

    Ok, so with all your help my programmer friend was able to get it all working. After he walked me through it and got everything setup on my end, I have a pretty good understanding of how it all works and what needs to be done to have a custom pawn with custom properties (such as sound). I would post a tutorial, but my programmer friend is going to do a much better job with that. I'll make sure to post a follow-up link to his tutorial in this thread when it's finished. Thanks for all the help guys!

  9. #9
    MSgt. Shooter Person
    Join Date
    Dec 2007
    Location
    Winston-Salem, NC
    Posts
    36
    Gamer IDs

    Gamertag: two monocles

    Default

    How about that follow-up?
    Jack Menhorn
    Audio Lead
    www.galeforcelogic.com

  10. #10

    Default

    Could seriously use that follow up

  11. #11
    Iron Guard
    Join Date
    Dec 2009
    Location
    South of cheese
    Posts
    782

    Default

    So if we have

    FootstepSounds[0]=(MaterialType=Stone,Sound=SoundCue'A_Character_Fo otsteps.FootSteps.A_Character_Footstep_StoneCue')

    How do we set a material to be "MaterialType"?

    I see in the Physical Materials we have "impact sound" but that's for projectiles is it not?

    EDIT: NM I think I got it. You have to add a Physical Material Property
    Last edited by Hitpawz; 02-03-2011 at 06:20 PM.

  12. #12
    Iron Guard
    Join Date
    Dec 2009
    Location
    South of cheese
    Posts
    782

    Default

    I'm having a major problem with this. It appears setting physical materials to call different footstep sounds only works on objects with perpoly collision set on them. This is really bad for objects using multiple materials on them.

    If I use the collision objects I exported with the asset (UCX, UBX, USP) then it sets one physical material to the entire object and ignores the material I'm on. If I have it per poly, it registers the material I'm standing on.

    So is it possible to have multiple physical materials present on objects with their own optimized collision meshes? How do we assign a physical material to specific Prim in the collision?

    If per poly is the only way physical materials will work, it's inherently set up to make sure our games run like crap and should be fixed. If I'm dumb, which is often the case, I apologize and appreciate pointers on how to set it up.
    Last edited by Hitpawz; 02-03-2011 at 07:08 PM.

  13. #13
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    58

    Default No solution

    So it's been a over a year...

    I apologize to those of you waiting for that tutorial. I was never able put up a link because, as far as I know, it was never made by the person who figured it all out. We stopped working together and I moved on to a new engine.

    Anyway! I'm back with UDK now and now I've arrived at the same problem. I can't believe this hasn't been explored more since I dealt with this. I can really only find this old post and one other, and neither are helpful.

    So, here we go...

    The following line can be found in UTPawn:
    Code:
    SoundGroupClass = Info.default.SoundGroupClass;
    Does default need to be changed somehow? I was under the impression that it's not necessary to alter any of the UT project's code.

    Thanks

  14. #14
    Boomshot
    Join Date
    May 2011
    Location
    Chicago
    Posts
    2,215

    Default

    I'm typing up a tutorial on footstep sounds right now. Will post it soon. =]

  15. #15
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    58

    Default

    Quote Originally Posted by JessieG View Post
    I'm typing up a tutorial on footstep sounds right now. Will post it soon. =]
    Looking forward to this!

  16. #16
    Boomshot
    Join Date
    May 2011
    Location
    Chicago
    Posts
    2,215

    Default

    Ok. This is a tutorial on implementing custom footstep sounds on a custom gametype. This tutorial is being made assuming you are extending off of UTPawn classes, which I'll cover in a bit more detail. So if you want to extend other pawn classes, this should be a good jumping off point (if not just the same).

    I'll also cover setting up the basic custom gametype for those who may need.



    SETTING UP THE GAME TYPE

    OK! First of all, set up your custom game. In your UDK folder, go to "Development" > "Src". Make a new folder and name it after your game (Such as "CUSTOMGAMENAMEHEREGame"). Now open that folder and make another folder and name it "Classes"


    Now you wil have to create classes within this folder. Create a .UC and give it a name based off your game such as "CustomGame", or whatever you want to name it. This class is your game type. The code should look like this:

    Code:
    Class CustomGame extends UDKGame;
    
    defaultproperties
    {
    
    }

    Save this and close it. Now create a new .UC file in the same folder and name it "CUSTOMGAMEPawn". This is your pawn. The code should look like this:

    Code:
    Class CUSTOMGAMEPawn extends UTPawn;
    
    defaultproperties
    {
    
    }
    Save and close. Now create another .UC in the same folder and name it "CUSTOMGAMESoundGroup". This is the sound group for your game and where you will add the custom footstep sounds. The code should look like this as of now:

    Code:
    Class CUSTOMGAMESoundGroup extends UTPawnSoundGroup;
    
    defaultproperties
    {
    
    }

    Save and close. Now create one final .UC, and name it "CUSTOMGAMEPlayerController". This class allows the player to move. The code should look like this:

    Code:
    Class CUSTOMGAMEPlayerController extends UTPlayerController;
    
    defaultproperties
    {
    
    }
    Save it and close. You do not need to touch this PlayerController Class at all to get the sounds working so just leave it.


    NOW! with all that set up go to your UDK Folder and open up "UDKGame" > "Config" and open up "DefaultEngine.ini". Under the section that says [UnrealEd.EditorEngine] place the following line of code at the very bottom of what is currently there:

    Code:
    +ModEditPackages=CUSTOMGAMENAMEHEREGame
    after the equal sign is the name of the folder that you put all of your classes into. Now save and close. Lastly, Delete "UDKEngine.ini" from the Config folder. When you open UDK after this, it will remake this file with your custom game added to it. BEFORE OPENING UDK, MOVE DOWN TO THE NEXT STEP TO FINISH YOUR CLASSES


    CODING THE FOOTSTEP SOUNDS!


    Ok. Your first step is to open up the CustomGame.UC file (your custom game info class that extends off of UTGame). Add to the default properties so the code will now look like this:

    Code:
    class CustomGame extends UDKGame;
    
    defaultproperties
    {
    
            PlayerControllerClass=class'CUSTOMGAMEPlayerController'
            DefaultPawnClass=class'CUSTOMGAMEPawn'
    
    }
    this code of course is referencing the player controller and pawn classes you made, setting up the ability to use your custom character. Now save and close out of this class and open up your CUSTOMGAMEPawn class. Add to the default properties so the code will look like this:

    Code:
    class CUSTOMGAMEPawn extends UTPawn;
    
    defaultproperties
    {
    
            SoundGroupClass=class'CUSTOMGAMESoundGroup'
    
    }
    after the equal sign is of course, the name of the custom sound group you made. Adding this allows you to now alter the footstep sounds.



    MAIN PART OF CODING - YOUR CUSTOM SOUNDGROUP CLASS

    BEFORE CONTINUING: I suggest UDK be opened for this part because you may need to use the Content Browser. When you open it, it should say the scripts are outdated. Simply hit yes allow the scripts to update.


    Now open up your CUSTOMGAMESoundGroup Class. Copy the codes from the default properties section in the below example and paste them into the default properties of your CUSTOMGAMESoundGroup so it will look like this:



    Code:
    Class CUSTOMGAMESoundGroup extends UTPawnSoundGroup;
    
    defaultproperties
    {
    
    
    	DefaultJumpingSound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_DirtJumpCue'
    
    	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')
    
    
    	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')
    
    	DefaultLandingSound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_DirtLandCue'
    	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')
    
    }


    When you import footstep sounds into UDK and create a sound cue for them, you can do one of two things: Replace the sounds that are already in the game or add custom sounds.

    If you replace the sounds that are in the game, you simply go to the code in the default properties that is in your CUSTOMGAMESoundgroup class, look at the lines that start with "FootstepSounds" and pick a line that has a "MaterialType" in it that matches what you want to replace. So if you have custom footstep sounds for walking on a metal surface imported into UDK in a sound cue, go to the line below:

    Code:
    FootstepSounds[8]=(MaterialType=Metal,Sound=SoundCue'A_Character_Footsteps.FootSteps.A_Character_Footstep_MetalCue')
    in your soundgroup and change everything in between the apostrophes after "SoundCue" to the path of your sound cue. (The path can be found by hovering your mouse button over the soundcue in your content Browser. Type exactly what the path is follwed by a period and the name of your soundcue." That's it!






    Now, if you want to add your own Custom sounds without removing the default sounds, You first have to import your sound and make the sound cue for it. Now you have to right click in the Content Browser and pick "New Physical Material". In this Physical Material's properties, go to the very bottom and click the blue arrow on the right of "Physical Material Property" and click "UTPhysicalMaterialProperty". A section called "Material Type" should appear. This is where you put the type of material you want to have a specific footstep sound. Say for example you made footstep sounds for walking on something made of Rubber. you would put "Rubber" as the material type then close it. Navigate to the material that you would use on this rubber object, open it, and in the Physical Material properties on the bottom plug in the Physical Material you just created. Now you have to go back to the CUSTOMGAMESoundGroup class that you created and find the footstep sounds. Copy and paste the bottom part of the footsteps section that starts with "FootstepSounds[10].

    When you paste this in, the first thing you have to do is change that "[10]" to "[11]". This is the array number for the footstep sounds, and whenever a new one is added instead of replacing an existing one, this number must go up by 1 each time. Continuing with our example, the material type in this line should then be changed to "Rubber" (which, when you make your own, can be anything else you want) Then change the sound cue path the sound cue for your footsteps, save and close. Now all you need to do is close out of UDK, open it back up to rebuild the scripts. After all the scripts have updated, open UDK and load your map. Go to "View" > "World Properties" and expand the "Game Type" Tab. Change both drop down menus (Or one if you are on an older version of UDK) to the name of your custom game so it will use your custom Pawn and sounds. Add your materials with the custom Physcal Materials attached to something in the level and walk on it to test out your new footstep sounds!
    Last edited by JessieG; 08-07-2011 at 09:23 AM.

  17. #17
    Boomshot
    Join Date
    May 2011
    Location
    Chicago
    Posts
    2,215

    Default

    It may be a bit wordy, but I like to describe step by step what to do when explaining stuff so there's no confusion.

    But if for some reason there is any confusion, let me know and I'll help you out. After weeks of frustration a while back I finally got the hang of custom footstep sounds and they've become second nature to me now haha. (I completely ditched using any of UDK's preinstalled footstep/jumping/landing sounds for my own.)

  18. #18
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    58

    Default

    Thank you so much for the response! I'm in the middle of going through it step-by-step right now. I'll post my results.

    Many thanks!

  19. #19
    Boomshot
    Join Date
    May 2011
    Location
    Chicago
    Posts
    2,215

    Default

    Quote Originally Posted by Hitpawz View Post
    I'm having a major problem with this. It appears setting physical materials to call different footstep sounds only works on objects with perpoly collision set on them. This is really bad for objects using multiple materials on them.

    If I use the collision objects I exported with the asset (UCX, UBX, USP) then it sets one physical material to the entire object and ignores the material I'm on. If I have it per poly, it registers the material I'm standing on.

    So is it possible to have multiple physical materials present on objects with their own optimized collision meshes? How do we assign a physical material to specific Prim in the collision?

    If per poly is the only way physical materials will work, it's inherently set up to make sure our games run like crap and should be fixed. If I'm dumb, which is often the case, I apologize and appreciate pointers on how to set it up.
    Unfortunately, that's the only way to do what you're talking about as far as I know. If you use a UCX_ Collision that you modeled, there's no way for the engine to be able to tell what material you are on since you're standing on the collision box and not the actually polys. The only way around this is either like you said, turn on Per Poly Collision for objects with multiple materials or Split up the mesh into multiple objects that each have one specific material assigned to them.


    Honestly though, I can't really think of very many situations where you would need footstep sounds to change on objects unless you use more than one material on a lot of your meshes, which in itself is not good for performance. I feel that on the rare occasion that you would need to use per Poly collision to get multiple sounds on one mesh, it won't take a serious hit on your performance as long as you don't do it often.
    Last edited by JessieG; 08-07-2011 at 07:46 AM.

  20. #20
    Boomshot
    Join Date
    May 2011
    Location
    Chicago
    Posts
    2,215

    Default

    And you don't need per poly collision on for an object if it will have only one Physical Material (AKA one sound) over the entire object. Just make sure to plug the Physical Material into which ever material you use on your object, or even in the Static Mesh editor.

  21. #21
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    58

    Default I'm dying.



    Uninstalled UDK / Re-installed UDK
    Followed your instructions, word for word, line by line.
    I didn't bother creating new materials, I just created my own SoundCue and plugged it in for all the sounds. I made this really annoying door creaking sound and used that for every sound so I would know for sure if it worked.

    Well, it didn't... I even extended UTPawnSoundGroup_Liandri and replaced all of those sounds as well. SOoo. I'm about to give up all worldly possessions and just go wander around in the desert... I mean really, I feel like I'm working for the Pentagon trying to crack some top-secret code.

    I really appreciate your tutorial though, it is by far the most extensive. I'd like to know if other people can get this working... maybe it IS just something extra weird on my system. Realistically though, I'm probably doing something wrong. I'll keep at it and post any new findings. Thanks!

  22. #22
    Boomshot
    Join Date
    May 2011
    Location
    Chicago
    Posts
    2,215

    Default

    Quote Originally Posted by BirthNight View Post
    Thank you so much for the response! I'm in the middle of going through it step-by-step right now. I'll post my results.

    Many thanks!
    Any luck?

    Also, I forgot to mention, the only thing the Sound cue class does when set to "character" (as far as I know) is allow the soundcue to be affected by a reverb volume. I think character friend would be fine for that.

  23. #23
    Boomshot
    Join Date
    May 2011
    Location
    Chicago
    Posts
    2,215

    Default

    Noooo don't give up. Can you copy paste the codes from all of your classes and post them or PM me? I'll help sort out the problem.

  24. #24
    Boomshot
    Join Date
    May 2011
    Location
    Chicago
    Posts
    2,215

    Default

    Also, does the sound cue play fine when you double click it?

  25. #25
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    58

    Default

    TagGame.uc
    Code:
    class TagGame extends UTGame;
    
    DefaultProperties
    {
        PlayerControllerClass=class'TagPlayerController'
        DefaultPawnClass=class'TagPawn'
    }

    TagPawn.uc
    Code:
    class TagPawn extends UTPawn;
    
    DefaultProperties
    {
    	SoundGroupClass=class'TagPawnSoundGroup'
    }


    TagPawnSoundGroup
    Code:
    class TagPawnSoundGroup extends UTPawnSoundGroup;
    
    DefaultProperties
    {
    	DrownSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    	GaspSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    
    	DefaultJumpingSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    
    	FootstepSounds[0]=(MaterialType=Stone,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	FootstepSounds[1]=(MaterialType=Dirt,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	FootstepSounds[2]=(MaterialType=Energy,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	FootstepSounds[3]=(MaterialType=Flesh_Human,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	FootstepSounds[4]=(MaterialType=Foliage,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	FootstepSounds[5]=(MaterialType=Glass,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	FootstepSounds[6]=(MaterialType=Water,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	FootstepSounds[7]=(MaterialType=ShallowWater,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	FootstepSounds[8]=(MaterialType=Metal,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	FootstepSounds[9]=(MaterialType=Snow,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	FootstepSounds[10]=(MaterialType=Wood,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    
    
    	JumpingSounds[0]=(MaterialType=Stone,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[1]=(MaterialType=Dirt,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[2]=(MaterialType=Energy,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[3]=(MaterialType=Flesh_Human,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[4]=(MaterialType=Foliage,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[5]=(MaterialType=Glass,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[6]=(MaterialType=GlassBroken,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[7]=(MaterialType=Grass,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[8]=(MaterialType=Metal,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[9]=(MaterialType=Mud,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[10]=(MaterialType=Metal,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[11]=(MaterialType=Snow,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[12]=(MaterialType=Tile,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[13]=(MaterialType=Water,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[14]=(MaterialType=ShallowWater,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	JumpingSounds[15]=(MaterialType=Wood,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    
    	DefaultLandingSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    	LandingSounds[0]=(MaterialType=Stone,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[1]=(MaterialType=Dirt,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[2]=(MaterialType=Energy,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[3]=(MaterialType=Flesh_Human,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[4]=(MaterialType=Foliage,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[5]=(MaterialType=Glass,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[6]=(MaterialType=GlassBroken,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[7]=(MaterialType=Grass,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[8]=(MaterialType=Metal,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[9]=(MaterialType=Mud,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[10]=(MaterialType=Metal,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[11]=(MaterialType=Snow,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[12]=(MaterialType=Tile,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[13]=(MaterialType=Water,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[14]=(MaterialType=ShallowWater,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    	LandingSounds[15]=(MaterialType=Wood,Sound=SoundCue'TagSounds.TestSounds.door_creak01_Cue')
    
    	BulletImpactSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    }

    TagPawnSoundGroup_Liandri
    Code:
    class TagPawnSoundGroup_Liandri extends UTPawnSoundGroup_Liandri;
    
    DefaultProperties
    {
    	DodgeSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    	DoubleJumpSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    	LandSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    	DefaultFootStepSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    	DyingSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    	HitSounds[0]=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    	HitSounds[1]=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    	HitSounds[2]=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    	FallingDamageLandSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    	GibSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    
    	CrushedSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    	BodyExplosionSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    	InstaGibSound=SoundCue'TagSounds.TestSounds.door_creak01_Cue'
    }


    TagPlayerController
    Code:
    class TagPlayerController extends UTPlayerController;
    
    DefaultProperties
    {
    }

  26. #26
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    58

    Default

    Quote Originally Posted by JessieG View Post
    Also, does the sound cue play fine when you double click it?
    Yes sir

  27. #27
    Boomshot
    Join Date
    May 2011
    Location
    Chicago
    Posts
    2,215

    Default

    A few things:

    1) you can delete the Liandri class because I think that's for female characters (not 100 percent sure) but I never use it.

    2) do you have all of these classes in the same folder, without any subfolders? Where is this folder and what does the defaultengine.ini look like after you edited it?

    3) You made sure to switch to your custom game type in the world properties?

  28. #28
    Boomshot
    Join Date
    May 2011
    Location
    Chicago
    Posts
    2,215

    Default

    And just to check, try changing your taggame.uc extend off of UDKGame instead of UTGame just to see if it will make a difference, then close out of UDK and reopen it to automatically build all the scripts (have to do that everytime a single change is made. No need to use the FrontEnd)

  29. #29
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    58

    Default

    1) Cool, deleted Liandri class

    2) All classes are in the same folder which is: Development>Src>TagGame>Classes

    I added the last line of the DefaultEngine.ini as follows:

    [UnrealEd.EditorEngine]
    +EditPackages=UTGame
    +EditPackages=UTGameContent
    +ModEditPackages=TagGame

    3. Yup, when the editor loads, I immediately go to World Properties > Game Type > and switch the both the regular Game Mode and Pie Mode to "TagGame".

  30. #30
    Boomshot
    Join Date
    May 2011
    Location
    Chicago
    Posts
    2,215

    Default

    OH! you know what, I'm wondering if it's your default properties. I'm wondering the words "defaultproperties" are case sensitive. Try changing it to all lower case in every one of your custom classes.

  31. #31
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    58

    Default

    HOLY!!!!!!!

    DUDE, this did it. It was the UDKGame / UTGame difference. I guess I needed to extend from UDKGame! Wow... thank you SOOO much....so what does this mean for me? If I'm extending from UDKGame, can I still use the functionality of UTGame? I'm not sure I even understand fully what I'm asking here.

  32. #32
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    58

    Default

    Quote Originally Posted by JessieG View Post
    And just to check, try changing your taggame.uc extend off of UDKGame instead of UTGame just to see if it will make a difference, then close out of UDK and reopen it to automatically build all the scripts (have to do that everytime a single change is made. No need to use the FrontEnd)
    This is what worked for me... I meant to quote it in my last post.

  33. #33
    Boomshot
    Join Date
    May 2011
    Location
    Chicago
    Posts
    2,215

    Default

    Quote Originally Posted by BirthNight View Post
    HOLY!!!!!!!

    DUDE, this did it. It was the UDKGame / UTGame difference. I guess I needed to extend from UDKGame! Wow... thank you SOOO much....so what does this mean for me? If I'm extending from UDKGame, can I still use the functionality of UTGame? I'm not sure I even understand fully what I'm asking here.
    Awesome! Glad we could figure it out.

    Honestly I'm not sure you're missing out on much functionality, if any. UTGame is more specific to Unreal Tournament, I assume
    The UDKGame class is more for a broader type of FPS without the Unreal Tournament rules. I'm not far enough into learning programming to add or change that much functionality, but footsteps are a breeze haha.

    Also, random tidbit, if you add "bDelayedStart=false" to your TagGame.UC, the game should start right away without the press fire message in the beginning.

  34. #34
    MSgt. Shooter Person
    Join Date
    Dec 2009
    Location
    The Netherlands
    Posts
    58

    Default

    It was all you man, thanks! Now I'm gonna go make some soundcues

  35. #35
    MSgt. Shooter Person
    Join Date
    Oct 2007
    Location
    Vancouver, Canada
    Posts
    350

    Default

    So everything worked great for me, the only problem I'm having is with assigning a material sound type (wood, grass, stone etc.) to a custom material. I've looked at Epic's materials and none of them seem to have a physics material associated with them. Also, it seems that the Jumping and Landing have a default sound cue but none of the foot step sounds do. When I compile my code, I've only modified the FootStepSounds [0] cue but the sounds don't play in game. I figured 0 would be the default material sound type?

  36. #36
    MSgt. Shooter Person
    Join Date
    Nov 2011
    Posts
    60

    Default

    Yeah, I have been doing the same thing too. Extending UTPawnSoundGroup but I kept hearing the epic default. Sometimes I got no choice but to comment all the default sound. Because I couldn't get my code to work... But I put my classes in the folders I created, not inside UTGame class. So is that why it couldn't read?

    I have got error in extending UDKGame. They forced me to extend from UTGame instead, so am I making any steps wrong???
    Last edited by cjw92; 01-18-2012 at 11:19 PM.

  37. #37
    Redeemer
    Join Date
    Apr 2009
    Location
    Jacinto
    Posts
    1,487
    Gamer IDs

    Gamertag: Keltar3007

    Default

    Quote Originally Posted by Hitpawz View Post
    I'm having a major problem with this. It appears setting physical materials to call different footstep sounds only works on objects with perpoly collision set on them. This is really bad for objects using multiple materials on them.

    If I use the collision objects I exported with the asset (UCX, UBX, USP) then it sets one physical material to the entire object and ignores the material I'm on. If I have it per poly, it registers the material I'm standing on.

    So is it possible to have multiple physical materials present on objects with their own optimized collision meshes? How do we assign a physical material to specific Prim in the collision?

    If per poly is the only way physical materials will work, it's inherently set up to make sure our games run like crap and should be fixed. If I'm dumb, which is often the case, I apologize and appreciate pointers on how to set it up.
    Break up the collision meshes in your 3d application and give them each different material Ids then combine them so they can be named. Then you should be able to assign different mics with different physical materials to them. Make sure they don't share the same material I'd as the mesh itself.

  38. #38
    Redeemer
    Join Date
    Apr 2009
    Location
    Jacinto
    Posts
    1,487
    Gamer IDs

    Gamertag: Keltar3007

    Default

    Quote Originally Posted by BirthNight View Post
    So it's been a over a year...

    I apologize to those of you waiting for that tutorial. I was never able put up a link because, as far as I know, it was never made by the person who figured it all out. We stopped working together and I moved on to a new engine.

    Anyway! I'm back with UDK now and now I've arrived at the same problem. I can't believe this hasn't been explored more since I dealt with this. I can really only find this old post and one other, and neither are helpful.

    So, here we go...

    The following line can be found in UTPawn:
    Code:
    SoundGroupClass = Info.default.SoundGroupClass;
    Does default need to be changed somehow? I was under the impression that it's not necessary to alter any of the UT project's code.

    Thanks
    If u don't want a family info file change it to: SoundGroupClass = default.SoundGroupClass;

    Then u should be able to specify it in your pawn class.

  39. #39

    Default

    After running through all the things suggested in this thread, I ran into the problem that I still had to extend UTGame. If you too need to as well. Add this into your player pawn and it should overwrite the soundgroupclass and work just fine!

    simulated function SetCharacterClassFromInfo(class<UTFamilyInfo> Info)
    {
    Super.SetCharacterClassFromInfo(Info);

    SoundGroupClass= class'CUSTOMGAMEPawnSoundGroup';
    }


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.