Cannot execute pyview

i tried to use pyview and an error appears

Ah, I believe that it should be “pview”, not “pyview”–i.e. there should be no “y” in it.

thank you thats right. i did it and i get an empty face with no animation even if its animated

It looks like only part of the model was exported.

As to the lack of animations, that could be caused by the same, or by other causes–but I’ll leave that to others, as I’m still using the old tools, I’m afraid!

i tried to export while selecting all parts of the mesh and the same. can i send you the file .blend note that the eyes are separated. the animation is eyes blinking

If you’re using a version of Blender after 2.78 then there’s a good chance that my version won’t open the file correctly, I’m afraid.

(In addition, I’m about to step away for the night–it’s rather late here! Thus you might be better off waiting for someone else.)

i can send it to you when you wake up have a look if you want of course

There are a few interactions we should clear up:

  1. What version of Blender are you using? It will say in the bottom-right of the Blender window a version like “2.93.0”

  2. How are you exporting the model? What formats are you trying to use?

blender 2.9 the latest version im using. and i tried fbx and gltf (gltf doesnt show even the model)

PBR support in Panda3D is pretty new. Blender 2.9 uses BSDF Principled Nodes by default.

There are a few techniques to export an animated model. I would suggest using blend2bam to convert a .blend (Blender 2.9 file) into a .bam model with separate animations made for the model, which you apply using the Actor system inside of your game logic. I gather this is not the only way to do animations in Panda, but it is a way to do all the sorts of skeletal animation you’d like (with or without using morph targets, I think).

Further, I’d suggest using two different Actors for the head and the body model, which is yet another opinion I have about how to construct models in a game environment. And, this requires that you keep track of 2x as much information with regard to your character model, on top of ‘directly’ animating two skeletal armatures. I gather this is pretty gnarly or “low level” to the average developer.

As of Panda3D 1.10.8 we have direct support for loading and viewing .gltf files, without a patch loader, but if you’re on 1.10.7 or older you need to use the .gltf patch_loader. I’m not 100% on all the possible interactions here, as I said the support is pretty new, and it’s not guaranteed to work in all the possible hardware and renderer cases.

Also, skeletal animation is an advanced topic, and it takes quite a while to get proficient at.

1 Like

i tried whqt you said but nothing appears in the panda window

this is the link of the .blend file it contains the ani,ation as you can see eyes blinking

The model does export and separate animations with the following script, with one armature.

blend2bam -m pbr --pipeline gltf --animations separate shamaFace.blend incorrect_face.bam

You are still using two armatures, which I do not recommend. I deleted one for the sake of exporting.

The model loads in as an Actor and appears in a game environment from the resultant .bam files.

Your animation sequence is rather far from the 0-key, so you’ll need to set some logic up that plays only that animation range like so:

        face = actor_data.face
        face.set_pos(0, 0, 1)
        # npc base animation loop
        face_ctrl = actor_data.face.get_anim_control('wink')
        if not face_ctrl.is_playing():
            actor_data.face.loop("wink", fromFrame = 250, toFrame = 300)
            actor_data.face.set_play_rate(1.0, 'wink')

Still, you’ll have to rework your armature to get the results you’re looking for.

so what i understand is to make all animations by only one armature and separate them on the timeline in blender (because the goal is to do 2 animations eyes blinking what i did and mouth movement) or one armature for an animation and then save the file as .blend then use “blend2bam -m pbr --pipeline gltf --animations separate shamaFace.blend incorrect_face.bam” to get the mesh and the 2 others animations in different files ?

I think that, instead of placing your animations at different points on a single timeline, you can create each animation in a separate Blender “action” and have blend2bam export those.

(I believe that Blender’s interface has changed since the version that I use, so I don’t know with confidence how it’s done in newer versions, I’m afraid.)

i tried what you told me i used only one armature and i animated the eyes then i used : blend2bam -m pbr --pipeline gltf --animations separate “shamatestAnim.blend” “face.bam”
then the code :

Load the model.

    self.face = self.loader.loadModel("/c/UsersanassOneDriveBureauTestShamaAnimationsFinal/face.bam")

    # Reparent the model to render.


and i got an error : OSError: Could not load model file(s): [’/c/UsersanassOneDriveBureauTestShamaAnimationsFinal/face.bam’]

this is the link of the last model :

Actor loading and animation is described in the Panda3D Manual: Loading Actors and Animations — Panda3D Manual

this is why i did and i get a blank window :

self.face = Actor("/c/Users/anass/OneDrive/Bureau/TestShamaAnimationsFinal/face.bam",

                            {"blink" : "/c/Users/anass/OneDrive/Bureau/TestShamaAnimationsFinal/face_blinking.bam"})        



Maybe we need to put together a more thorough tutorial on Actors for people new to Panda3D.

what is wrong with my animation code ? i did what in the documentation