• Hi Guest!

    We are extremely excited to announce the release of our first Beta1.1 and the first release of our Public AddonKit!
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. For access to the Public AddonKit you must be a Creator tier member. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.
  • Hi Guest!

    VaM2 Resource Categories have now been added to the Hub! For information on posting VaM2 resources and details about VaM2 related changes to our Community Forums, please see our official announcement here.
Audiobundles: assetbundles for sounds

Guides Audiobundles: assetbundles for sounds

audiobundles_banner.png

Audio assetbundle => Audiobundle

But why put audio files into assetbundles???
  • Lightning fast loading
  • Easy to reuse
Tons of audio files can be loaded in a single assetbundle almost instantly; don't waste time waiting for the sounds in Scene Audio to finish loading.


Typical uses of audio in VaM scenes

  • Speech for a story
  • Moans and dirty talking in sexual activities
  • Music and ambience
  • Sound effects
You can add all these as wav, ogg, mp3, to Scene Audio, but if you have more than a few you have by now noticed take it makes your scene take longer to load. That's a bummer.
If you want to use them on another scene of yours, you have to add them one by one to Scene Audio, set the appropriate triggers to each, another pain in the endless pains of scene making in VaM.
Do you want to change the sounds for a different group of similar sounds? Tough shit, you probably need to redo the above and create a copy of your scene.

Naturally, a few tiny sounds you only need to use in one scene are not worthwhile making to an audiobundle, but if scaling, reuse or in-scene loading is of interest, and audiobundle is what you want to use.


Ok, audio assetbundles load fast and scale well, that's nice, but how to make them?

First you need some audio files, then for the Unity part, MacGruber made things easy for you already. Follow MacGruber's guide on how to make assetbundles to install the right Unity version and some extra tools that make the process easier:
Seriously, don't worry about all the weird stuff, just follow the guide and you'll be fine. I never touched anything Unity-wise or the likes before and managed to do audio assetbundles. You only need to do part of the guide, audio is essentially: drag and drop > build assetbundle > done.


Audiobundle workflow, step-by-step:

The following expects you to have followed MacGruber's guide to install the correct Unity version and his extensions like VaMExporter.
The screenshot on the right should be similar to your Unity look, or at least the same sections exist.
  1. Copy audio files/folders to the Audio folder in your Unity project
  2. Drag the files/folders to the Configure tab to create one or more assetbundles
  3. Write a name for your assetbundle:
    3a. Your folders and files show up here
    3b. Set the audio options for your files if needed
  4. Build the assetbundle(s)
    4a. A rotating cog will show up when building the assetbundles. Wait for it to disappear
  5. Add the name(s) of the assetbundle(s) with .assetbundle at the end and click "Copy Build Assetbundles". Make sure the folders above are correct
  6. You're done, congratulate yourself on your first audio assetbundle

Note on folders:
You don't have to include folders like the ones in the screenshot, you can just drag and drop files.
The SoundfromAB brick has a feature to play files that are inside specific subfolders, not just from the entire assetbundle. It's your choice to use or not this feature.
Using folders helps to extend the use of an audiobundle by playing only the files inside a specific folder, thus having different folder content for different needs.
Unity instructions for making a audiobundle


How to use an audiobundle?

There's a plugin that MacGruber created that will load and play audio assetbundles. This is in the Logicbricks VAR and the plugin is called SoundfromAB or RandomSoundfromAB. You can add it on a person, to use the HeadAudio receiver, or in some sound-related atom. Trigger the plugin and it plays.
I believe that by now other plugins exist that can play audiobundles, so make sure to check the Hub's plugins list for more options. There's also audiobundles being shared as resources.

Every day a new Text to Speech system pops up, or you get your files from another source, all this is done outside VaM and it's up to you to find what you want to have.
A tool like Audacity is very useful to edit your audio content, try to make your collections consistent and clear. The web is full of tips on how to improve audio.

Shameful self-promotion area
In my scenes I make extensive use of audiobundles for intro animations, sex speech, ambience, music, and sfx, especially on my NEXT template-based scenes. Those also include a scene structure process that I named quickspeech, that allows for in-scene reuse of audiobundles for sex speech. I share 2 voices as audiobundles that you can use on any of the template-based scenes.

The voices you can use:

The structure in detail, if you'd like to learn more:

More resources from atani

Share this resource

Credits

Creator Support Link
MacGruber MacGruber

Latest reviews

Positive
PVP
Bookmarked
Upvote 0
Great guide! I always wanted to learn how to do this because manually adding hundreds of sound clips is a pain in the butt. Big thanks
atani
atani
This guide was part of another guide of mine but I thought it needed to be its own guide and be more noticeable.
Glad it's helpful, hundreds of clips in Scene Audio is hell.
Upvote 0
Back
Top Bottom