Exporting Maya model's blendShape to Panda

Hello,

I am trying to export a Maya model (appropriated from a different Gamebryo project) to Panda with its blendShapes. The blendShapes are used for the animation I am exporting, but I would also like to access them procedurally (using controlJoint?). Here is a picture of the blendShapes in Maya:

And here is the blendShape in Hypershade:

When I export the model (maya2egg2008 -a both -o “morphTest2.egg” “ChrStarAcu_Head_Exp.mb”), the joint animation is still present but all blendShape animation is gone.

Here is a simple version of the code I am using:

    def __init__(self):
        self.accept("escape", sys.exit)
        self.accept("mouse1", self.playAnim)
        
        self.loadStar()
    
    def playAnim(self):
        self.head.play("headAnim")
    
    def loadStar(self):
        self.head = Actor("morphTest2",{"headAnim":"morphTest2"})
        self.head.setScale(1,1,1)
        self.head.reparentTo(render)
        self.head.listJoints()

And here is the output from listJoints:

ChrStarAcu_Head001_Visemes_Anim 
   <skeleton> 
     FaceControls 
       CtrlFaceMover 
         Brows 
           BrowInnerLScaleGrp  scale 0.0589016 0.059 -0.0589016 hpr -180 0 -180 trans 14.0469 0 -9.18469
           BrowInnerRScaleGrp  scale 0.0589016 0.059 -0.0589016 hpr -180 0 -180 trans 10.4081 0 -9.18469
           BrowOuterLScaleGrp  scale 0.0589016 0.059 -0.0589016 hpr -180 0 -180 trans 17.6263 0 -9.18469
           BrowOuterRScaleGrp  scale 0.0589016 0.059 -0.0589016 hpr -180 0 -180 trans 6.82881 0 -9.18469
         CheekLScaleGrp  scale 0.045 trans 16.0846 0 -16.8427
         CheekRScaleGrp  scale 0.045 trans 6.67556 0 -16.8427
         Eyelids 
           EyelidLowerLScaleGrp  scale 0.0256411 trans 14.0192 0 -14.3945
           EyelidLowerRScaleGrp  scale 0.0256411 trans 6.3807 0 -14.3945
           EyelidUpperLScaleGrp  scale 0.0256762 trans 14.0214 0 -11.4984
           EyelidUpperRScaleGrp  scale 0.0256762 trans 6.38284 0 -11.4984
         JawScaleGrp  scale 0.0609913 trans 12.3549 0 -23.4344
         Mouth 
           LipLowerLScaleGrp  scale 0.0140991 trans 10.5024 0 -20.1188
           LipLowerRScaleGrp  scale 0.0140991 trans 8.49035 0 -20.1188
           LipUpperLScaleGrp  scale 0.0140991 trans 10.5024 0 -19.1028
           LipUpperRScaleGrp  scale 0.0140991 trans 8.49035 0 -19.1028
           SmileFrownL  scale 0.0275619 trans 13.0087 0 -19.6003
           SmileFrownR  scale 0.0275619 trans 7.62544 0 -19.6003
         SnarlLScaleGrp  scale 0.0392446 trans 12.0236 0 -16.254
         SnarlRScaleGrp  scale 0.0392446 trans 10.0348 0 -16.254
         templateTwoWay1  scale 0.0361125 trans 10.8383 0 -21.1454
     HeadCharacterRoot 
       HeadAccumulationRoot 
         jtRootHead  hpr -90 0 -62.2864 trans 0 6.05277 140.26
           jtNeck  hpr 0 0 -6.16027 trans 16.9456 0 0
             jtHeadA  hpr 0 0 -20.1769 trans 7.51676 0 0
               jtBrowRootL  hpr 90 88.6235 -2.50376e-006 trans 10.1698 0 1.78605
                 jtInnerBrowAL  hpr -78.2426 0 -5.98626 trans 0 -1.16153 0
                   jtInnerBrowBL  hpr 78.1799 5.86023 1.22409 trans 9.66997 0 0
                 jtOuterBrowAL  hpr -57.844 0 -5.98626 trans 0 -1.16153 0
                   jtOuterBrowBL  hpr 57.7027 5.06536 3.19437 trans 9.66997 0 0
               jtBrowRootR  hpr 90 88.6235 -2.50376e-006 trans 10.1698 0 1.78605
                 jtInnerBrowAR  hpr -101.757 0 174.014 trans 0 -1.16153 3.79823e-005
                   jtInnerBrowBR  hpr 78.1799 5.86023 1.22409 trans -9.66998 1.40256e-006 -0.000103396
                 jtOuterBrowAR  hpr -122.156 0 174.014 trans 0 -1.16153 3.79823e-005
                   jtOuterBrowBR  hpr 57.7027 5.06536 3.19437 trans -9.66997 -1.76201e-006 -0.000103966
               jtEyeAL  hpr 0 0 88.6235 trans 8.95474 3.37385 -6.05716
                 jtEyeBL  hpr 90 0 0 trans 2.09424 0 0
               jtEyeAR  hpr 0 0 -91.3765 trans 8.95489 -3.37386 -6.05715
                 jtEyeBR  hpr 90 0 0 trans -2.09425 0 0
               jtEyelidRootL  hpr 0 0 88.6235 trans 8.90528 3.37385 -3.99884
                 jtEyelidLowerAL  hpr 0 0 25 trans 2.05892 0 0
                   jtEyelidLowerBL  hpr 90 -25 1.05844e-006 trans 2.09424 0 0
                 jtEyelidUpperAL  hpr 0 0 -25 trans 2.05892 0 0
                   jtEyelidUpperBL  hpr 90 25 -1.05844e-006 trans 2.09424 0 0
               jtEyelidRootR  hpr 0 0 -91.3765 trans 8.90543 -3.37386 -3.99885
                 jtEyelidLowerAR  hpr 0 0 25 trans -2.05889 0 0
                   jtEyelidLowerBR  hpr 90 -25 1.05844e-006 trans -2.09429 0 5.77212e-005
                 jtEyelidUpperAR  hpr 0 0 -25 trans -2.05889 0 0
                   jtEyelidUpperBR  hpr 90 25 -1.05844e-006 trans -2.09417 0 0.000218521
               jtHeadB  hpr 90 88.6755 -2.50381e-006 trans 18.3368 0 0
               jtJawA  hpr 0 0 123.376 trans 3.66503 0 -0.559071
                 jtJawB  hpr 90 -34.7529 1.42765e-006 trans 10.9695 0 0

I believe the first half of the joint list comes from the NURBS controls that act as input to the blendShapes. I’ve tried using them to controlJoint, but it seems to have no effect.

Here is a link to the .egg file (~10 MB):
http://www.digaditch.com/images/morphTest2.egg

Any help would be really appreciated.

-Logan

I know that maya2egg does normally support Maya’s blend shapes, and it converts them to morphs within Panda, which show up under the “morph” part of the joint hierarchy, as opposed to the “” part of the joint hierarchy.

At least it used to work; I’ve seen it work many times, and relied on it working. But I haven’t used that codepath in years, since we no longer use blend shapes on any of our projects here in Disney. Still, I’m pretty sure it should still work, unless there’s a radically new way within Maya to record blend shapes.

I’m not experienced enough within Maya to tell from your screenshots whether you’re doing it the way that maya2egg expects you to do it, though. Can anyone who has experience with using Maya blend shapes in Panda provide some insight here?

Thanks!
David

Per the .egg file attached, there is a morph table (though it’s not listed under listJoints). Is there anyway to access the table directly like the joints?

But then again, the morph table doesn’t some to be having any effect on the exported animation…

Oh, so there is–but this is just the animation table. It proves that Panda found at least part of your blend shape information, but not all of it. The model data for the morph tables is missing; this would be a series of entries for the vertices, to describe the relative offset for each vertex in the blend shape.

Hmm, one thing that is required is that the number of vertices must match exactly, and the individual vertices must correspond with each other one-to-one, between your blend shapes. Is this the case?

David

The vertices are 1-to-1.

Luckily, I figured out the issue with some help from Schell Games.

I needed to “bake” the blendshape onto the vertices. Previously, they were tied to the control object (as opposed to the actual head mesh), which Panda doesn’t acknowledge.

Thanks,
Logan