Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Friction sound
PostPosted: Wed Feb 01, 2012 7:51 am 
Offline

Joined: Wed Jan 25, 2012 6:32 pm
Posts: 16
I've managed to do simple contact sound effects (iterating over contact points every simulation tick and taking m_appliedImulse). But how can I implement friction sound (e.g. when vehicle tires slide or a crate being dragged)?


Top
 Profile  
 
 Post subject: Re: Friction sound
PostPosted: Wed Feb 01, 2012 3:06 pm 
Offline

Joined: Sun Jan 01, 2012 7:37 pm
Posts: 55
I think the source engine detects a dragging motion, and then periodically checks if its still dragging or not, so its not a continuous detection, but only once every 200ms or so.


Top
 Profile  
 
 Post subject: Re: Friction sound
PostPosted: Thu Feb 02, 2012 3:13 am 
Offline

Joined: Mon Jul 19, 2010 3:11 am
Posts: 49
I have implemented basic physical sounds effects (impact, scratching), You can find mini tutorial here http://szamq.wordpress.com/2011/09/18/physical-sound/ The frictional sound method is done in the same way like yours - iterating over contacts, but with different condition


Top
 Profile  
 
 Post subject: Re: Friction sound
PostPosted: Sat Feb 04, 2012 6:45 pm 
Offline

Joined: Wed Jan 25, 2012 6:32 pm
Posts: 16
Thank you, it gave me a direction to think on.

And how do you handle rolling objects? They may have opposite velocities, but every contact point will be fixed in objects' local space (if there is no slipping).


Top
 Profile  
 
 Post subject: Re: Friction sound
PostPosted: Sun Feb 05, 2012 1:38 am 
Offline

Joined: Mon Jul 19, 2010 3:11 am
Posts: 49
i haven't implement rolling sound jet, but i believe it can be done like other two sounds by adding another condition which compares angular velocity of two objects body->getAngularVelocity(). Like this:

Code:
if(enough impulse and penetration) impact_sound();
else if(contact point distance < small value && linear velocities difference > small value 2)
{
   if(angular velocities difference < some value) rollingSound();
   else slidingSound();
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Exabot [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group