|
|
How do I add sounds to my Flux Studio Avatar?Flux Studio is a VRML97 authoring and animation application. This page explains how to use Flux Studio to create an avatar or object that makes a noise when it is clicked on. IMPORTANT NOTE: When dealing with sounds please remember that it should be a very small file so you should use tricks like halving the sample rate, converting from 16-bit to 8-bit, trimming all the silence at the beginning and end, etc... what ever you can do to make the file smaller. In other words, if someone clicks on your avatar/object and does not hear a sound for 3 minutes, they will probably not know what was responsible for the sound when they do hear it. Also, try to avoid continuously looping sounds. Although you may think they are neat, others might not like noise that they have no control over. I think sounds should be activated by "the other guy". This is the kind of sound that this tutorial shows how to make. To add sounds to an avatar, you get a WAV or midi file, and add a sound node to your avatar, then add a touch sensor to trigger off the sound when your avatar is clicked on.
You may also notice two ways of specifying the name of the sound file. The first way is great for testing. It is a relative path that looks for the file in the same directory as the VRML file. The other method specifies a secondary path to the file located somewhere on the web. This allows you to test at home on your desktop, as well as having an absolute path to a URL on the web for the rest of the world. Next you need to add something to trigger the sound. Hit the Create Sensor Icon , and click on your avatar. You are adding this "trigger" or sensor node to your avatar. You will also see that this Sensor Node is added to the scene tree. Double click on the TouchSensor Node to see its property panel. Under the sensor tab click on the Add Trigger button. Then, click on the Sound Node in the scene tree. You will notice that the trigger list is updated with "Trigger Node Sound: Sound1" and "Trigger Type: Start at Beginning". You may also notice that the sensor we've just added is called a "Touch Sensor". This means that when someone mouse clicks, or touches the avatar or object, this sensor will trigger the sound node to play. Save your work and hit the Launch Browser Icon . Click on your avatar and listen closely. Did it work? Do you have the volume turned up enough? Stand up and take a bow! For extra credit: Try different types of sensors such as a touch or visibility sensor. They will trigger off the sound when someone gets close to the object or only when they can see the object. |
|