PC Portrait blinking

Announcements, support questions, and discussion for the Dialogue System.
Maltakreuz
Posts: 40
Joined: Sat Jul 25, 2015 2:36 pm

PC Portrait blinking

Post by Maltakreuz »

I like to show PC avatar while talking to NPC, it makes dialogue feel more like dialogue, not monologue. Unfortunately the PC portraits will be shown for too little time and "blinks".

The obvious solution to set ´Min Subtitle Seconds´ for 1-2sec works, but results that PC answers feels too slow. Player need wait each time after response already done. So default 0.2f is absolutly fine for me. But it results PC Portraits "blinks" for 2 seconds too. Can i somehow show PC Portrait for a longer time, without making all responses wait too long? I want somehow both at same time. My Subtitle settings are:

Image
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: PC Portrait blinking

Post by Tony Li »

What if you set the PC subtitle panel's Visibility to Always Once Shown or Always From Start?
Maltakreuz
Posts: 40
Joined: Sat Jul 25, 2015 2:36 pm

Re: PC Portrait blinking

Post by Maltakreuz »

Tony Li wrote: Wed Dec 09, 2020 12:59 pm What if you set the PC subtitle panel's Visibility to Always Once Shown or Always From Start?
I am using wrpg/runic GUI, so there is only one subtitle panel, changing Visibility does not really affects something. I could self implement portrait "drag" to show PC portrait for some extra amount of time. Just wanted to ask first, may be this can be done with one checkbox or like that. But probably not.

Do others have some problems with PC blinking in runic/wrpg gui? I doubt i am only one who is affacted.
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: PC Portrait blinking

Post by Tony Li »

Hi,

Where does the player's portrait appear? Does it replace the NPC's portrait? Can you provide some screenshots please?
Maltakreuz
Posts: 40
Joined: Sat Jul 25, 2015 2:36 pm

Re: PC Portrait blinking

Post by Maltakreuz »

Tony Li wrote: Wed Dec 09, 2020 1:28 pm Hi,

Where does the player's portrait appear? Does it replace the NPC's portrait? Can you provide some screenshots please?
Yes, i have only 1 Portrait place. Two portrait places btw could be a solution too.

Image
Last edited by Maltakreuz on Wed Dec 09, 2020 1:49 pm, edited 1 time in total.
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: PC Portrait blinking

Post by Tony Li »

Nice-looking UI!

Here are some suggestions to try:

1. Remove the animator from the PC Subtitle Panel and/or Response Menu Panel. (It depends on how you've set up the UI.) This will allow it to appear instantly instead of fading in/out and causing the blink.

2. Or shorten the fade animation so it takes less than 0.2 seconds.

3. Or change the animator's transitions so they occur immediately instead of waiting for the fade in/out to complete. This will help, but it won't get rid of the blink entirely.

4. Or make a subclass of StandardUISubtitlePanel and/or StandardUIMenuPanel and override the Open() and Close() method to handle opening and closing differently.
Maltakreuz
Posts: 40
Joined: Sat Jul 25, 2015 2:36 pm

Re: PC Portrait blinking

Post by Maltakreuz »

I've screencaptured some video how does it look. It is not that bad at all, but i wish PC portrait could somehow last a little bit longer without making the whole GUI slower (in terms of response-delay, not performance of course).

Maltakreuz
Posts: 40
Joined: Sat Jul 25, 2015 2:36 pm

Re: PC Portrait blinking

Post by Maltakreuz »

Tony Li wrote: Wed Dec 09, 2020 1:38 pm Nice-looking UI!
Thank you! :D

Tony Li wrote: Wed Dec 09, 2020 1:38 pm 1. Remove the animator from the PC Subtitle Panel and/or Response Menu Panel. (It depends on how you've set up the UI.) This will allow it to appear instantly instead of fading in/out and causing the blink.

2. Or shorten the fade animation so it takes less than 0.2 seconds.

3. Or change the animator's transitions so they occur immediately instead of waiting for the fade in/out to complete. This will help, but it won't get rid of the blink entirely.
Oh, i did not even realized i have one attached, but it is disabled. If activeted no dialogue will be shown at all. So i suppose it is already instantly without fade time. (it just never goes from start state)

Image

Tony Li wrote: Wed Dec 09, 2020 1:38 pm 4. Or make a subclass of StandardUISubtitlePanel and/or StandardUIMenuPanel and override the Open() and Close() method to handle opening and closing differently.
I did not mean blinking by showing entire dialogue gui, but on switching PC/NPC Portraits and Name the PC will be shown too quick to be noticed by player. This can be observed in video post above.
User avatar
Tony Li
Posts: 22050
Joined: Thu Jul 18, 2013 1:27 pm

Re: PC Portrait blinking

Post by Tony Li »

Oh, I understand what you mean now. The panels are designed to show their portraits only as long as the panel is visible. You might prefer to not show the PC's portrait at all. (Unassign it from the response menu panel.)

If you want to show it for longer than the panel is visible, you'll need to do a little scripting. Just thinking off the top of my head, you could:

1. Write a little script that manages the portrait image, with a method that queues up the display of a portrait sprite. It should always allow a minimum amount of time (e.g., 1 second) to show the current sprite before changing to the next sprite in the queue. Rough pseudocode:

Code: Select all

public class PortraitManager : MonoBehaviour
{
    public void ShowPortrait(Sprite portraitSprite)
    {
        queue.Enqueue(portraitSprite);
    }

    void Update()
    {
        if (CurrentSpriteHasShownLongEnough() && !queue.Empty())
        {
            ShowNextQueuedSpriteAndResetTimer();
        }
    }
}
2. Unassign the portrait image from the subtitle panel and menu panel. Write subclasses that override StandardUISubtitlePanel.ShowSubtitle and StandardUIMenuPanel.ShowResponses. Rough example:

Code: Select all

public class MySubtitlePanel : StandardUISubtitlePanel
{
    public override void ShowSubtitle(Subtitle subtitle)
    {
        base.ShowSubtitle(subtitle); // Since portrait image is unassigned, base method won't show it.
        portraitManager.ShowPortrait(subtitle.speakerInfo.portrait); // Queue up portrait image to be shown.
    }
}
Maltakreuz
Posts: 40
Joined: Sat Jul 25, 2015 2:36 pm

Re: PC Portrait blinking

Post by Maltakreuz »

Tony Li wrote: Wed Dec 09, 2020 2:03 pm
Yes, thank you! Queue them should work. Just wanted to ask first, if no appropriate checkbox somewhere to avoid boilerplate-code.

Well never show PC portrait is solution too. But i personally find 2 portraits make things a little bit more vivid. But "blinking" with avatar and speaker-name distracts and annys player.

I will play some rpg games to see how they avoid same problem, but queueing should work fine and is straightforward to implement.

Thank you.
Post Reply