WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Adding morphs from FaceGen in peoplemaker (https://forum.worldviz.com/showthread.php?t=4508)

Frank Verberne 03-01-2013 02:13 AM

Adding morphs from FaceGen in peoplemaker
 
Hi all,

I'm trying to import the morphs that are produced by FaceGen to Vizard head. These morphs are .wrl files. When I use the option open -> import morphs in Peoplemaker, the standard option is to open a .vzf file. However, I want to import morphs for the current .vzf I opened in Peoplemaker. When I change the files of type to all files, and I select the .wrl file, nothing happens (e.g. no morph is imported to Peoplemaker).

Now, I think I have to create a .vzf of all the .wrl files I want to add morphs from. When I do file -> open -> open file and I select one of the .wrl morph files, then the morph is opened in Peoplemaker. When I save this face as a .vzf, open the original face, import the newly created morph, and use tools -> create morph target, I get the error 'Encountered geometric components with different number of vertices. Cannot extract morph targets.'. Can someone give some tips to get this working?

Frank Verberne 03-06-2013 10:39 AM

OK, solved the issue. Now my next question is: I have a blink left and a blink right morph. I would like the left eye and right eye to blink at the same time. Using the blinking code, I've tried this:
Quote:

#Blink morph ID of avatar
BLINK_MORPH_LEFT = 0
BLINK_MORPH_RIGHT = 1
#Action that will animate blink closing
close_eye_left = vizact.morph(BLINK_MORPH_LEFT,1,0.1)
close_eye_right = vizact.morph(BLINK_MORPH_RIGHT,1,0.1)
#Action that will animate blink opening
open_eye_right = vizact.morph(BLINK_MORPH_RIGHT,0,0.1)
open_eye_left = vizact.morph(BLINK_MORPH_LEFT,0,0.1)
#Action that will wait 1-5 seconds
wait_blink = vizact.waittime(vizact.randfloat(1,5))
blinking_time_left = wait_blink
blinking_time_right = blinking_time_left
#Action that will blink indefinitely
blinkAction_left = vizact.sequence( blinking_time_left, close_eye_left, open_eye_left, viz.FOREVER )
blinkAction_right = vizact.sequence( blinking_time_right, close_eye_right, open_eye_right, viz.FOREVER )

#Add blink action to avatar
face.addAction(blinkAction_left,0)
face.addAction(blinkAction_right,1)
However, now the blinking of the left and right eye is not synchronized. I think that each time the blinkAction_left and blinkAction_right is called, a new value gets assigned to wait_blink. However, if I make wait_blink a fixed float, the blinking happens really fast (though in sync). If I increase the value of wait_blink, it does not increase the waiting time between blinks. How can I adapt this code to make blink morphs morph at the same (random) time?

Frank Verberne 03-06-2013 11:24 AM

Using vizact.parallel() seemed to be the solution. Face.addAction is used because I use a custom face. For anyone interested:

Quote:

#Blink morph IDs of blinking
BLINK_MORPH_LEFT = 0
BLINK_MORPH_RIGHT = 1

#Action that will animate blink closing
close_eye_left = vizact.morph(BLINK_MORPH_LEFT,1,0.1)
close_eye_right = vizact.morph(BLINK_MORPH_RIGHT,1,0.1)
closing_eyes = vizact.parallel(close_eye_left, close_eye_right)

#Action that will animate blink opening
open_eye_right = vizact.morph(BLINK_MORPH_RIGHT,0,0.1)
open_eye_left = vizact.morph(BLINK_MORPH_LEFT,0,0.1)
opening_eyes = vizact.parallel(open_eye_left, open_eye_right)

#Action that will wait 1-5 seconds
wait_blink = vizact.waittime(vizact.randfloat(1,5))

#Action that will blink indefinitely
blinkAction = vizact.sequence( wait_blink, closing_eyes, opening_eyes, viz.FOREVER )

#Add blink action to avatar
face.addAction(blinkAction,0)


All times are GMT -7. The time now is 07:48 PM.

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