WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-01-2008, 09:32 AM
rubberpimple rubberpimple is offline
Member
 
Join Date: Jan 2008
Location: Phoenix, Arizona
Posts: 16
Left Hand

I need to animate a LEFT hand in Vizard...is there some easy way to mirror the stock hand.cfg??
__________________
David
Reply With Quote
  #2  
Old 02-01-2008, 10:05 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
If you are using the hand module, then you can use the following code:
Code:
import hand
h = hand.add(sensor)

#Display as left hand
h.leftHand()
If you are manually loading the hand.cfg file, then you can us the following code:
Code:
hand = viz.add('hand.cfg')
hand.scale(-1,1,1)
hand.enable(viz.FLIP_POLYGON_ORDER)
Reply With Quote
  #3  
Old 02-05-2008, 02:00 PM
rubberpimple rubberpimple is offline
Member
 
Join Date: Jan 2008
Location: Phoenix, Arizona
Posts: 16
Using the second option gives me a darkly-shaded, flipped-over (palm facing up) hand. Is there a better way?
__________________
David
Reply With Quote
  #4  
Old 02-05-2008, 02:07 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
If you run the following script does the shading on the left hand look darker than the right hand?
Code:
import viz
viz.go()

rhand = viz.add('hand.cfg',pos=(0.1,1.8,0.5),euler=(0,-90,0))

lhand = viz.add('hand.cfg',pos=(-0.1,1.8,0.5),euler=(0,-90,0))
lhand.scale(-1,1,1)
lhand.enable(viz.FLIP_POLYGON_ORDER)

rhand.add(vizact.spin(0,0,1,45))
lhand.add(vizact.spin(0,0,-1,45))
Reply With Quote
  #5  
Old 02-05-2008, 03:03 PM
rubberpimple rubberpimple is offline
Member
 
Join Date: Jan 2008
Location: Phoenix, Arizona
Posts: 16
Wow...those look perfect. I think there is something else in my code that is mucking things up. I'll investigate...
__________________
David
Reply With Quote
  #6  
Old 02-05-2008, 03:05 PM
rubberpimple rubberpimple is offline
Member
 
Join Date: Jan 2008
Location: Phoenix, Arizona
Posts: 16
Does messing with window POV commands have this effect?
__________________
David
Reply With Quote
  #7  
Old 02-05-2008, 03:07 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Can you just post a sample script of yours that makes the left hand darker?
Reply With Quote
  #8  
Old 02-05-2008, 03:16 PM
rubberpimple rubberpimple is offline
Member
 
Join Date: Jan 2008
Location: Phoenix, Arizona
Posts: 16
Here it is:

myHand = viz.add('hand.cfg',pos=(0.1,1.8,0.5),euler=(0,-90,0))
myHand.scale(-1,1,1)
myHand.enable(viz.FLIP_POLYGON_ORDER)
myHand.setScale(20,20,20)

It's the setScale command. Not sure why, but the hand becomes right handed and appears darker.
__________________
David
Reply With Quote
  #9  
Old 02-05-2008, 03:17 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Your sample code is undoing the negative x scale, which is required for inverting the hand and making it look left handed. Use the following code instead:
Code:
myHand = viz.add('hand.cfg',pos=(0.1,1.8,0.5),euler=(0,-90,0))
myHand.enable(viz.FLIP_POLYGON_ORDER)
myHand.setScale(-20,20,20)
Reply With Quote
  #10  
Old 02-05-2008, 03:20 PM
rubberpimple rubberpimple is offline
Member
 
Join Date: Jan 2008
Location: Phoenix, Arizona
Posts: 16
Nice! Many thanks...
__________________
David
Reply With Quote
Reply

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
cameras get confused by many LEDs tavaksai Precision Position Tracker (PPT) 9 05-19-2007 04:52 PM
Hand Steve_HT Vizard 1 03-19-2007 12:51 PM
5DT left and right glove glepoura Vizard 3 02-06-2007 04:41 AM
Use of 5DT Ultra left handed glove pattie Vizard 1 08-26-2006 12:59 PM
hand model features? halley Vizard 1 03-13-2006 10:11 AM


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


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