• 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.

VaM 1.x Performance of sounds in var file

Threads regarding the original VaM 1.x

Aipas

New member
Joined
Sep 27, 2024
Messages
14
Reactions
1
Quick question regarding VAM 1:

If I have a somewhat performance heavy scene with a fairly number of sounds being used, does pulling those sounds from a var impact performance substancially?
I want to release some scenes and those sounds will be used in various ones, hence the var.

Since a var is basically a rar, and there's supposed to be cpu use to extract files, does it make much of a difference or does vam just use cache or pre-load in some way?

Sorry if this has been asked before, but I couldn't find anything after a quick search.
 
A var is not an rar, it's a zip file, with a very specific structure. The general advice for loading multiple sounds is to put them in an assetbundle. There's info here on how to do that, but I don't know exactly where. Loading sounds from an assetbundle is way faster than loading individual files.
 
Upvote 0
Hmmm.
I hadn't considered assetbundles because I wanted to use sound randomizer, but apparently I do have a plugin that can read sounds from assetbundles and then randomize them.
I want to release one scene this weekend, so I'm not sure I'll create an assetbundle right now, but maybe I'll look into it for other scenes.

Thanks for the answer.
 
Upvote 0
If you only have a handful of files, there's not much difference. When you have a dozen, it's noticeable, but not too bad. When you have several dozen, it gets painful.
 
Upvote 0
They're very small files, about 1 sec each, but there's 171 of them.
I notice loading the scene is bad, but can't tell on playing it, because there might be other factors causing hicups, like triggers and such.

Will probably have to think about that asset bundle for the future, but if I understand sound asset bundles correctly and you have to "customize", tag, whatever, each individual sound, it's gonna have to be in the future indeed.
Thanks again.
 
Upvote 0
  • Sounds from AssetBundle can be played with LogicBricks.
    • You can play individual files as well as use the folder structure to pick one at random
  • Loading performance improves massively.....something like 50-60x faster. This is because VaM needs to load and convert the audio files into Unity internal formats. The AssetBundle has already the correct format.
  • With the AssetBundle you have better control over runtime performance and memory usage as well. You can pick load type and compression format for each file when importing the audio into Unity Editor, which you need to create the AssetBundle. E.g. long music tracks should be MP3/OGG, while short effect sounds should be uncompressed to reduce CPU load and lag.
 
Upvote 0
Damn, now you're really tempting me to do it.
But all my files are ogg and I can't undo compression and I really didn't want to redo 171 cuts over various files and... ugh.
Gonna have to download unity then.

By the way, thanks for your plugins. Your random choice saved my bacon big time.
 
Upvote 0
With 171 sounds you definitely want them as an assetbundle. See my resources for a guide on the topic which was 1000% inspired by Mac's very convicing suggestions on the topic.
Make sure you keep a copy of your local oggs in case you want to update later your assetbundle or similar.
 
Upvote 0
I hear you.
Currently I have 7 sound randomizer plugins in an audio source so that each has a different group of sounds to randomize from.
I'm hoping the asset bundle will let me "flag" or "tag" groups, otherwise I'll need 7 asset bundles as well, but I guess I'll find out when I read some guides.
Presently trying to release my first scene, and troubleshooting some stuff, but I'll get around to it.
Thanks guys.
Sound loading has been a pain, especially since the scenes I've been working on already take a while to load. Gotta start optimizing.
 
Upvote 0
If you're not aware, you can have folders in the audiobundle to separate into groups your sounds. You can potentially use 7 folders to randomize the 7 groups in one single assetbundle, if it makes sense to put them all in one.
If it doesn't and is better to have 7 assetbundles, it's only a few minutes to make them anyway.

An example of a single assetbundle with folders is also in my resources, see the american voices pack. The bundle has 4 folders with speech for the sex animations that I randomize to suit the "before sex", "during sex", "pre-cum" and "after sex" parts, all in one bundle, each group played only when needed and randomized independently.

If there weren't enough reasons for you to start using audiobundles, the above is an excellent feature you have to try.
 
Upvote 0
Will do.

Pheww. Managed to troubleshoot my first var release. Gonna take a break.
Maybe I'll be able to release the scene this weekend with the asset bundle, but I doubt I'll have the courage to redo 171 cuts over various sound files, so it'll have to be ogg.
Now I just have to solve the tts problem. This first scene has so little dialogue that it doesn't bother me, but man, I haven't come remotly close to find something nice yet. Azure looked promising, but I don't want to give my credit card details (it's a pet peeve I know) and I couldn't get the learn environment or whatever to work yet.

Again, thanks guys.
 
Upvote 0
Just make sure to test your VAR on a clean VAM before uploading. I know, you're eager to have it up, but taking some time to test it before uploading will be better. When stuff doesn't work and could be have spotted with a test, people can be brutal or get a bad impression and move on. Then you get demotivated or have to rush with fixes, and it's not good for anyone. Don't rush, make sure it's stable to show you are a creator who delivers something solid and worthy to follow.
 
Upvote 0
Annnnd I knew I was forgetting something.
But I tested it just now on a clean VAM and no problems. Still no green light from the HUB. Don't know how long the process usually takes.
 
Upvote 0
I've followed MacGrubber's tut and then atani's.
Looking good. :)

This is a very miniscule thing but I just gotta ask:
I have one audio bundle in unity with 9 subfolders. Some sounds are supposed to show up in various folders. Gotta repeat them inside the unity folders right? No way around that one I'm sure.
 
Upvote 0
Back
Top Bottom