Author Topic: TTS talking head - use of PNGs instead on JPGs  (Read 8973 times)

0 Members and 1 Guest are viewing this topic.

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
TTS talking head - use of PNGs instead on JPGs
« on: June 18, 2015, 03:07:37 PM »
Hi all!
I've tried using png files instead of jpg file so I could try to get transparency while using a custom talking head.
Unfortunatelly it did not work.
Is this possible?

It would open more possibilities for a nice interface.

Also, is it possible to make the talking head to cover 100% of the screen instead of specifying fixed pixel size?

Thanks!

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #1 on: June 18, 2015, 03:16:41 PM »
And if animated and transparent gif files could be allowed, than there are much more possibilities....

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #2 on: June 18, 2015, 03:31:40 PM »
No it's not possible. Even if I made it possible to use transparent images that would only allow you to see through to the background colour of the window containing the images.

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #3 on: June 18, 2015, 04:16:53 PM »
No it's not possible. Even if I made it possible to use transparent images that would only allow you to see through to the background colour of the window containing the images.
It seems enough. I'm planning the coolest thing. Instead of a talking head, I'll have an animated blinking "circle" a la Jarvis style.
This circle would be placed in the center of the screen,over the desktop wallpaper. The wallpaper has the remaining art, making the screen to look like a real Jarvis. Once the computer talks to me, the animated circle would kind of blink (using the custom visemes) just over the desktop wallpaper, making it look like the desktop is animated.
The geometry of the light coming from the circle would mimic the movement of the mouth for the same phonetic sound.
It would be nice to have this animated circle over all the windows with some good transparency that allows for clearly seeing what is behind it. To make it perfect, I would have a command to hide it when I want.

Animated gifs are better because I can make a smoth transition from one image to another, making each image kind of smoothly glowing.


What do you think?


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #4 on: June 18, 2015, 04:21:56 PM »
As I said, it is not possible.  Maybe I misunderstood your last post, but I think it is more likely that you misunderstood mine.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #5 on: June 18, 2015, 04:23:09 PM »
to be clear the background colour of the window will be grey, it is not the colour BEHIND the window it is the colour of the blank form which belongs to VoxCommando, on which the image is placed.

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #6 on: June 18, 2015, 05:06:42 PM »
to be clear the background colour of the window will be grey, it is not the colour BEHIND the window it is the colour of the blank form which belongs to VoxCommando, on which the image is placed.
Ok, got it. That's fine then.
I was researching about it and expecting you could make not only the image transparent, but the form itself. I thought it would be something easy for you to implement, kind of something like this:
http://www.c-sharpcorner.com/UploadFile/scottlysle/XparentFormsCS10282007212944PM/XparentFormsCS.aspx

This is kind of a feature that is just cool, but don't add any functionality at all. But either way, do you see any chance of implementing it somewhere in the future? I understand that being something visual only, it must be in the bottom of your priorities, but it would be so cool...
« Last Edit: June 18, 2015, 05:47:12 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #7 on: June 18, 2015, 05:57:09 PM »
I have tried this method for a few different things and never found it worth doing.

I can set a transparency colour key but this results in a very messy looking image.  There is only one exact colour that will be transparent with no blending.  This means every pixel must be either 100% transparent or 100% opaque.  The result is an "aliased" (scratchy step-ladder) edge that looks terrible.  Although it can be done pretty easily, I'm not really sure if it is worth it.

To create true transparency with aliasing according to an opacity layer like that in png or gif with transparency requires much more hacking, and it is not something that I would be interested in spending a lot of time on.

Even just using the transparency key (single colour is set as transparent) seems to intorduce a lot of lag in the image redrawing.  While this might look OK with your abstract images in mind I don't think it would look very nice with actual lip sync.

If you would like I can send you a sample TTS dll with a specific background colour set as transparent.  Just let me know what colour I should use.  Black, white, lime green.?  It must be a colour that you do not intend to use in your animation images.  For now I think we should stick with jpgs since actual transparency is of no use to use when using a transparent colour key.  Jpegs make the edge look even worse because of compression so you should make sure to use very little compression when saving your jpg files.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #8 on: June 18, 2015, 06:02:46 PM »
You can always try to do with with Guile3D instead, but I'm not sure if it is possible with the "cheap" version.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #9 on: June 18, 2015, 06:08:09 PM »
Here is a video with Guile3D and VoxCommado - there are a lot of other avatar available, but the software is not cheap  :o





and here the link to the tutorial for using it with VoxCommando: http://voxcommando.com/forum/index.php?topic=1650.msg14800#msg14800
***********  get excited and make things  **********

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #10 on: June 18, 2015, 06:57:14 PM »
Regarding the dll, I would like to try it if you don't mind.
As I understand, the same bg color that I want to be transparent on my images should be set as the transparent bg of the form, right? If so, then black should be transparent.

Thanks for the support.

As a very humble suggestion, and obviously only if it can be done, I think you guys should think about implementing some visual feedback like that. I mean, Jarvis has a very strong appeal.I understand that it basically adds nothing to the core functionality of the software,  but it's that cool thing that a software can have or not.

I'll take a look at Guile3D as soon as I arrive home. Thanks for the suggestion.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #11 on: June 18, 2015, 07:17:14 PM »
OK.

You can also try something like this which is even cooler I think:

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #12 on: June 18, 2015, 07:26:32 PM »
Just wanted to make it clear that I love VC with the transparency or not. It's cool either way.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #13 on: June 18, 2015, 09:11:43 PM »
Here is the TTS plugin with a black transparency key.  Anything in your image that is completely black (RGB = 0,0,0) should be transparent and show whatever is beneath the window.

Make sure to completely close VC then replace the dll and make sure that windows is not blocking it by right-clicking the dll and checking properties.

Good luck

[NB: dll attached to post deleted. These features are now a standard part of the TTS plugin in VC.]
« Last Edit: September 19, 2016, 12:56:59 PM by nime5ter »

marcusvdt

  • Sr. Member
  • ****
  • Posts: 152
  • Karma: 6
  • Researching
    • View Profile
Re: TTS talking head - use of PNGs instead on JPGs
« Reply #14 on: June 18, 2015, 11:59:58 PM »
Here is the TTS plugin with a black transparency key.  Anything in your image that is completely black (RGB = 0,0,0) should be transparent and show whatever is beneath the window.

Make sure to completely close VC then replace the dll and make sure that windows is not blocking it by right-clicking the dll and checking properties.

Good luck

Thanks!
I've tried with 2.1.4.2 (currently working version for my Py MySensors Controller) and it did not recognize the plugin. Tried after that with 2.1.4.5 and then 2.1.4.8 with the same result.

Interestingly, both 2.1.4.5 and 2.1.4.8 gave me weird errors with my Py MySensors Controller. Will get back to it tomorrow...

Of course, I have made a backup and got back to 2.1.4.2 and original TTS.dll for now...
« Last Edit: June 19, 2015, 12:04:36 AM by marcusvdt »