WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Modeling changing facial expressions? (https://forum.worldviz.com/showthread.php?t=2518)

Josh 02-13-2010 03:12 AM

Modeling changing facial expressions?
 
Hi all

I need my avatar to express several emotions that should be changing fluently. For example I want the avatar to smile and then change to frown.

How can I do this? I guess using some sort of morphing? I know that I can attach a head to my avatar, so I could create 2 heads (one smiling and one frowning) and then morph from one to the other, right?

Could anyone please give me a hint into the right direction for doing this? :-)
Best would be if I could morph also to a certain degree, let's say 50%, so the facial expression would be neutral then. Is this possible?

Thanks a lot :-)
Josh

ohad 02-15-2010 01:24 AM

Hey,
great question, unfortunately I as well don't know how to implement this, but i did make my avatar yawn so if it could be of any use to you :

def makeAvatarYawn(avatar,eyes,eyebrows,mouth,isOpenin g) :
increaseFactor = 0.1
waitTimeFactor = 0.07
maxOpenTime = 0.4
maxOpen = 3

if isOpening :
eyes = eyes + increaseFactor*0.5
eyebrows = eyebrows + increaseFactor
mouth = mouth + increaseFactor
if mouth >= maxOpen :
isOpening = False
yield viztask.waitTime(maxOpenTime)
else :
eyes = eyes - increaseFactor*0.65*0.5
eyebrows = eyebrows - increaseFactor*0.65
mouth = mouth - increaseFactor*0.65

avatar.morph(0,eyes)
avatar.morph(1,eyebrows)
avatar.morph(2,mouth)

yield viztask.waitTime(waitTimeFactor)
if mouth > 0 :
viztask.schedule(makeAvatarYawn(avatar,eyes,eyebro ws,mouth,isOpening))

viztask.schedule(makeAvatarYawn(avatar,0,0,0,True) )


All times are GMT -7. The time now is 08:34 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC