Lipsync Lady

  • 15 Replies
  • 3377 Views
*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6856
  • Mostly Harmless
Lipsync Lady
« on: July 22, 2011, 11:38:06 pm »
For the past few weeks I have been playing with 3D engines for a change. Quite challenging I found and hard to get things to work with each other.

This was done in Microsoft XNA Game Studio.  I used some mesh morphing code (thanks to a clever chap called Barnaby Smith) to do the visemes/mouth shapes.  More details to follow if anyone is interested.  Quite late here now...



Cuts off a bit quick at the end  ;D
« Last Edit: July 23, 2011, 01:57:29 pm by Freddy »

*

infurl

  • Administrator
  • ***********
  • Eve
  • *
  • 1365
  • Humans will disappoint you.
    • Home Page
Re: Lipsync Lady
« Reply #1 on: July 23, 2011, 12:17:51 am »
That's actually pretty impressive. How easy or difficult would it be to do the "in-betweening" for transitions from one mouth shape to the next? I was looking at Blender a little back and it looked like it had the capability to do it automatically, but still, it would have to be an awful lot of work for sure.

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Trusty Member
  • **********************
  • Colossus
  • *
  • 5865
Re: Lipsync Lady
« Reply #2 on: July 23, 2011, 12:25:10 am »
Pretty nice Freddy. I'd actually never heard that last verse before.


Anyhow when are you going to try iClone?
« Last Edit: July 23, 2011, 01:11:15 pm by Art »
In the world of AI, it's the thought that counts!

*

Bragi

  • Trusty Member
  • ********
  • Replicant
  • *
  • 564
    • Neural network design blog
Re: Lipsync Lady
« Reply #3 on: July 23, 2011, 07:48:26 am »
very cool indeed Freddy. I havn't played with the game studio before. Is it a lot different from VS? Is it easier to make this type of anim?

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6856
  • Mostly Harmless
Re: Lipsync Lady
« Reply #4 on: July 23, 2011, 12:34:57 pm »
@infurl, yes doing the 'tweening' is something I would still like to do. In this experiment the mouth shapes (visemes) are generated in real time, so as the words are spoken it fires off a viseme trigger and from that I call the appropriate mouth shape.  I think to do tweening I would have to generate the timing events prior to the actual speech some how.  Then you could use the time between the visemes to do the tweening, although that time will be quite short it might improve things.  I'm not sure if it can even be done at the moment.

I'm thinking of using Blender to do a head of my own, this one a friend made for me in FaceGen, which also allows you to export expressions and the visemes (although it doesn't have a full set of visemes - less than the MS Speech SAPI is capable of recognising).  Good to get started with though. I had to reuse some visemes for the ones that were missing, so that could be better too.

I think whatever you do it is a lot of work one way or another.  It's taken me at least three weeks to get to this point. I've been through lots of 3D engines and very few have been suitable for some reason or another. I have a couple that might be promising though, but things are very quiet on those sites so only time will tell.

@Art, I found the lines online and confess had never heard the second half since my Nan had told me it when I very young. It brought back a nice memory.  I might give iClone a look.  I really want something that I can hook into with code though.  Like some of the engines I have experimented with offer .NET support, but are lacking in other areas.  I have plenty to play with already !

@Bragi, the Game Studio simply plugs in to whatever VS package you are using (although it appears to be limited to C#). Just like you would create a 'Windows Forms Application' you can create a 'Windows Game'.  From there you can interact with the game like you would a reference, DLL, COMponent and so on.  At least that's the way it looks from my minimal experience so far. Oh and it's free.

I'm obviously still learning C# but have found my way around.  Learning XNA is a thing in itself. I had difficulty with things like Alpha blending and rendering order, but there is some great support in the MSDN forums which helped me get on track.  Actually the most troublesome part was simply getting the head model to display correctly, mainly the hair... Adding in the viseme's and speech was a lot simpler as I knew that from VB so I just had to translate what I was doing.

The code for the morph targets as I mentioned above was written by Barnaby Smith and I just adapted it to my own purpose. The following video is his demonstration and it shows smooth morphing between expressions.  Here's his sample code if you are interested in playing with it...

Note that this is done in XNA 3.1 which is not the most recent (4.0).  So I did all this in VS C# 2008.  I'm going to try and upgrade it at some point I think.

I would say it is a little trickier to get this kind of animation going than it was the 2D ones we have been playing with !  Once you crack a few things though it makes a lot of sense.  Of course with the 3D animation you will probably end up having to do things in a 3D modelling program to really polish things up.



« Last Edit: July 23, 2011, 01:14:09 pm by Freddy »

*

Bragi

  • Trusty Member
  • ********
  • Replicant
  • *
  • 564
    • Neural network design blog
Re: Lipsync Lady
« Reply #5 on: July 23, 2011, 01:08:28 pm »
I took a little closer look at xna. It seems that it currently doesn't integrate nicely with wpf (unlike ogre), which is a bummer.
Does it also load things exported from daz (read: other then the blender format, like 'obj)?

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6856
  • Mostly Harmless
Re: Lipsync Lady
« Reply #6 on: July 23, 2011, 01:23:43 pm »
Ah, well you have me there as I know nothing of wpf.

The models I have been using are .x (DirectX) and .fbx

Here's a run down of supported formats : http://msdn.microsoft.com/en-us/library/bb447762.aspx

But that doesn't really limit you because I have been converting from .obj to .fbx via blender and it works perfectly. (FaceGen exports .obj).

In theory you should therefore be able to export to .obj from within Daz, and then from Blender to .fbx

Daz is very high poly though...

There is another direct route but that costs money : http://www.daz3d.com/i/3d-models/-/daz-studio-game?item=10675&_m=d

Which includes an FBX exporter (can be bought separately).  Also includes a Decimator to reduce polys...

But I am holding off on buying that as there are currently some problems with the fbx exporter.  Although it appears it might be okay if you revert back to Daz Studio 3.

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6856
  • Mostly Harmless
Re: Lipsync Lady
« Reply #7 on: July 23, 2011, 01:26:51 pm »
BTW, I have successfully got Daz figures into various engines, but they are too high poly to do anything with them. I'm on four cores with 4GB and it can't cope.

I am monitoring another engine where it still might be doable, but things are a bit sketchy at the moment. I will let you know if it works out.

*

Bragi

  • Trusty Member
  • ********
  • Replicant
  • *
  • 564
    • Neural network design blog
Re: Lipsync Lady
« Reply #8 on: July 23, 2011, 01:34:27 pm »
I figured as much. Don't bother trying to find an engine that can handle the high polycount of daz directly, it doesn't exist for real time. But apparently some engines are capable of lowering the polycount and thus giving good results, but the quality of the image goes down. I also wonder what happens with the morphs in that case, cause those only appear to work if the vertex list is in the same order and of the same length?

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6856
  • Mostly Harmless
Re: Lipsync Lady
« Reply #9 on: July 23, 2011, 01:48:42 pm »
Yep everything has to match I have learnt, which does make sense.

I agree, the fantastic engine does not exist.  I can get the model up and running fine, but apart from that not a lot else.

That's why that decimator tool is so interesting to me.  You can do that in Blender, but it screws up the UV's and the texture becomes a mess. Probably there is some way to fix this but I haven't looked into it yet.

I think at least with the Daz tool it should do what it says on the tin as other people have had success with it.

Give it a few weeks and Daz might have released a version for Studio 4.

*

Bragi

  • Trusty Member
  • ********
  • Replicant
  • *
  • 564
    • Neural network design blog
Re: Lipsync Lady
« Reply #10 on: July 23, 2011, 02:08:08 pm »
Quote
Give it a few weeks and Daz might have released a version for Studio 4.
It's never 'easy' is it.  :(

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6856
  • Mostly Harmless
Re: Lipsync Lady
« Reply #11 on: July 23, 2011, 02:12:53 pm »
LOL I soooo know what you mean.  These past few weeks it has been one obstacle after another.  :D

*

Bragi

  • Trusty Member
  • ********
  • Replicant
  • *
  • 564
    • Neural network design blog
Re: Lipsync Lady
« Reply #12 on: July 23, 2011, 02:33:06 pm »
Something else I've been wondering about: is there a limit to the nr of lights used in daz? Cause I think this is the case with most 3d gaming engines.

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6856
  • Mostly Harmless
Re: Lipsync Lady
« Reply #13 on: July 23, 2011, 02:43:44 pm »
Well if there is it is pretty high.  I have scenes in Daz that have used around 10 - 15 light sources I guess, so in practical terms it hasn't come into play yet for me.

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6856
  • Mostly Harmless
Re: Lipsync Lady
« Reply #14 on: July 23, 2011, 11:14:14 pm »
Here's a new one with tweening added.  I've been staring at these animation for hours and find it hard to be objective !

Adding the tweening had the side effect of softening the visemes.  See what you think.



Less South Parky I think ;)

 


OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am
Nvidia Hype
by 8pla.net (AI News )
December 06, 2023, 10:04:52 pm
How will the OpenAI CEO being Fired affect ChatGPT?
by 8pla.net (AI News )
December 06, 2023, 09:54:25 pm
Independent AI sovereignties
by WriterOfMinds (AI News )
November 08, 2023, 04:51:21 am
LLaMA2 Meta's chatbot released
by 8pla.net (AI News )
October 18, 2023, 11:41:21 pm

Users Online

242 Guests, 0 Users

Most Online Today: 271. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles