#1
|
|||
|
|||
Left Hand
I need to animate a LEFT hand in Vizard...is there some easy way to mirror the stock hand.cfg??
__________________
David |
#2
|
|||
|
|||
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() Code:
hand = viz.add('hand.cfg') hand.scale(-1,1,1) hand.enable(viz.FLIP_POLYGON_ORDER) |
#3
|
|||
|
|||
Using the second option gives me a darkly-shaded, flipped-over (palm facing up) hand. Is there a better way?
__________________
David |
#4
|
|||
|
|||
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)) |
#5
|
|||
|
|||
Wow...those look perfect. I think there is something else in my code that is mucking things up. I'll investigate...
__________________
David |
#6
|
|||
|
|||
Does messing with window POV commands have this effect?
__________________
David |
#7
|
|||
|
|||
Can you just post a sample script of yours that makes the left hand darker?
|
#8
|
|||
|
|||
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 |
#9
|
|||
|
|||
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) |
#10
|
|||
|
|||
Nice! Many thanks...
__________________
David |
|
|
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 |