Auto Flash

Plugins Auto Flash

Hey Slimy! I really like the idea, but I have some concernes about the usability.

Did you know that you can create Unity AudioSources (not Atoms) anywhere in the scene and parent them to anything you want, e.g. the player rig? I find it kinda weird that the sound has to come from near the girl, because the source atom also acts as the target.

I'd let the user choose the flash target and the sound source from 2 separate atom lists. You simply had to create a GameObject with an AudioSource and reparent it to the atom that is choosen. This way the user could also choose the player rig to act as the audio source, or, if he chooses the girl, her head audio wouldn't be overriden.

Get back to me if you like my idea and need help :)


Hello.You're right.
I haven't been doing well for six months.
I don't understand "AudioSourceControl".

GameObject myAudioSource = new GameObject("AudioSource");

There were many examples where the AudioSource created in this way was used as an AudioSourceControl as shown below.
Since it is not ”containing”, I do not know how to describe it.

myAudioSourceControl = containingAtom.GetStorableByID("AudioSource") as AudioSourceControl;
 
Hello.You're right.
I haven't been doing well for six months.
I don't understand "AudioSourceControl".

GameObject myAudioSource = new GameObject("AudioSource");

There were many examples where the AudioSource created in this way was used as an AudioSourceControl as shown below.
Since it is not ”containing”, I do not know how to describe it.

myAudioSourceControl = containingAtom.GetStorableByID("AudioSource") as AudioSourceControl;
No, you create an arbitrary new GameObject and add an AudioSource to it:

GameObject go = new GameObject();
AudioSource as = go.AddComponent<AudioSource>();

Then you can target it exactly like the one you would get from the last line you posted. You may have to adjust some settings like spatialize etc. to behave like vanilla vam AudioSources.

Now you can parent the new gameobject to anything you want. Like

go.transform.SetParent(containingAtom.transform, false);

But make sure to delete the created GameObject on Destroy. Else it lingers around until you restart vam.

private void OnDestroy()
{
Destroy(go);
}

In BodyLanguage every single body region got it's own AudioSource GameObject that gets translated to whereever the slap was hitting. These produce the slap sounds.
 
No, you create an arbitrary new GameObject and add an AudioSource to it:

GameObject go = new GameObject();
AudioSource as = go.AddComponent<AudioSource>();

Then you can target it exactly like the one you would get from the last line you posted. You may have to adjust some settings like spatialize etc. to behave like vanilla vam AudioSources.

Now you can parent the new gameobject to anything you want. Like

go.transform.SetParent(containingAtom.transform, false);

But make sure to delete the created GameObject on Destroy. Else it lingers around until you restart vam.

private void OnDestroy()
{
Destroy(go);
}

In BodyLanguage every single body region got it's own AudioSource GameObject that gets translated to whereever the slap was hitting. These produce the slap sounds.
This is exactly what I was worried about 6 months ago.

myAudioSourceControl.PlayNowClearQueue(clip);
this will be played

myAudioSource.PlayNowClearQueue(clip);
this is no good

I don't understand why "AudioSourceControl" requires a conversion from AudioSource.
 
This is exactly what I was worried about 6 months ago.

myAudioSourceControl.PlayNowClearQueue(clip);
this will be played

myAudioSource.PlayNowClearQueue(clip);
this is no good

I don't understand why "AudioSourceControl" requires a conversion from AudioSource.
AudioSourceControl is a VaM thing. It's a JSONStorable. Whereas AudioSource is a native Unity component. Use

myAudioSource.volume = volume;
myAudioSource.clip = clip;
myAudioSource.Play()

or

myAudioSource.PlayOneShot(clip, volume)

The latter won't interrupt clips already played through this audioSource. They will be overlayed. The first cancels the current clip.

If you're always playing the same clip with the same volume you don't have to repeat things. Just set up the clip and volume once, then call myAudioSource.Play() with each flash. I'd recommend that.
 
Last edited:
AudioSourceControl is a VaM thing. It's a JSONStorable. Whereas AudioSource is a native Unity component. Use

myAudioSource.volume = volume;
myAudioSource.clip = clip;
myAudioSource.Play()

or

myAudioSource.PlayOneShot(clip, volume)

The latter won't interrupt clips already played through this audioSource. They will be overlayed. The first cancels the current clip.

If you're always playing the same clip with the same volume you don't have to repeat things. Just set up the clip and volume once, then call myAudioSource.Play() with each flash. I'd recommend that.
Would it be better to give up on converting to AudioSourceControl and play AudioSource directly?
It seems like a lot of modifications are needed.
First, the format of the clip seems to be different.
"NamedAudioClip" is not enough.

It seems that I need to use different methods depending on whether Im using Atom's AudioSource or using an AudioSource component generated from a script.
That's difficult for a beginner like me.
I would like to study Cheesy's slap script carefully.
 
Last edited:
Would it be better to give up on converting to AudioSourceControl and play AudioSource directly?
It seems like a lot of modifications are needed.
First, the format of the clip seems to be different.
"NamedAudioClip" is not enough.

It seems that I need to use different methods depending on whether Im using Atom's AudioSource or using an AudioSource component generated from a script.
That's difficult for a beginner like me.
I would like to study Cheesy's slap script carefully.
You don't need NamedAudioClips. These are VaM things. You only need them when you want your sound file to appear in the scene audio browser, which I really wouldn't recommend in your case. A plugin shouldn't clutter the scene audio. I'd create an assetbundle and load the sounds through this, but this is a little complicated if you've never done it.

Anyway, if you already have your NamedAudioClip namedClip you can get its Clip with
Clip clip = namedClip.sourceClip

Then do what I described above.
 
Don't get me wrong. I don't want to steal your idea, but...

I'd really like to implement the flash feature into FocuOnMe, now that we talk about it.

I think this would be a perfect fit, and the logic is already there.
I'd emit the sound from the player, maybe with some offset to the side. The flash target would be produced by one or two additional lights, also parented to the player. The flash target would be automatically set to the current point of interest on the model. My plugin already tracks that. It's basically the same as with the other lights I use. They're also focused on where you're looking at. The user wouldn't have to set up anything (Atoms etc.). He just had to enable the feature through the UI or via shortcut.

It would be, as if you were the photographer :)

What do you think? Should we collaborate on this?
 
You don't need NamedAudioClips. These are VaM things. You only need them when you want your sound file to appear in the scene audio browser, which I really wouldn't recommend in your case. A plugin shouldn't clutter the scene audio. I'd create an assetbundle and load the sounds through this, but this is a little complicated if you've never done it.

Anyway, if you already have your NamedAudioClip namedClip you can get its Clip with
Clip clip = namedClip.sourceClip

Then do what I described above.
Huh, can type conversion be done that easily?
Then it's worth a try!
I really don't understand VaM's Atom specifications and Unity specifications.
It may take quite a while, but thank you for letting me know. Mr.Cheecy is a talented porn director.
 
Don't get me wrong. I don't want to steal your idea, but...

I'd really like to implement the flash feature into FocuOnMe, now that we talk about it.

I think this would be a perfect fit, and the logic is already there.
I'd emit the sound from the player, maybe with some offset to the side. The flash target would be produced by one or two additional lights, also parented to the player. The flash target would be automatically set to the current point of interest on the model. My plugin already tracks that. It's basically the same as with the other lights I use. They're also focused on where you're looking at. The user wouldn't have to set up anything (Atoms etc.). He just had to enable the feature through the UI or via shortcut.

It would be, as if you were the photographer :)

What do you think? Should we collaborate on this?
I just created what I needed for the production of my work.
Also, since this is the first plug-in I created, it was also for practice.
If there's something better, I'll use it.
In other words, if Mr. Cheecy makes it, everyone will be very helpful.
I am looking forward to it.😁
 
Clip clip = namedClip.sourceClip 
This conversion method,
Unfortunately it didn't work.
This is due to my lack of knowledge, but I would like to give up and switch to another method.
Operating Unity is difficult for beginners because it is behind the sandbox. I can't see any errors.o_O
 
Clip clip = namedClip.sourceClip 
This conversion method,
Unfortunately it didn't work.
This is due to my lack of knowledge, but I would like to give up and switch to another method.
Operating Unity is difficult for beginners because it is behind the sandbox. I can't see any errors.o_O
Hmm weird. It should work. This isn't exactly a cenversion. NamedAudioClip is basically a Clip with additional properties, like a name and a UI representation. The actual clip is stored in the field .sourceClip.
 
slimy updated Auto Flash with a new update entry:

Ver4.0 Small feature additions.

When applying the plug-in to a person, I encountered an issue where it would interfere with moans and breathing due to the use of HeadAudio.
CheecyFX, who we all know very well, gave us some advice and solved this problem.
In this version 4, when you apply a plug-in to Person or Atom, a temporary AudioSource is automatically created.
Also, since the sound is emitted from the position of Flash, you can also expect 3D sound effects.

Read the rest of this update entry...
 
Hello, how you obtain the effect that pearls on panties are not misshapen ? they seem as pearl should be. but as i use that pantypearl shapes are distracted.
 
Hello, how you obtain the effect that pearls on panties are not misshapen ? they seem as pearl should be. but as i use that pantypearl shapes are distracted.
Hello.
There are different ways to deal with it depending on your situation.
However, the important thing about the technique I used is that the pearl and the cloth are different resources.
There is no setting that satisfies the physics at the same time. :rolleyes:
I adjust them individually and erase unnecessary materials with Alpha. 😁
 
Hello.
There are different ways to deal with it depending on your situation.
However, the important thing about the technique I used is that the pearl and the cloth are different resources.
There is no setting that satisfies the physics at the same time. :rolleyes:
I adjust them individually and erase unnecessary materials with Alpha. 😁
Effect is cool. hope you will share someday that pearls and how to use them :)
 
Back
Top Bottom