WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Problems with avatars facial expressions exported with Cal3D (https://forum.worldviz.com/showthread.php?t=5085)

armo 06-28-2014 06:16 AM

Problems with avatars facial expressions exported with Cal3D
 
2 Attachment(s)
Hi all,


I am working with the Vizard Complete Characters library and I would like to import into vizard an avatar with a painful facial expression. I modeled this expression in 3DS max and exported it following the instructions of the CAL3D tutorial but I had the strange results you see in the attached screenshots.

Furthermore vizard sends me this error:

Code:

Loading File: casual02_m_highpoly_Expressions/casual02_m_highpoly_painful.cfg
** WARNING: Failed to load animation file: male_high_pain.CAF
Warning: Material::setShininess() of 6400 is above permitted maximum, clampping to 128.
Warning: Material::setShininess() of 6400 is above permitted maximum, clampping to 128.
** Load Time: 0.12 seconds


Could you please tell me where is the error?

Here's the source code:

Code:

import viz
import vizact

viz.go()

viz.MainView.setPosition( 0, 1.5, 0 )

av_painful = viz.add('casual02_m_highpoly_Expressions/casual02_m_highpoly_painful.cfg', pos=( 0, 0, 1.5 ), euler=(180,0,0))
neutral = vizact.morphTo( 0, 0, 1 )
pain = vizact.morphTo( 0, 1, 1 )
wait = vizact.waittime(vizact.randfloat(1,5))
action = vizact.sequence( wait, neutral, pain, viz.FOREVER )
av_painful.addAction(action)

and here's the .cfg file:

Code:

################################################
#
# Cal3d cfg File
#
################################################

scale=0.01
flip_texture = 1

################# Skeleton #################
skeleton=male_high_Skeleton.CSF

################# Meshes #################
mesh=casual02_m_highpoly.CMF
morph=casual02_m_highpoly_pain.CMF

mesh=casual02_m_highpoly01.CMF

################# Animations #################
animation=male_high_pain.CAF


################# Materials #################
material=casual02_m_highpoly.CRF
material=casual02_m_highpoly01.CRF


thank you very much,
armo

Jeff 07-01-2014 12:28 PM

Make sure the number of vertices in the morph mesh matches the number of vertices in the base mesh. Also the materials need to have "[number]" at the end of their names in Max. This is explained at the beginning of the of the exporting section in part 4:

http://download.gna.org/cal3d/docume.../tutorial.html

I'll put together a small knowledge base article in the next few days with some guidelines for setting up and exporting the morph targets.

armo 08-24-2014 01:57 PM

1 Attachment(s)
Dear Jeff


Excuse me for resuming this post after so long, but I am still having some problems in getting the entire exporting process correct, particularly in the material files loading.

I have attached the result of my modified avatar when I load it in vizard. The texture of the face still doesn't show (everything else works fine: equal number of vertices, bones, animations and morphs).


Here's the sequence of steps that I make when I export materials:

1-I open the material editor in 3ds MAX and rename the body texture as "body[0]" and the hair_transparent as "hair_transparent[1]"

2-I open the export command, choose .CRF format, name it "casual02_m_highpoly.CRF" and choose "body[0]" in step 1, and then "casual02_m_25.tga" in step 2

3- I make the same sequence for "casual02_m_highpoly01.CRF" and "hair_trasparent[1]", but this time I never find any .tga file in step 2

below is the .cfg file

Code:

################################################
#
# Cal3d cfg File
#
################################################

scale=0.01
flip_texture = 1

################# Skeleton #################
skeleton=male_high_happy_Skeleton.CSF

################# Meshes #################
mesh=casual02_m_highpoly.CMF
morph=casual02_m_highpoly_blink.CMF
morph=casual02_m_highpoly_ebrow.CMF
morph=casual02_m_highpoly_talk.CMF
morph=casual02_m_highpoly_happy.CMF

mesh=casual02_m_highpoly01.CMF

################# Animations #################
animation=male_high_basepose.CAF
animation=male_high_beatenup.CAF
animation=male_high_breakdown1.CAF
animation=male_high_breakdown2.CAF
animation=male_high_cheer.CAF
animation=male_high_claphands.CAF
animation=male_high_dance.CAF
animation=male_high_drivecar.CAF
animation=male_high_drivemotorbike.CAF
animation=male_high_drown.CAF
animation=male_high_duck.CAF
animation=male_high_eatsitting.CAF
animation=male_high_fight.CAF
animation=male_high_holdpistol.CAF
animation=male_high_idle1.CAF
animation=male_high_idle2.CAF
animation=male_high_idledrunk.CAF
animation=male_high_idlewall.CAF
animation=male_high_jumpforward.CAF
animation=male_high_lierelaxed1.CAF
animation=male_high_lierelaxed2.CAF
animation=male_high_listen.CAF
animation=male_high_lookaround.CAF
animation=male_high_manipulate.CAF
animation=male_high_pickup.CAF
animation=male_high_putitem.CAF
animation=male_high_run.CAF
animation=male_high_runcarry.CAF
animation=male_high_shoot.CAF
animation=male_high_shout.CAF
animation=male_high_sitground.CAF
animation=male_high_sitidle.CAF
animation=male_high_skate.CAF
animation=male_high_stairs_down.CAF
animation=male_high_stairs_up.CAF
animation=male_high_strafeleft.CAF
animation=male_high_straferight.CAF
animation=male_high_swim.CAF
animation=male_high_talk1.CAF
animation=male_high_talk2.CAF
animation=male_high_throw.CAF
animation=male_high_tigerjump.CAF
animation=male_high_useitem.CAF
animation=male_high_walk.CAF
animation=male_high_walk_inplace.CAF
animation=male_high_walkcarry1.CAF
animation=male_high_walkcarry2.CAF
animation=male_high_walkdrunk.CAF
animation=male_high_walkinjured.CAF
animation=male_high_walkpush.CAF
animation=male_high_workassembly.CAF
animation=male_high_workcomputer.CAF

################# Materials #################
material=casual02_m_highpoly.CRF
material=casual02_m_highpoly01.CRF


best regards,
armo

Kevin Chiu 08-26-2014 02:43 PM

Hi Armo,

You will still need to choose "body[0]" when exporting both the "casual02_m_highpoly.CRF" and "casual02_m_highpoly01.CRF" hence the "hair_trasparent[1]" is not an existing tga texture.

Best,
Kevin

armo 08-28-2014 10:57 AM

Hi Kevin,

Thank you very much! now it works properly.


best regards,
armo


All times are GMT -7. The time now is 09:56 AM.

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