Salsa Emote timing and blend shape amount

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Digital Adam
Posts: 7
Joined: Fri Nov 01, 2024 2:56 pm

Salsa Emote timing and blend shape amount

Post by Digital Adam »

Hey, so I'm able to get SALSA with Emote working within my Conversation. Thanks for making it so easy. Is it possible to set the amount of the Blend Shape and well as when it plays (before or after the audio)?

I read your docs, but I'm a bit confused on how to use the code:
https://www.pixelcrushers.com/dialogue_ ... salsa.html

I have a simple Conversation setup. The first node is the NPC introduction with a smile. here is what I'm using in the Sequence:
SALSA(Hi I'm your NPC); Emote(Happy);

This next line is my choices, then the NPC response with this Sequence:
SALSA(How many I serve); Emote(Wink);

The first part of the conversation I'd like to have the audio play, and then have the Happy Emote at 50 (out of 100 for the blend shape).

The second I'd like to end Happy, play the audio, and then throw a wink that lasts 1 second.

How do I code that? I'm not sure if I need to include the brackets []'s, or just separate everything by a comma within the ().

Thanks.
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: Salsa Emote timing and blend shape amount

Post by Tony Li »

Hi,

Brackets -- as in SALSA(clip, [subject], [nowait]) -- indicate optional parameters. So you could use any of these forms:

SALSA(clip)
SALSA(clip, subject)
SALSA(clip, , nowait)
SALSA(clip, subject, nowait)

(Notice that in the next-to-last one, I left the second parameter blank instead of specifying a subject.)


The Emote() sequencer command just plays the emote at 100%. If you want to play it at 50%, two ideas are:

1. Make a new emote that does the blendshape at 50% (e.g., smallWink) and pass that to the Emote() command.

2. Or customize the SequencerCommandEmote.cs script to accept a fourth parameter for the percent to use.
Digital Adam
Posts: 7
Joined: Fri Nov 01, 2024 2:56 pm

Re: Salsa Emote timing and blend shape amount

Post by Digital Adam »

Thanks for the response. So I played around with your suggestions. Is it possible to pause the emote until later? For example, I'd like the emote to play after the SALSA lip sync audio. Right now the Emote 'Smile' plays with the lip sync, so it's a "smiling talk". This is what I'm currently using:
SALSA(audio_here); Emote(Happy, , oneway, 1);
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: Salsa Emote timing and blend shape amount

Post by Tony Li »

Hi,

Yes; sorry, I forgot to answer that part. Each sequencer command will attempt to run (in parallel) as soon as the dialogue entry starts -- unless you provide timing information. For example, the sequence below will start the audio lipsync immediately but will start the emote at the 2-second mark:

Code: Select all

SALSA(audio_here); 
Emote(Happy, , oneway, 1)@2
You can also use sequencer messages for timing. The sequence below will wait for SALSA to finish playing the audio, and then it will emote:

Code: Select all

SALSA(audio_here)->Message(Spoke); 
Emote(Happy, , oneway, 1)@Message(Spoke)
Digital Adam
Posts: 7
Joined: Fri Nov 01, 2024 2:56 pm

Re: Salsa Emote timing and blend shape amount

Post by Digital Adam »

Perfect, thanks!
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: Salsa Emote timing and blend shape amount

Post by Tony Li »

Glad to help!
Post Reply