• 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
44
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
Back
Top Bottom