Salsa Blend shape sequencing

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Salsa Blend shape sequencing

Post by nathanj »

Hi Tony,

With the Salsa integration, is it possible to have more than 1 blend shape expression per conversation node? I'm trying to sequence an NPC's monologue and would love to be able to blend from one expression to another but I haven't figured out how to achieve this yet.

Hopefully Salsa soon adapts to Timeline but I was pleasantly surprised how much DS can carry.

Nathan
User avatar
Tony Li
Posts: 22061
Joined: Thu Jul 18, 2013 1:27 pm

Re: Salsa Blend shape sequencing

Post by Tony Li »

Hi Nathan,

You can use the "@time" syntax in the Sequence field. Here's an example:

Code: Select all

SALSA(entrytag);
Eyes(Player/Head, speaker, smile);
Eyes(Player/Head, speaker, frown)@2;
Eyes(Player/Head, speaker, smile)@4
At time 00:00, the character will start playing a line using SALSA, and it will blend into the "smile" blend shape.

At time 00:02 (two seconds later), it will blend into the "frown" blend shape.

At time 00:04 (two seconds after that), it will blend back into the "smile" blend shape.

Text-based sequences aren't as point-and-click as Timeline, but you can enter them quickly without breaking your writing flow, and they also carry across nicely if you're importing and exporting your dialogue database, for example to Excel (CSV) or Chat Mapper.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: Salsa Blend shape sequencing

Post by nathanj »

Awesome. Thanks for the reminder of how the Sequencer works :roll:

This is so great because I was unable to change blend shapes from Timeline in a way that was satisfactory. Using DS in Timeline is kind of a Trojan Horse that gives the Timeline so much more functionality. Thanks again for being such an early adaptor to the system.

Nathan
User avatar
Tony Li
Posts: 22061
Joined: Thu Jul 18, 2013 1:27 pm

Re: Salsa Blend shape sequencing

Post by Tony Li »

Glad to help!

If any ideas for improvement come to you, please let me know.

Two user-suggested features are already on the roadmap for a future version of the Dialogue System:

1. Making the Start Conversation playable "play" at design time to get an idea of the timing, and

2. Improved handling of the Bark playable when scrubbing back and forth.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: Salsa Blend shape sequencing

Post by nathanj »

Hi Tony,

I thought about something that would be useful for Timeline.

Would it be possible to have a "Look at" plugin that directs where the speaking NPC looks at specific points of a conversation? It would essentially be a clip that have a game object slot that could be connected, then at that point in the sequence the NPC would look at that object.

I see that you can do this through the Sequencer command but I'm a little confused with how to do this. In one example you have "LookAt(Car, Bill, 2)", but how do you designate "Car", is it considered an Actor? If so is it the Conversation Trigger that is linked to a specific conversation that allows the dialogue manager to know which transform position to grab?

Nathan
User avatar
Tony Li
Posts: 22061
Joined: Thu Jul 18, 2013 1:27 pm

Re: Salsa Blend shape sequencing

Post by Tony Li »

Hi Nathan,

Code: Select all

LookAt(Car,Bill,2)
Finds the GameObjects named "Car'" and "Bill". Car can be an empty GameObject. It can even be an inactive GameObject as long as it's a child in a hierarchy whose topmost parent is active.

Then it rotates Bill's transform to face Car over 2 seconds.

When you're in a conversation, you can also use the special keywords "speaker" and "listener" to refer to the GameObjects of the conversation participants. This way you don't have to specify exact GameObject names.

If you don't specify the second parameter ("Bill" above), it defaults to the current speaker.

The same is true for the SALSA integration's Eyes() sequencer command. For example:

Code: Select all

Eyes(Moon);
Eyes(Date/Head)@2
Tells the speaker's RandomEyes component to aim the eyes at the GameObject named "Moon", and then after 2 seconds to aim the eyes at "Head" child of the GameObject named "Date".

This only aims the eyes, though, since that's what RandomEyes does. You'll probably want to use animator IK to make the character's Animator rotate the head, and possibly even the upper body, toward the target.

I'll give some thought to this. Now that you've brought it up, it would be useful in the Dialogue System to have a convenient way to specify where a character's head and upper body should be pointing at various points during the delivery of dialogue. If you have any workflow suggestions, please let me know.
User avatar
nathanj
Posts: 303
Joined: Sat May 28, 2016 12:30 am

Re: Salsa Blend shape sequencing

Post by nathanj »

Hey Tony,

Thanks again for such a great response.

I've never used IK before. Always meant to but just haven't gotten around to it. Pleasantly surprised how easy it was to get the basic control of the NPCs head to look at the main camera.

In case anyone come across this and is interested I based my code off of the example here: https://docs.unity3d.com/Manual/InverseKinematics.html

I'll think about workflow suggestions but at the moment this basic set up was pretty easy. Now I can control eye movement, head movement, animations AND blend shapes with DS, Salsa and Timeline. This is so awesome!

Nathan
Post Reply