![]() |
|
#1
|
|||
|
|||
Problem mapping mesh names to actual meshes
Hi,
I need to change the texture of a specific mesh of a home-made cal3d avatar. The problem is that vizard doesn't seem to map the mesh names right. Hypothetically I use a .cfg file that looks like this (this is in fact only a fragment of the real .cfg I'm using): ---------- skeleton = avatar_skel.CSF mesh = head.CMF mesh = torso.CMF mesh = pants.CMF mesh = rhand.CMF mesh = lhand.CMF etc. material = head.CRF material = shirt.CRF material = pants.CRF material = rhand.CRF material = lhand.CRF etc. -------------- Now, let's say I want to change the texture of the shirt to shirt.jpg. I would do the following, right? Code:
avatar = viz.add('avatar.cfg') shirt = viz.add('shirt.jpg') avatar.texture(shirt, 'shirt.CMF') ![]() Anyway, what am I doing wrong? (I'm using vizard 2.53f) Regards, Ron |
#2
|
|||
|
|||
Hi,
I believe this is related to a known bug in 2.53. If you specify a mesh name that is invalid then Vizard will use the first mesh file instead. This has been fixed in 3.0. In the meantime, make sure the mesh name you are specifying is correct. In your sample code you specify shirt.CMF but it is not in your mesh list. However there is a shirt.CRF in your material list. Are you sure you are not mixing up meshes with materials? |
#3
|
|||
|
|||
Hi,
Sorry, I screwed up in my example: it should have been avatar.texture(shirt, 'torso.CMF'). In my real program I do use the correct mesh names (I have to use the mesh names, right? Not materials), I've checked twice, but it still seems to select the wrong mesh. What exactly is the bug in this version about? By the way, a totally unrelated question: do you know whether there exists a Cal3d exporter for Maya 7 for the Cal3d version Vizard uses? And an OSG exporter? Ron Last edited by rdotsch; 05-02-2006 at 05:17 AM. |
#4
|
|||
|
|||
Hi,
If you remove torso.cmf from your cfg file does the torso mesh disappear? I know there is an exporter for maya 6, but I haven't seen one for maya 7. If you provide me with the proper SDK files for Maya, I can attempt to compile an exporter for it. |
#5
|
|||
|
|||
Yes, the torso mesh disappears.
I should have the Maya 7 sdk here. How can I get them to you? Do you have an ftp server I can upload to? Regards, Ron |
#6
|
|||
|
|||
I think I figured out a pattern: when I try to change the texture of a mesh, it changes the texture of the mesh that is one step above the target mesh in the vizard resources list. In that list the meshes are sorted in alphabetical order (independent of the order in the .cfg file). Bad luck for me, the mesh I need is the one that is the lowest in alphabetical order, so I can't just use the mesh below it.
I could change the names of the meshes and change them in the cfg file, that's not a big problem. But I'd prefer to use the right names for the meshes, it would make reading the code less of a problem for others. Kind regards, Ron |
#7
|
|||
|
|||
Hi,
Well, I'm out of ideas. It would be easier for me to debug whats going on if you sent me your avatar files. You can also send me the Maya SDK. My email address is lashkari@worldviz.com |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|