WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Awkward neck/shoulder connection when adding custom head to vcc model. (https://forum.worldviz.com/showthread.php?t=1658)

vEsotu 09-29-2008 04:54 PM

Awkward neck/shoulder connection when adding custom head to vcc model.
 
Hi!

I've been trying to figure out where I might have forgotten some crucial code/procedure to adding custom heads to the complete characters avatars. At the moment, I can import the new heads just fine into Vizard. My troubles lie in the awkward way the neck connects to the shoulders of the avatar. Instead of being centered, the neck appears to be slightly offset toward the back of the avatar as well as slightly inside the chest. So, it looks like the back part of the neck extends too far out from the back and the neck is "missing" within the torso.

I thought it may have been the complexity of the code I was working with; however, when I created a new viz file and tried the vizard help page with these following lines:


import viz

viz.go()

body = viz.addAvatar('vcc_female.cfg')
head = viz.addFace( 'biohead_all_morph.vzf' )
#body.setFace( head )
body.setFace( head, 'Bip01 Head', 'Bip01 Neck' )
body.setEuler(180, 0, 0)


...I get the same result. The head imports well, but the position is off. I first considered maybe the neck vertices were wrong, but I also remade the head files and still ended up with the same problem I had as before. I'm fairly certain this isn't natural, and I'd appreciate any help I can get in resolving this issue. If anything, is there a way to change the offset in the neck manually without sacrificing any abilities that may be connected with the head/neck bone animations?

Thanks in advance!

Jeff 09-30-2008 05:22 PM

thanks for your post. We'll get a response back to you soon.

Jeff 10-01-2008 12:46 PM

I am in agreement with you in the awkward positioning of the head. Here is some code showing the female and vcc_female side by side with their normal heads. Hit any key and you'll see the biohead added to each. The head on the vcc_female appears to drop down and the neck disappears for the most part, while the head stays in the same place on the female.

Farshizzo, am I missing something as well here? Is there a way to correct for this in Vizard?

Code:

import viz

viz.go()

vcc_female= viz.addAvatar('vcc_female.cfg', pos = [2,0,5], euler = [180,0,0])
female = viz.addAvatar('female.cfg', pos = [0,0,5], euler = [180,0,0])

head = viz.addFace( 'biohead_all_morph.vzf' )
head2 = viz.addFace( 'biohead_all_morph.vzf' )


def onKeyDown(key):
       
        vcc_female.setFace( head, 'Bip01 Head', 'Bip01 Neck' )
        female.setFace(head2, 'skel_Head', 'skel_Neck' )

viz.callback(viz.KEYDOWN_EVENT,onKeyDown)


vEsotu 10-02-2008 02:32 PM

Thanks for the quick response. Hopefully there's a way to correct it. I'll still be stopping by to check.

farshizzo 10-07-2008 05:21 PM

You can translate the head in PeopleMaker, which will affect the position it will attach to the avatar. This is the ideal solution. You could also add the following line to your script to manually offset the head position every frame:
Code:

vizact.onupdate(viz.PRIORITY_LINKS+1,head.setPosition,0,0.03,0.02,viz.REL_LOCAL)

vEsotu 10-09-2008 05:07 PM

Thanks so much, Farshizzo. That works really nicely for me.


All times are GMT -7. The time now is 07:24 PM.

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