WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1  
Old 11-04-2007, 04:16 AM
v-jbinney v-jbinney is offline
Member
 
Join Date: Oct 2007
Location: Stanford, CA
Posts: 7
Question Multiple Mesh Avatar Texturing

Hi Farshizzo,

I'm using several complete-character avatars that comprise multiple meshes. When using the avatar.texture command, I should be able to select which mesh I want to change. However, when I choose the body mesh, both the body and the hair meshes receive the new texture. When I choose the hair mesh, nothing happens. Here is the code I am using:

Code:
blink = viz.add('blink.tga')
body = 'mesh_01.CMF'
avatar.texture(blink, body)
I have also tried
Code:
avatar.visible(0, body)
but neither mesh disappears.

What do I need to do to make the texture only apply to one mesh?

Thank you so much,
Joseph
Reply With Quote
  #2  
Old 11-05-2007, 09:50 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
What you are doing should work, assuming you are using the correct mesh names. Can you post the contents of the avatar cfg file you are using?
Reply With Quote
  #3  
Old 11-05-2007, 01:14 PM
v-jbinney v-jbinney is offline
Member
 
Join Date: Oct 2007
Location: Stanford, CA
Posts: 7
Sure - here is the actual code that gives me problems:

Code:
import viz
viz.go()

path = 'avatars/sexy/casual06_f/'
normal = viz.add(path + 'casual06_f_20.tga')
blink = viz.add(path + 'blink.tga')
avatar = viz.add(path + 'agent.cfg')
avatar.texture(blink, 'casual06_f_01.CMF')
And here are the contents of agent.cfg:

Code:
################################################
#
# Casual06_F - Cal3d cfg File
#
##############################################

scale=0.011

################# Skeleton #################

skeleton=casual06_f.CSF

################# Meshes #################

mesh=casual06_f_01.CMF
mesh=casual06_f_02.CMF

################# Materials #################

material=casual06_f_01.CRF
material=casual06_f_02.CRF

################# Animations #################

animation=femHighHeel_med_idle1.CAF
animation=femHighHeel_med_idle2.CAF
animation=fem_HighHeel_med_leanback.CAF
animation=fem_HighHeel_med_shiftweight.CAF
animation=fem_HighHeel_med_stepback.CAF
animation=fem_HighHeel_med_looksounds.CAF

##############################################
Reply With Quote
  #4  
Old 11-06-2007, 09:48 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
I just tested out the casual06 mediumpoly female model here, and everything worked fine. Is Vizard outputting any error messages? Can you send me your script and a sample avatar. My email is lashkari@worldviz.com.
Reply With Quote
  #5  
Old 11-07-2007, 10:30 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Thanks for the files. The problem seems to be that both your meshes are exactly the same. Each mesh contains the entire avatar, including body and head. If you comment out one of the mesh files in your cfg file, the entire avatar will still appear. You probably have an incorrect version of the complete character. The correct version will have a separate mesh file for the head and another mesh file for the rest of the body.
Reply With Quote
  #6  
Old 11-11-2007, 02:53 PM
v-jbinney v-jbinney is offline
Member
 
Join Date: Oct 2007
Location: Stanford, CA
Posts: 7
Thanks - that was exactly what was causing me problems. It's really an issue with the Cal3D exporter. In max, the Cal3D exporter options are only available in the Export function, not the Export Selected function. When you export using the standard Export function, everything from the scene is exported - i.e., all of the meshes.

I was able to work around this problem by deleting the meshes I didn't want to export each time I exported the meshes. Solved the problem, but very counterintuitive. The Cal3D exporter tutorial at http://download.gna.org/cal3d/docume.../tutorial.html says nothing about needing to delete meshes during the export process. :/
Reply With Quote
  #7  
Old 11-13-2007, 11:00 AM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
Hi v-jbinney.

Even though it doesn't show up under "export selected," exporting normally for CAL3d actually does let you export separate meshes. It will export whatever mesh you have selected when you click export.

So I would guess that your problem is one of two things --
1. You have at least two separate objects, and when you are exporting, you have all your meshes selected at once.

2. You have one mesh with at least two material IDs, and wanted each id to be treated as a separate object.

I would guess that your problem is the first one, but I suggest reading the solution to the second problem anyways in case you ever are working with a model and decide later on that you need it to be in more parts.

1. The procedure for the first version of the problem is to select only one mesh at a time when you export. That is the way the cal3d exporter is meant to work, so if that isn't happening, something is going wrong with your copy of the cal3d exporter.

2. The procedure for the second as follows:
-Create selection sets for each group of polygons you want to be a separate mesh
-Duplicate the mesh as a copy, so it will retain skinning data
-Invoke your first selection set in each one
-Delete those polygons from the first mesh
-Invert the selection in the second mesh to delete everything but those polygons
-Repeat for each selection set
-Select each part and export one at a time as described in the first procedure
Reply With Quote
Reply

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
avatar mesh weighting? michaelinTX Vizard 3 07-11-2007 01:11 PM
Texturing Avatar head problems S.Telemaque Vizard 0 04-01-2007 10:01 PM
Texturing avatar head : same problemes S.Telemaque Vizard 0 03-27-2007 07:19 PM
Problems Texturing avatar head S.Telemaque Vizard 3 03-27-2007 07:18 PM
Texturing an avatar head VAmanda Vizard 7 10-12-2006 01:58 PM


All times are GMT -7. The time now is 04:29 AM.


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