instantreality forum
news: Welcome to the instantreality forums!
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 26, 2018, 03:01:08 am

Login with username, password and session length

Pages: [1]
Author Topic: Wrong behaviour of Sound node's ellipsoid  (Read 4690 times)
Jr. Member
Posts: 58

View Profile
« on: August 30, 2007, 12:15:17 pm »


i think there's a bug in the implementation of the Sound node's max/min fields.
According to the spec the audio of a Sound node should not be audible outside the ellipsoid specified by the min/max* fields.

The Sound node has an outer ellipsoid that defines a volume of space that bounds the audibility of the sound. No sound can be heard outside of this outer ellipsoid.

But unfortunately the audio is still playing and audible outside the ellipsoid. That way the sound NEVER goes silent. To demonstrate the effect i have modified the sound example from the testset and added a visualize='true' for the Sound node.  If you run the scene and move the user outside of the red ellipsoid, the sound is still there (while it shouldn't).

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "">
<X3D xmlns:xsd='' profile='Full' version='3.0' xsd:noNamespaceSchemaLocation=''>
  <Scene DEF='scene'>
    <Viewpoint DEF='cam' position='0 0 20'/>
    <GradientBackground position='0 1' color='0 0.329 0.706 0 0.008 0.082'/>
    <Toggler DEF='controller' status='true'/>
    <Transform DEF='trans'>
        <Text string='"Spatial Sound Source"'>
          <FontStyle justify='"MIDDLE"' family='SANS' />
      <Sound DEF='sound' maxBack='50' maxFront='50' minBack='3' minFront='3' visualize='true'>
        <AudioClip DEF='source' loop='true' url='"sound/motor.wav"'/>
    <ROUTE fromNode='source' fromField='isActive' toNode='controller' toField='set_status'/>   

Tested on Gentoo using the SuSE rpm (V2.0.0beta2 build: R-8545).

Sr. Member
Posts: 250

View Profile
« Reply #1 on: August 30, 2007, 03:11:38 pm »

Hello Peter,

yes, you are right, the Sound node does not work as specified in the X3D specification. The problem is that none of the 3D sound APIs Instant Player is based on (DirectSound on Windows, OpenAL on all other platforms) supports the X3D sound model. Instead we had to map the X3D sound model (the ellipsoid) onto the model used by these APIs (which use a cone), and this mapping of course is not perfect.


Pages: [1]
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines