WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-02-2013, 08:20 AM
Frank Verberne Frank Verberne is offline
Member
 
Join Date: Mar 2008
Location: Netherlands
Posts: 148
Making a HD Complete Character blink

Hi all,

I'm trying to get a HD Complete Character to blink. HD Complete Characters have bones for facial expressions, so I thought that I had to control the bones of the eye lids to make them blink. However, I have difficulties getting a HD Complete Character to blink with using the eye lid bones. See the code below for my code. I thought rotating either the EyeBlinkTop or EyeBlinkBottom bones should do the trick, however it does not. Any help would be greatly appreciated!

Code:
import viz

viz.go()

avatar = viz.add('vcc_male2.cfg', pos = [0,.15,.5], euler = [180,0,0])

blinkLeft = avatar.getBone('Bip01 LEyeBlinkTop')
blinkRight = avatar.getBone('Bip01 REyeBlinkBottom')
blinkLeft.lock()
blinkRight.lock()

def onKeyDown(key):
	eulerLeft = blinkLeft.getEuler(viz.AVATAR_LOCAL)
	eulerRight = blinkRight.getEuler(viz.AVATAR_LOCAL)
	if key in 'qQ':
		eulerLeft[0] += 1
		eulerRight[0] += 1
	elif key in 'aA':
		eulerLeft[0] -= 1
		eulerRight[0] -= 1
	elif key in 'wW':
		eulerLeft[1] += 1
		eulerRight[1] += 1
	elif key in 'eE':
		eulerLeft[1] -= 1
		eulerRight[1] -= 1
	elif key in 'sS':
		eulerLeft[2] += 1
		eulerRight[2] += 1
	elif key in 'dD':
		eulerLeft[2] -= 1
		eulerRight[2] -= 1
	blinkLeft.setEuler(eulerLeft, viz.AVATAR_LOCAL)
	blinkRight.setEuler(eulerRight, viz.AVATAR_LOCAL)

viz.callback(viz.KEYDOWN_EVENT,onKeyDown)
Reply With Quote
 

Tags
blinking, hd complete characters

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom head on HD Complete Character Frank Verberne Vizard 3 06-18-2013 05:18 PM
Moving, blinking eyes for Complete Character Set Frank Verberne Vizard 4 09-14-2012 05:42 AM
making a Complete Character Set character speak Frank Verberne Vizard 4 05-25-2012 08:47 PM
New Complete Character morph targets for facial animation? Deltcho Vizard 2 07-26-2010 04:26 PM
How to make avatar's eyes to blink when speaking michelcm3 Vizard 12 01-15-2008 08:48 AM


All times are GMT -7. The time now is 06:22 AM.


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