Difference between revisions of "PyPRP:Adding Footstep Sounds"

m
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.
+
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"]].
Using the old plugin I always had trouble getting footsteps to work. Using AlcScript however I had it working in one go. It's really very simple. You only need two basic steps:
+
# [[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.
 
+
This concludes the region-adding section of this tutorial. The regions are now in. However, you will need to configure these regions to create proper footstep sound regions.
1. add a region
+
==Adding AlcScript==
 
+
# 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.
2. add AlcScript for that specific region
+
# Insert the following AlcScript:
 
+
 
+
Have a look at my age. You will notice that I added two regions (marked pink). They cover both my grassy patch and my dirt patch. In this tutorial I will explain how to add these regions and how to add the correct AlcScript to make them work. Don't worry! This will be a walk in the park.
+
 
+
 
+
[[Image:footSteps_rgns.jpg]]
+
 
+
 
+
== Step 1: Adding regions ==
+
 
+
So how did I add these regions. Actually this is pretty straight forward too. Change one of the Blender windows to Scripts and use the Script button to add a PyPRP script. One of the options is "Add a Footstep Sound 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 correctly I activated both the first and second layer (hold shift while clicking on the layer buttons), so both my terrain and the regions would be visible.
+
 
+
 
+
[[Image:footSteps_layers.jpg]]
+
 
+
 
+
Don't forget to set their object names. The Region on the left is called RgnFootStepGrass, the other one RgnFootStepDirt. We will need these when adding AlcScript.
+
 
+
 
+
Btw don't think a footstep region has to be rectangular. You can give it any shape you want. For instance in my Swimming pool age ([[Adding swimregions]] tutorial) I added a big region for the pool side tiles and actually cut out the pool part. This way very interesting regions can be created.
+
 
+
 
+
Remember the old plugin had some sort of fade out at the regions edges? Well now the sounds are played all the way to the edge of the region. Pretty cool!
+
 
+
== 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 that's the only code there is right now.
+
 
+
 
+
Have a look at the code I entered.
+
 
+
 
+
[[Image:footSteps_alc.jpg]]
+
 
+
 
  '''<objectname>''':
 
  '''<objectname>''':
 
     region:
 
     region:
 
       type: footstep
 
       type: footstep
 
       surface: '''<surface name>'''
 
       surface: '''<surface name>'''
 
+
# Your code should look something [[Media:footSteps_alc.jpg|like this example covering two regions]].
I added code for both regions, using their object names. (Remember I said we would need those here?). For simple footsteps only two properties have to be set:
+
==Alternative: Using Text Properties==
 
+
# Add the following text properties to the region.
 
+
1. '''type''': in this case we are adding code to a footstep region
+
 
+
2. '''surface''': type of sound. Here resp. dirt and grass
+
 
+
== Alternative to step 2: using text properties (the old way) ==
+
 
+
You can also use text properties, similar to the old footstep region style. Any text properties set on an object will override [[AlcScript]] settings. The new props for footstep regions are:
+
 
  '''<objectname>''':
 
  '''<objectname>''':
 
     type: region
 
     type: region
Line 71: Line 20:
 
       type: footstep
 
       type: footstep
 
       surface: '''<surface name>'''
 
       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.
Note: in version 1.2.0, using the Scripts > Add > PyPRP > Add a Footstep Sound Region will set the text properties to the default:
+
 
+
[[Image:FootProps.jpg]]
+
 
+
Because text settings override [[AlcScript]] settings, if you intend to use [[AlcScript]] to set your surfaces, you will need to delete the surface property.
+
 
+
 
== Available footstep sounds ==
 
== Available footstep sounds ==
 
+
Use one of these for the "surface" setting in the region properties/AlcScript.
There are off course many more types of terrain you will want to add footstep sounds too. Below is a list of available footstep sounds to use with the "surface" property.
+
 
+
It has been noted that some of the footstep sounds intended to be in the game were never actually included, and using these sounds will crash the game. They have been marked in the list below.
+
 
+
 
*dirt
 
*dirt
*puddle (Not implemented in PotS plasma. Do not use)
+
*puddle (Not implemented in PotS plasma. '''Do not use''')
 
*water
 
*water
 
*tile
 
*tile
Line 92: Line 31:
 
*ropeladder
 
*ropeladder
 
*grass
 
*grass
*brush (Not implemented in PotS plasma. Do not use)
+
*brush (Not implemented in PotS plasma. '''Do not use''')
 
*hardwood
 
*hardwood
 
*rug
 
*rug
 
*stone
 
*stone
*mud (Not implemented in PotS plasma. Do not use)
+
*mud (Not implemented in PotS plasma. '''Do not use''')
 
*metalladder
 
*metalladder
 
*woodladder
 
*woodladder
 
*deepwater
 
*deepwater
*maintainerglass (Not implemented in PotS plasma. Do not use)
+
*maintainerglass (Not implemented in PotS plasma. '''Do not use''')
*maintainerstone (Not implemented in PotS plasma. Do not use)
+
*maintainerstone (Not implemented in PotS plasma. '''Do not use''')
 
*swimming
 
*swimming
 
+
==Notes==
== Wrapping up ==
+
*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]]
Well... that's it. There isn't much more to it. You have to take my word that I actually do have footsteps in my little age ;)
+
*Try not to overlap footstep regions as they sometimes do not work properly when overlapping.
I'm not sure whether more tweaking is possible with AlcScript. I will have to figure that out for myself first or have some of the real PyPRP gurus have it explain to me. If there is more I will add it here.
+
*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.
 
+
Shorah!
+
 
+
 
+
Marcello
+
 
+
 
+
 
+
----
+
 
+
NOTE:
+
 
+
When creating footstep regions you can put another footsteps region INSIDE an existing one. (Simply use the Scripts Window to create a new footsteps region ... then change it's property (puple smilie face button) to whatever sound you want.)
+
 
+
If the majority of your ground is "rock" ... make a "stone" footsteps region that encompasses the WHOLE age.  
+
Then you can put grass footstep regions INSIDE that one (where your grass is) ...
+
 
+
Now, there are some limitations ... regions can be ANY shape ... BUT ... (by default) are "convex hull polytopes" in shape in URU.  
+
That means that they are NOT necessarily the same shape as your region appears in Blender.
+
Imagine your region has been wrapped in "cling film" ... THAT is the shape it will be in Uru .... so ... it is something like this ...
+
 
+
 
+
 
+
[[Image:Footsteps-.jpg]]
+
 
+
 
+
 
+
this explains why some people have problems matching footstep areas exactly to "grassy" areas in Uru ... so, keep your grassy areas "blob" shaped (like the BLUE area in the picture)
+
 
+
(Also, try not to OVERLAP footstep areas ... sometimes they don't work properly if they overlap ... it is better practice to make sure that a new region is completely inside an existing one. You can also put regions inside regions inside regions inside region ect., ... just try not to let their boundaries overlap)
+
 
+
 
[[Category:Blender tutorials]]
 
[[Category:Blender tutorials]]
 
[[Category:AlcScript]]
 
[[Category:AlcScript]]

Revision as of 22:58, 5 August 2011

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.

This concludes the region-adding section of this tutorial. The regions are now in. However, you will need to configure these regions to create proper footstep sound regions.

Adding AlcScript

  1. 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.
  2. Insert the following AlcScript:
<objectname>:
   region:
      type: footstep
      surface: <surface name>
  1. Your code should look something like this example covering two regions.

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.