Difference between revisions of "PyPRP:Adding Footstep Sounds"

 
(41 intermediate revisions by 7 users not shown)
Line 1: Line 1:
Remember that little (not yet DRC approved) age I wrote to demonstrate stenciling? Well it was awefully quiet there so I decided to add some footsteps to my blended terrain. Since I blended grass and stone/dirt those were the sounds I wanted. Not surprising really.
+
{{Tutorial|Adding Footstep Sounds|PyPRP}}
  
 +
Welcome to this GoW Plugin tutorial on how to add footstep sound regions. This tutorial assumes you have followed the instructions on the [[PyPRP:Installation|installing PyPRP]] page. In this tutorial, you will learn how to add footstep regions. We will begin by adding the regions and then configure them.
 +
==Adding regions==
 +
# Change one of the Blender windows to Scripts and use the Script button to add a PyPRP script. Then [[Media:footSteps_addRgn.jpg|click "Add a Footstep Sound Region"]].
 +
# [[Media:footSteps_layers.jpg|Select the second layer of the blender file]], where the region is stored.
 +
# Set the region's object name. You will need these when adding the AlcScript later to properly configure them.
 +
# Change one of the windows to Text and choose AlcScript from the dropdown. The text window will now display the "# insert AlcScript code here" comment at the top of the window.
 +
# Insert the following AlcScript. Your code should look something [[Media:footSteps_alc.jpg|like this example covering two regions]].:
 +
'''<objectname>''':
 +
    region:
 +
      type: footstep
 +
      surface: '''<surface name>'''
 +
==Alternative: Using Text Properties==
 +
# Add the following text properties to the region.
 +
'''<objectname>''':
 +
    type: region
 +
    region:
 +
      type: footstep
 +
      surface: '''<surface name>'''
 +
When you are done, you should have [[Media:footSteps_rgns.jpg|something like this]]. This concludes this GoW tutorial on adding footstep sound regions.
 +
== Available footstep sounds ==
 +
Use one of these for the "surface" setting in the region properties/AlcScript.
 +
*dirt
 +
*puddle (Not implemented in PotS plasma. '''Do not use''')
 +
*water
 +
*tile
 +
*metal
 +
*woodbridge
 +
*ropeladder
 +
*grass
 +
*brush (Not implemented in PotS plasma. '''Do not use''')
 +
*hardwood
 +
*rug
 +
*stone
 +
*mud (Not implemented in PotS plasma. '''Do not use''')
 +
*metalladder
 +
*woodladder
 +
*deepwater
 +
*maintainerglass (Not implemented in PotS plasma. '''Do not use''')
 +
*maintainerstone (Not implemented in PotS plasma. '''Do not use''')
 +
*swimming
 +
==Notes==
 +
*When creating footstep regions you can put another footsteps region inside an existing one. For example, if the majority of your ground is stone, create a "stone" footstep region that encompasses the entire age. Then you can put grass footstep regions inside the stone region
 +
*While a region can be any shame, the region bounds are "convex hull polytopes". This means that complex shapes will be "simplified". See Fig. 1 for an example [[File:Footsteps-.jpg|thumb|right|Fig. 1. Convex Hull Example]]
 +
*Try not to overlap footstep regions as they sometimes do not work properly when overlapping.
 +
*In version 1.2.0, using the Scripts > Add > PyPRP > Add a Footstep Sound Region will set the text properties to [[Media:FootProps.jpg|the default]].
 +
*Text settings override [[AlcScript]] settings. If you intend to use [[AlcScript]] to set your surfaces, you will need to delete the surface property.
  
Using the old plugin I always had troubles getting footsteps to work. Using AlcScript however I had it working in one go. It's really simple. You only need to steps:
+
[[Category:PyPRP]]
 
+
[[Category:AlcScript]]
 
+
1. add a region
+
 
+
2. add AlcScript for that specific region
+
 
+
 
+
Have a look at my age. You will notice I added to regions (marked pink). The one on the left is called RgnFootStepGrass, the other one RgnFootStepDirt.
+
 
+
 
+
[[Image:footSteps_rgns.jpg]]
+
 
+
 
+
== Step 1: Adding regions ==
+
 
+
So how did I add these regions. Actually this is pretty simple too. Change one of the Blender windows to Scripts and use the Script button to add a PrP script. One of the options is "Add Footstep Region". Sounds like that's the one we need.
+
 
+
 
+
[[Image:footSteps_addRgn.jpg]]
+
 
+
 
+
Regions are by default added to the second layer in Blender. To be able to scale them I activated both the first and second layer (hold shift while clicking on the layer buttons).
+
 
+
 
+
[[Image:footSteps_layers.jpg]]
+
 
+
 
+
Remember the old plugin had some sort of fad out at the regions borders? Well now the sounds are played exactly within the defined region.
+
 
+
 
+
== Step 2: adding AlcScript ==
+
 
+
This was the first time I actually added AlcScript. And it couldn't have been easier.
+
 
+
 
+
For starters change one of the windows to Text and choose AlcScript from the dropdown. The text window will now display the "# Insert AlcScript code here" comment at the top of the window. Chances are there isn't more code yet. Have a look at the code I entered.
+
 
+
 
+
[[Image:footSteps_alc.jpg]]
+
 
+
 
+
I added code for both regions, using there object names.
+

Latest revision as of 08:53, 4 March 2020

Disambig gray.png

This is a tutorial page.Versions available: PyPRP; 3ds Max; Korman.
 

Welcome to this GoW Plugin tutorial on how to add footstep sound regions. This tutorial assumes you have followed the instructions on the installing PyPRP page. In this tutorial, you will learn how to add footstep regions. We will begin by adding the regions and then configure them.

Adding regions

  1. Change one of the Blender windows to Scripts and use the Script button to add a PyPRP script. Then click "Add a Footstep Sound Region".
  2. Select the second layer of the blender file, where the region is stored.
  3. Set the region's object name. You will need these when adding the AlcScript later to properly configure them.
  4. Change one of the windows to Text and choose AlcScript from the dropdown. The text window will now display the "# insert AlcScript code here" comment at the top of the window.
  5. Insert the following AlcScript. Your code should look something like this example covering two regions.:
<objectname>:
   region:
      type: footstep
      surface: <surface name>

Alternative: Using Text Properties

  1. Add the following text properties to the region.
<objectname>:
   type: region
   region:
      type: footstep
      surface: <surface name>

When you are done, you should have something like this. This concludes this GoW tutorial on adding footstep sound regions.

Available footstep sounds

Use one of these for the "surface" setting in the region properties/AlcScript.

  • dirt
  • puddle (Not implemented in PotS plasma. Do not use)
  • water
  • tile
  • metal
  • woodbridge
  • ropeladder
  • grass
  • brush (Not implemented in PotS plasma. Do not use)
  • hardwood
  • rug
  • stone
  • mud (Not implemented in PotS plasma. Do not use)
  • metalladder
  • woodladder
  • deepwater
  • maintainerglass (Not implemented in PotS plasma. Do not use)
  • maintainerstone (Not implemented in PotS plasma. Do not use)
  • swimming

Notes

  • When creating footstep regions you can put another footsteps region inside an existing one. For example, if the majority of your ground is stone, create a "stone" footstep region that encompasses the entire age. Then you can put grass footstep regions inside the stone region
  • While a region can be any shame, the region bounds are "convex hull polytopes". This means that complex shapes will be "simplified". See Fig. 1 for an example
    Fig. 1. Convex Hull Example
  • Try not to overlap footstep regions as they sometimes do not work properly when overlapping.
  • In version 1.2.0, using the Scripts > Add > PyPRP > Add a Footstep Sound Region will set the text properties to the default.
  • Text settings override AlcScript settings. If you intend to use AlcScript to set your surfaces, you will need to delete the surface property.