WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Multiple Mesh Avatar Texturing (https://forum.worldviz.com/showthread.php?t=1270)

v-jbinney 11-04-2007 04:16 AM

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

farshizzo 11-05-2007 09:50 AM

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?

v-jbinney 11-05-2007 01:14 PM

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

##############################################


farshizzo 11-06-2007 09:48 AM

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.

farshizzo 11-07-2007 10:30 AM

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.

v-jbinney 11-11-2007 02:53 PM

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. :/

Veleno 11-13-2007 11:00 AM

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


All times are GMT -7. The time now is 04:42 PM.

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