WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-17-2017, 06:27 AM
seowen1 seowen1 is offline
Member
 
Join Date: May 2017
Posts: 17
Exclamation Adding custom floating hand avatar

Hi there,

I am in the process of trying to create and utilize a custom avatar for a disconnected hand. This would be similar to the "Head and Hands" avatar within vizconnect.

I'm still pretty new to Vizard and python, but I'm pretty well versed in 3ds max, so the model is already created/rigged and exported as a CFG via the Cal3D exporter. It seems like the model is in working order, since I can open the CFG in Inspector and it looks good. I can even use:

HTML Code:
handTest = vizfx.addAvatar('<filepath>/Tactical_GloveRight.cfg')
And it will load in and look fine. Where I am confused is how I go about adding this in as an Avatar to replace the hand/glove model. I did replace the model filepath with my new one in the vizconnect file, and it loads but it is a black model with no apparent textures. Almost as if the Effects aren't applied on the model (like if you load it with "viz" instead of "vizfx"). I am using a scene without any light source, but the texture for the glove has a self-illumination complete map baked in that appears just fine with the vizfx.addAvatar() command, as previously mentioned.

Also I'm getting a bunch of errors referencing the bone names:

HTML Code:
** ERROR: Bone with name 'END thumb' does not exist
** ERROR: Bone with name 'END index' does not exist
** ERROR: Bone with name 'END middle' does not exist
** ERROR: Bone with name 'END ring' does not exist
** ERROR: Bone with name 'END little' does not exist
** ERROR: Bone with name 'bone thumb ROOT' does not exist
** ERROR: Bone with name 'bone thumb 0-0' does not exist
** ERROR: Bone with name 'bone thumb 0-1' does not exist
** ERROR: Bone with name 'bone index 1-0' does not exist
** ERROR: Bone with name 'bone index 1-1' does not exist
** ERROR: Bone with name 'bone index 1-2' does not exist
** ERROR: Bone with name 'bone middle 2-0' does not exist
** ERROR: Bone with name 'bone middle 2-1' does not exist
** ERROR: Bone with name 'bone middle 2-2' does not exist
** ERROR: Bone with name 'bone ring 3-0' does not exist
** ERROR: Bone with name 'bone ring 3-1' does not exist
** ERROR: Bone with name 'bone ring 3-2' does not exist
** ERROR: Bone with name 'bone little 4-0' does not exist
** ERROR: Bone with name 'bone little 4-1' does not exist
** ERROR: Bone with name 'bone little 4-2' does not exist
** ERROR: Bone with name 'bone WRIST' does not exist
Which is weird to me because I thought the code would pull the bone names from the skeleton file instead of having them hardcoded to the old skeleton bone names. I even tried to edit the hardcoded names within HandModel() class of the hand.py file to no effect.

Can anyone tell me what I'm doing wrong? I really want to get this new model working as we want something different than the default "Mickey Mouse Glove" as we call it internally. Thanks!
Attached Thumbnails
Click image for larger version

Name:	2017-10-17_8-23-43.png
Views:	3387
Size:	783.8 KB
ID:	958  
Reply With Quote
  #2  
Old 10-17-2017, 05:17 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
After changing the name of the model file for the head and hands avatar in the vizconnect file:

Code:
rightHandFilename = 'Tactical_GloveRight.cfg'
Change the code where the model is added from:
Code:
if rightHandFilename:
	rightHand = avatar.add(rightHandFilename)
	avatar.rightHandFilename = rightHandFilename
to:
Code:
if rightHandFilename:
	rightHand = vizfx.addAvatar(rightHandFilename)
	rightHand.setParent(avatar)
	avatar.rightHandFilename = rightHandFilename
In order for the gestures to work, the bones names of your hand model should match the names of the included glove model.
Reply With Quote
  #3  
Old 10-18-2017, 06:23 AM
seowen1 seowen1 is offline
Member
 
Join Date: May 2017
Posts: 17
Hi Jeff,

Thank you for the quick response. I fixed the skeleton by naming the bones correctly, but I'm still having issues viewing the model correctly as the hand avatar.

I still get the black texture/no effect look even when I implement your solution with import vizfx. I'm not sure if there is something else going on here. It's almost as if the self-illumination isn't showing. If I export the material file and leave only the self-illumination map on (removing the diffuse map) the model loads black in the inspector.

I have a ZIP file I could send you for troubleshooting? I tried uploading it here but it probably doesn't accept zip files or my texture is too large perhaps.

Last edited by seowen1; 10-18-2017 at 06:30 AM.
Reply With Quote
  #4  
Old 10-18-2017, 08:41 AM
seowen1 seowen1 is offline
Member
 
Join Date: May 2017
Posts: 17
Okay so I have been messing with some of the material settings, trying to solve the issue. I did notice that if I set the diffuse color to red, I will get a red tinge to the avatar so that it shows mostly black with some soft red on some edges.

Attached are the settings I am using now that seem correct, but are still rendering the black model. I noticed that having the texture for the complete map in both the diffuse AND self-illumination slots was giving off a weird compounded effect. Took me awhile to figure that one out since I thought it was related to gamma settings.

Still having the main issue though. As mentioned before, I would gladly send my files over and give you a better way to troubleshoot.
Attached Thumbnails
Click image for larger version

Name:	2017-10-18_10-37-29.png
Views:	3085
Size:	13.0 KB
ID:	959  
Reply With Quote
  #5  
Old 10-18-2017, 10:29 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Yes, please upload the zipped file with resources and example vizconnect script for us to look at.
Reply With Quote
  #6  
Old 10-18-2017, 10:37 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Also wanted to mention that in addition to the head and hands avatar the 'Mark' avatar includes a robotic hand model. In case you have not seen it that maybe an option for you.
Reply With Quote
  #7  
Old 10-18-2017, 11:00 AM
seowen1 seowen1 is offline
Member
 
Join Date: May 2017
Posts: 17
I just submitted the upload. #1790457 for your reference.

I realize the skeleton isn't oriented correctly. I'm probably just going to reskin the model in an attempt to correct some other issues anyway. I assume I will just need to rotate the bones to fix this.

In the meantime, I just want to make sure that I can get the model working.

Thanks for the help, Jeff!

Also, I am aware of the other hand models you have available. We are just interested in a custom version.
Reply With Quote
  #8  
Old 10-27-2017, 01:56 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
When gestures are applied, the model is added through the hand.py module. Create a copy of hand.py, place that in the same folder as the vizconnect file, and change the line of code that adds the model in the __init__ method of the HandModel class to:

Code:
#Initialize base class
import vizfx
hand = vizfx.addAvatar(file,**kw)
viz.VizAvatar.__init__(self,hand.id)
viz.EventClass.__init__(self)
Reply With Quote
  #9  
Old 10-27-2017, 01:59 PM
seowen1 seowen1 is offline
Member
 
Join Date: May 2017
Posts: 17
Thanks, Jeff. I will definitely try that out!
Reply With Quote
Reply

Tags
avatar, bone, cal3d, hand, skeleton

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
Adding custom faces mjabon Vizard 2 04-01-2009 08:34 PM
Awkward neck/shoulder connection when adding custom head to vcc model. vEsotu Vizard 5 10-09-2008 05:07 PM
adding heads to custom avatars vAlexia Vizard 5 02-13-2007 11:14 AM
problems adding a custom morph head to a custom body Greenwu Vizard 1 07-27-2006 10:32 AM
For users with a floating license: Adding Vizard License Server as a Service mspusch Vizard 0 03-03-2006 11:36 AM


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


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