#1
|
|||
|
|||
Problem with geometry in vzf objects
Hello,
I am having an odd problem when I try to grab geometry from objects made from .vzf files (heads, specifically). Look at the following piece of code: Code:
male1 = viz.add('C:\AXE\Resource\Avatar\Eric\Body\casual01_m_highpoly.cfg') face1 = male1.face('C:\AXE\Resource\Avatar\Eric\Eric_122\Eric_122_morphs.vzf', 'Bip01 Head', 'Bip01 Neck') eye1r = face1.getchild('geom_0') eye1l = face1.getchild('geom_1') male2 = viz.add('C:\AXE\Resource\Avatar\Eric\Body\casual01_m_highpoly.cfg') face2 = male2.face('C:\AXE\Resource\Avatar\Eric\Eric_122\Eric_122_morphs.vzf', 'Bip01 Head', 'Bip01 Neck') male2.setPosition([1,0,1]) eye2r = face2.getchild('geom_0') eye2l = face2.getchild('geom_1') Thanks, Christian |
#2
|
|||
|
|||
I tried it again using the biohead with eyes included in the resources directory. I got the same result - one of the heads loses it's eyes! This version only uses things from the resources directory, so should be runnable by anyone. The script is as follows:
Code:
import viz viz.go() female1 = viz.add('vcc_female.cfg') #male.state(1) face1 = female1.face('biohead_eyes.vzf') foo1r = face1.getchild('geom_0') foo1l = face1.getchild('geom_1') #male1.visible(viz.OFF) #face1.visible(viz.OFF) female2 = viz.add('vcc_female.cfg') #male.state(1) face2 = female2.face('biohead_eyes.vzf') female2.setPosition([1,0,1]) foo2r = face1.getchild('geom_0') foo2l = face1.getchild('geom_1') Last edited by Enlil; 02-03-2010 at 07:57 AM. Reason: left an import into the code that wasn't needed |
#3
|
|||
|
|||
Try using the following methods to add the face and apply it to the avatar.
Code:
import viz viz.go() face1 = viz.add('biohead_eyes.vzf') face2 = viz.add('biohead_eyes.vzf') female1 = viz.add('vcc_female.cfg', pos = [0.2,0.3,1], euler = [180,0,0]) female1.setFace(face1) female2 = viz.add('vcc_female.cfg', pos = [-0.2,.3,1], euler = [180,0,0]) female2.setFace(face2) f1_l_eye = face1.getChild('geom_0') f1_r_eye = face1.getChild('geom_1') f2_l_eye = face2.getChild('geom_0') f2_r_eye = face2.getChild('geom_1') female1.state(1) female2.state(1) |
#4
|
|||
|
|||
That works, thanks.
Christian |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
imported 3DModel - Color Write - Problem | Boerske | Vizard | 4 | 10-09-2009 10:18 AM |
Semi-circle array containing target and distractor objects | ptjt255 | Vizard | 3 | 08-04-2009 03:09 AM |
Lightwave objects rotation problem | hosier | Vizard | 6 | 02-13-2009 12:04 PM |
importing a single WRL with many objects. | giancamati | Vizard | 3 | 12-18-2006 01:13 PM |
Could not find plugin to load objects... | halley | Vizard | 1 | 05-30-2006 11:01 AM |