WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-02-2010, 09:40 AM
Enlil Enlil is offline
Member
 
Join Date: May 2008
Posts: 61
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')
There doesn't seem to be anything too odd there, but if I run it, one of the heads will have no eyes! Both heads have eyes if I do not get the eyes, though. Any ideas on why?

Thanks,
Christian
Reply With Quote
  #2  
Old 02-03-2010, 07:56 AM
Enlil Enlil is offline
Member
 
Join Date: May 2008
Posts: 61
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')
Christian

Last edited by Enlil; 02-03-2010 at 07:57 AM. Reason: left an import into the code that wasn't needed
Reply With Quote
  #3  
Old 02-03-2010, 09:16 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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)
Reply With Quote
  #4  
Old 02-04-2010, 10:56 AM
Enlil Enlil is offline
Member
 
Join Date: May 2008
Posts: 61
That works, thanks.

Christian
Reply With Quote
Reply


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
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


All times are GMT -7. The time now is 12:02 PM.


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