Physical Audio for Virtual Worlds



news  |  intro  |  source  | demos | readcontact | main 




9 June 08

Links to recent talk and papers added.


28 May 08

Phya released as Open Source under the ZLib license.
Also included is a new demo for the Bullet dynamics engine.






Sample-based playback is the norm for virtual world audio. Physical modeling techniques promise more responsive and engaging sound, but have yet to be widely adopted. The reason is partly that integrating physical audio into a virtual world is a challenging task both in terms of technology creation and content creation.

Phya is a C++ library, that was created as an expandable system for adding physical audio to a virtual world. It is based around creating collision sounds resulting from the interaction of surfaces and object resonance. When integrated with a dynamics engine of a virtual world, it can produce sounds that realistically reflect the state of objects colliding in the world. Once integration is complete, the developer just specifies the audio properties of the objects, and then all the audio updating and generation is taken care of by Phya.

The properties describing the sound objects make can be extracted from real recordings using analysis tools, a process sometimes called physical sampling. The Phya distribution includes such a tool. You could for instance analyze a recording of an oil drum being hit, then use it in a game where an oil drum was being rolled and smashed about. Instead of playing back that same sample again and again, we hear all the variation and detail that occurs when a real drum collides with different objects. Another advantage, is that the memory footprint for the physical sample, which can generate so much varied audio, is a small fraction of even one short audio sample. Physical samples are also very flexible, and can be edited creatively for a variety of effects.

The CPU resource used depends on many factors, however in general you will be surpirised how much high quality interactive sound you can have for minimal costs. Phya measures in the 10s of K in size, and its dynamic costs are typically similar, depending on complexity of useage.

Phya currently compiles for Windows. However, it should be readily ported to other platforms, and support for mac and linux will appear soon. The Bullet dynamics engine, used in the examples, compiles cross platform. 

Feature summary:

  • Efficient dynamic body/surface/contact/impact/generator/resonator framework.
  • Scene management to minimize and manage cost.
  • Modal analyzer for faithfully transforming sound recordings to resonance files that are tiny compared original sound files.
  • Variety of surface models smooth/parametrised roughness/grid/recorded.
  • Geometric utility functions for calculating contact velocities from physical bodies.
  • Look-ahead limiter class for output streams.


Phya distribution download

The Phya distribution is Copyright (C) 2001-2008 
Dylan Menzies,  except in parts where it is clearly stated otherwise. The material under this copyright is released under the terms of the ZLib license printed below. 


This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

    1. The origin of this software must not be misrepresented; you must not
    claim that you wrote the original software. If you use this software
    in a product, an acknowledgment in the product documentation would be
    appreciated but is not required.

    2. Altered source versions must be plainly marked as such, and must not be
    misrepresented as being the original software.

    3. This notice may not be removed or altered from any source
    distribution.

If you accept the terms of this license you can download the distribution by clicking on the following link.

Yes I accept the terms of the license


It is also appreciated if you inform us of projects using Phya, and report any issues.

Demos

For best results, use a good audio playback system, not your laptop speakers..

CcdPhysicsDemo_phya.rar (251 K) First demo exe using the Bullet dynamics engine. Bintop meets Agent Smith. Still in need of proper impacts, and there appears to be a spurious pumping issue needs fixing. Future demos will make use of chains, sheets and deformable solids.
CcdPhysicsDemo_phya.mov (576 K) Movie of the Bullet demo.
demos.zip (563 K) Old demo exes using an old dynamics engine. Warning : frame rate not fixed.
demos.mov (3.4 M) Movie of the above demos.

Reading materials

Some papers and talks are available here.

For more information, report problems or to be kept informed of updates please contact -

news  |  intro  |  source  | demos | readcontact | main