• Hi Guest!

    We have posted a new VaM2 dev log on Patreon, starting a monthly cadence of written progress updates between Beta releases. Highlights include the new Gizmos System, Selection Carousel, and Modes System with Context-Specific Editing. Beta1.2 is 15 of 21 items complete.

    Read the full post on Patreon, or follow progress on the public Trello roadmap.

VaM 1.x Play sound on trigger (or on morph)

Threads regarding the original VaM 1.x

TheBlueBlood

Member
Joined
Jun 3, 2020
Messages
47
Reactions
61
Hello!

I am trying to do a simple kissing scene.
In "coding" words, here's what im trying to do: When Person 1 and Person 2 heads (or rather lips) gets close to each other, play [sound 1, sound 2, sound 3 or sound 4] (to add some randomness).

I've been trying on and off for the past week without any advancement by trying to reverse engineer a scene that does almost perfectly what im trying to achieve. The scene isn't using any plugin for the sound (it looks like it only uses Timeline and when a certain morph is activated, the sounds are playing).
So maybe what im also trying to achive is to trigger the sounds based on morph activation?

Could anyone guide me in the right direction?
Thanks!
 
Hey bro,

It's relatively easy to do. You have a couple of options. You can follow a similar strategy to what I used in this demo scene, but instead of throat sounds, it's lip sounds in your case. Should be easy to follow through.

I'm assuming you have just a couple of loose sound files (like .mp3, .wav, among others) and not an assetbundle with the sound files. If that's the case, you can use audiomate to browse your sound files. First add audiomate to your scene, and add your sounds to a playlist. Select the receiver Atom to be one of the Person atoms (say, Person 1), and Target to be the HeadAudio. Go to the playlist settings, enable loop, shuffle and "play only if audio receiver is clear".
Then you'll go to the lipTrigger of Person 1, and add a start trigger. The trigger should have the audiomate plugin as target, and then you select "play random clip from..." and then select your playlist. Add a rule to the trigger such that the sound is only played if the lip touches Person 2 (otherwise it'll play a sound regardless of what it touches). Copy this trigger and also paste it in the trigger exit. This will make it so a sound plays both when lips touch and also when they stop touching.

However, a problem with this is that the sounds will be played when the lips of Person 1 touch any part of Person 2's body. If you don't want this to happen, the solution would be to create a custom ColliderTrigger close to the mouth of Person 2 and then select THAT as the object to trigger the sound upon collision, instead of Person 2.

A second solution would be to use the plugin Sensor, which you could create triggers based on distance instead of collision.

Let me know if this helps, otherwise I'll take some screenshots or smth.
 
Upvote 0
Thanks!
So far I've managed to follow up until "Then you'll go to the lipTrigger of Person 1, and add a start trigger." and the rest. Couldn't find an option to add a trigger.
Also, im curious, is there an option to play all the sounds from the playlist until the contact is broken? Or it's really just upon contact and upon leaving?
 
Last edited:
Upvote 0
Hey,

So I've just tested to see how it could work. I made it such that a sound is always being randomly played if the lips are in touch. Here's the step by step after you've added the sounds to the playlist in audiomate.

Go to the Receiver settings and leave as follows ("Person" being the one that you'll configure the triggers):
1781053999829.png


Go to the settings of the playlist ("COLLECTION" tab) and leave as follows:
1781054045111.png

The continuous play checkbox is what will allow the sound files to be played continuously and shuffled after the first sound is played.

Now go to the Person atom you'll configure the triggers. Triggers for body parts that can receive penetration can be found in the "Jaw Physics and Triggers Tab":
1781054149683.png


Go to the LipTrigger and configure a "Start Action" trigger that both enables the playlist and plays a random sound from it, like so:
1781054222397.png


As an "End Action" trigger, disable the playlist:
1781054256816.png


In this same page, add the 2nd Person Atom as a filter, so the sound is only played for this person:
1781054315694.png


And there you go! Here's what it would look like (imagine you have your kissing sounds instead of the ones I'm playing here as example):


Note that this is only affecting the sound aspect of the kiss. For morphs, you can use other triggers to modify morphs and bring realism to the scene, like closing their eyes and moving their mouths. I believe we even have plugins dedicated for that.
Now, like I said in my previous comment, a problem with this is that a kissing sound will be played regardless of where Person A's mouth touches Person B. So the lips can touch the forehead and a kissing sound will be played regardless. If you have a scene which is ONLY kissing, this is not a problem. However, supposed you'd create a scene with more than that, this has to be taken into account. The first way I would try to approach this would be to create a CollisionTrigger close to the mouth of Person B and use that as the filter in the LipTrigger of Person A. Another way to do it, which in my opinion is the best one, is use the plugin Sensor to replace the triggers in LipTrigger solely based on distance and not collision. Then a sound will be played as long as the lips are close enough (which can be customized).

Hope it helps.
 
Upvote 0
Hey,

So I've just tested to see how it could work. I made it such that a sound is always being randomly played if the lips are in touch. Here's the step by step after you've added the sounds to the playlist in audiomate.

Go to the Receiver settings and leave as follows ("Person" being the one that you'll configure the triggers):
View attachment 598485

Go to the settings of the playlist ("COLLECTION" tab) and leave as follows:
View attachment 598486
The continuous play checkbox is what will allow the sound files to be played continuously and shuffled after the first sound is played.

Now go to the Person atom you'll configure the triggers. Triggers for body parts that can receive penetration can be found in the "Jaw Physics and Triggers Tab":
View attachment 598487

Go to the LipTrigger and configure a "Start Action" trigger that both enables the playlist and plays a random sound from it, like so:
View attachment 598488

As an "End Action" trigger, disable the playlist:
View attachment 598489

In this same page, add the 2nd Person Atom as a filter, so the sound is only played for this person:
View attachment 598490

And there you go! Here's what it would look like (imagine you have your kissing sounds instead of the ones I'm playing here as example):
View attachment 598491

Note that this is only affecting the sound aspect of the kiss. For morphs, you can use other triggers to modify morphs and bring realism to the scene, like closing their eyes and moving their mouths. I believe we even have plugins dedicated for that.
Now, like I said in my previous comment, a problem with this is that a kissing sound will be played regardless of where Person A's mouth touches Person B. So the lips can touch the forehead and a kissing sound will be played regardless. If you have a scene which is ONLY kissing, this is not a problem. However, supposed you'd create a scene with more than that, this has to be taken into account. The first way I would try to approach this would be to create a CollisionTrigger close to the mouth of Person B and use that as the filter in the LipTrigger of Person A. Another way to do it, which in my opinion is the best one, is use the plugin Sensor to replace the triggers in LipTrigger solely based on distance and not collision. Then a sound will be played as long as the lips are close enough (which can be customized).

Hope it helps.
Many thanks! Don't have time right now to test, but soon i'll check this out.
 
Upvote 0
Ok, here's what I managed to achieve:
A sound plays on contact of the two persons.
The sound is the same each time and is played once.

Did not understand your step of configuring "enabling the pluging" in the "Start Action" trigger.
In the LipTrigger, I got that:
1781379988957.png

Didn't see any options to randomize the sound played, and again, it's played once, even though in the audiomate plugin it's set to Shuffle.
If in the Receiver Target I set PlayLoop, the same sound is played multiple times (way too fast though since the sound files only have the kiss sound and no "wait time" 😅)

And for information, yes the scene will only be kissing so no need for the Sensor plugin.
 
Upvote 0
One thing that's happening is that you're configuring the trigger the wrong way. Instead of going to the HeadAudioSource and selecting an audio sample directly (like your screenshot), instead your "Receiver" should be the audiomate plugin to access your playlist. In the "Receiver Atom" you need to select where your audiomate plugin is located, it can be in scene plugins (which can be found as "Core Control"), or if you happened to place it in an Atom of your scene, select that. Then in "Receiver" you select the plugin itself, and as "Receiver Target" an option will appear for you to "PlayRandomClipFrom..."
 
Upvote 0
Did not understand your step of configuring "enabling the pluging" in the "Start Action" trigger.
So what happens is that you'll want to enable the playlist upon touch, and then disable it when the collision stops. In lipTrigger, you'll need these two actions:
Go to the LipTrigger and configure a "Start Action" trigger that both enables the playlist and plays a random sound from it, like so:
1781054222397.png

One action is to play the random sound files (like I described in the previous comment), and the second is what will enable the playlist itself (which once again needs the "Receiver Atom" to be where the plugin is, and "Receiver", the plugin itself), i.e., the second action in the screenshot.
As an End Action, you need only one action, which is to disable the playlist:
As an "End Action" trigger, disable the playlist:
1781054256816.png
 
Last edited:
Upvote 0
way too fast though since the sound files only have the kiss sound and no "wait time" 😅)
I believe you can configure a "down" time between audio samples in audiomate too! Go to the playlist settings (where you also enabled loop and shuffle) and there should be an option like that, if I'm not mistaken. Another thing you can do is to use a randomizer to play with the interval value between audio samples.
For example, supposed you'd want a 1 second delay between audio samples, but you want that to be slightly randomized to increase the realism of the kiss. What I would do is to use this plugin to control how much it can vary around the 1 second mark:
 
Upvote 0
Ok, I think I figured it out! Everything seems to be working, although sometimes it doesn't register so i need to toggle on and off the playlist settings. Many thanks!
I believe you can configure a "down" time between audio samples in audiomate too! Go to the playlist settings (where you also enabled loop and shuffle) and there should be an option like that, if I'm not mistaken.
Unfortunately it doesn't seem like there is an option for that in audiomate.
I checked the plugin you sent, but are you sure it is possible? Here's the only options I can select. Tried all of them but nothing changed.
1781532222232.png
 
Upvote 0
Back
Top Bottom