Game Development Community

Footsteps and player related SFX

by Duion · in Torque 3D Beginner · 07/24/2013 (10:10 am) · 21 replies

Recently I noticed, that I can't get the footsteps sound and other player related effects to work.
It looks like all is set up correctly, but nothing works, no sound on footsteps, no decals, no sprites, no enter/leave sound effects...
Also it looks like no one has them when I watch others demos, so is this a bug or is there a way to make them work?
Page «Previous 1 2
#1
07/24/2013 (11:22 am)
Bug with the stock model. Lacks keyframes.

img94.imageshack.us/img94/5614/pjo6.png
#2
07/24/2013 (11:53 am)
And how is this supposed to activate the footstep sounds, or don't they work at all with the soldier?
#3
07/24/2013 (11:55 am)
It needs those triggers to know when to play them. (Also turns on footprints.)
#4
07/24/2013 (12:45 pm)
Yes this works, but you have to activate the sound type in each material, but for terrain materials you can't and if you write them into the file by hand, they do not work.
#5
07/24/2013 (1:13 pm)
So for terrain, we find the associated material pair, in our poking around session, we used:
singleton Material(TerrainFX_sand)  
{  
   mapTo = "sand";  
   footstepSoundId = "3";  
   terrainMaterials = "1";  
   ShowDust = "1";  
   showFootprints = "1"; 
   materialTag0 = "Terrain";  
   specularPower[0] = "1";
   effectColor[0] = "1 0.768628 0 1";
   effectColor[1] = "1 0.768628 0 0.349";
};  

new TerrainMaterial()
{
   internalName = "sand";
   diffuseMap = "art/terrains/Example/sand";
   detailMap = "art/terrains/Example/sand_d";
   detailSize = "10";
   detailDistance = "100";
   isManaged = "1";
   detailBrightness = "1";
   Enabled = "1";
   diffuseSize = "200";
};

Note the internalName entry for the TerrainMaterial matches the mapTo entry in TerrainFX_sand. from there you can use the editor to alter the TerrainFX_sand entries.

edit: flipped dustpuffs on in the example code. see #7 for resolution to the side effect just that bit introduces.
#6
07/24/2013 (1:24 pm)
Want to make your Torque-default-soldier make annoying noises when he walks with leaving black smoke and skidmarks wherever he walks? Then try Azaezels super hotfix:
s1.directupload.net/images/130724/8xelrken.jpg
#7
07/24/2013 (1:39 pm)
the black dustpuff bit is due to either the
datablock PlayerData(DefaultPlayerData)
{
   footPuffEmitter = "LightPuffEmitter";
//or
   dustEmitter = "LightPuffEmitter";
}
(not sure which)
entries reffering to a particle emitter who's particle has no texture assingment. that's remedied via:

datablock ParticleData(LightPuff)
{...
   textureName = "art/particles/dustParticle.png";
   animTexName = "art/particles/dustParticle.png";
...}
(There's an editor entry for that as well)


edit: in the example I threw over, the trigger frames are at key 0, and key 10-11 out of 22. the skidmark bit above is due to that 0, so a proper implementation would be to offset that intial trigger a bit. Ideally by a proper artist syncing it up to the feet hitting the ground. Note that it's a per-animation system, so animations need triggers for every weapon, if using weapon prefixes.
#8
07/24/2013 (5:10 pm)
Quote:"Want to make your Torque-default-soldier make annoying noises when he walks with leaving black smoke and skidmarks wherever he walks? Then try Azaezels super hotfix"

That's still ten times better than what you had before Azaezel took the time to help you (us). :P

Thanks Azaezel, that works for me.
#9
07/24/2013 (5:41 pm)
We were joking around in irc about it. Belive my response was "keyframe triggers eeeeeverywhere!" Sorry if that leaked out in an odd direction. *I* certainly don't take offense. Matter of fact, I even explicitly remarked that I'd halfassed the example, and wouldn't pull-request it due to it makin the engine look bad, so it should be done by an artist.
#10
07/24/2013 (5:45 pm)
Looks like you'll want some decalOffset in your datablock.
#11
07/24/2013 (5:52 pm)
@Azaezel - by "we" you mean you and Duion? If that's the case I'll edit the post, but just be aware that a lot of us don't idle in irc like some of you guys. The possibility of someone taking offence (like I did) should probably be considered when posting "in" jokes. Just saying.

Also, it's always dead in irc when I'm on... why does all the fun happen when I'm not there? Too much idlers! :P
#12
07/24/2013 (5:54 pm)
Yes, Duion and I were poking at the same issues together after about the second or third post in the thread (Hadn't gotten around to hunting down the terrain bits m'self at that point just yet). Again, apologies.
#13
07/24/2013 (6:17 pm)
Oh, don't apologise. I changed the post to be a bit more playful, and less Judge Dredd.
#14
07/24/2013 (6:17 pm)
Get a room, you lot ;). Is this the sort of issue that could be pull-requested to improve the stock templates? Seems like the TSShapeConstructor scripts for the soldier would be one of the main changes.
#15
07/24/2013 (6:20 pm)
Yes, provided someone with a better eye were to gen the keyframe triggers to match the feet. The rest of the fixes aren't terribly relevant without em. (Just ask my crew. I don't offer programmer art, I threaten with it :P)
#16
07/24/2013 (6:30 pm)
You just need the keyframe numbers? I can do that next time I'm in Torque... Though I'm not sure if I'm supposed to match the foot touching the ground frames or not.

@Daniel - lol
#17
07/24/2013 (6:40 pm)
to do it right, would need better numbers than:

soldier_rigged.cs
function SoldierDAE::onLoad(%this)
{...

   %this.addTrigger("Back", "10", "2");
   %this.addTrigger("Back", "0", "1");
   %this.addTrigger("Run", "0", "1");
   %this.addTrigger("Run", "10", "2");
   %this.addTrigger("Side", "0", "1");
   %this.addTrigger("Side", "10", "2");
   %this.addTrigger("Pistol_Back", "0", "1");
   %this.addTrigger("Pistol_Back", "10", "2");
   %this.addTrigger("Pistol_Run", "0", "1");
   %this.addTrigger("Pistol_Run", "11", "2");
   %this.addTrigger("Pistol_Side", "0", "1");
   %this.addTrigger("Pistol_Side", "10", "2");
   %this.addTrigger("ProxMine_Back", "0", "1");
   %this.addTrigger("ProxMine_Back", "10", "2");
   %this.addTrigger("Land", "0", "1");
   %this.addTrigger("Land", "1", "2");
   %this.addTrigger("Pistol_Land", "2", "1");
   %this.addTrigger("Pistol_Land", "0", "2");
   %this.addTrigger("ProxMine_Land", "0", "1");
   %this.addTrigger("ProxMine_Land", "1", "2");
   %this.addTrigger("ProxMine_Run", "0", "1");
   %this.addTrigger("ProxMine_Run", "10", "2");
   %this.addTrigger("ProxMine_Side", "0", "1");
   %this.addTrigger("ProxMine_Side", "10", "2");
   %this.addTrigger("Turret_Back", "0", "1");
   %this.addTrigger("Turret_Back", "10", "2");
   %this.addTrigger("Turret_Run", "0", "1");
   %this.addTrigger("Turret_Run", "10", "2");
   %this.addTrigger("Turret_Land", "0", "1");
   %this.addTrigger("Turret_Land", "1", "2");
   %this.addTrigger("Turret_Side", "0", "1");
   %this.addTrigger("Turret_Side", "11", "2");
...}
yes.
#18
07/24/2013 (7:59 pm)
Yeah... I'm not touching that. Too bloody lazy! That, and repetitive work makes me crazier than I already am.

Apologies for putting my hand up.
#19
07/24/2013 (9:58 pm)
Ugh, I'd forgotten how many animations we have to work with.

Who's up for recoding the Player animation system so we can share lower-body animations between weapons?
#20
07/24/2013 (10:39 pm)
Set your trigger in the Frame the foot passes the body's 'center', as there is no Y offset, only the X value in the datablock for the decals position; or as close to 'center' as you have a Frame...if things haven't change in the latest T3D[long time away from Torque].
Page «Previous 1 2