Hello Everyone, i have been trying to make an simple running animation using the Panda3D Actor class and integrate it with Ursina, i exported the rigged player model(used mixamo auto rigger) from blender to an obj format and imported and also exported the Running Animation as a gltf file but i faced this error: :Actor(warning): Player.obj is not a character!
Traceback (most recent call last):
File “C:\Adam\app.py”, line 12, in
actor.loop(‘Running’)
File “C:\Users\Lenovo\AppData\Local\Programs\Python\Python312\Lib\site-package
s\direct\actor\Actor.py”, line 1568, in loop
for control in self.getAnimControls(animName, partName):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Lenovo\AppData\Local\Programs\Python\Python312\Lib\site-package
s\direct\actor\Actor.py”, line 1860, in getAnimControls
animControl = self.__bindAnimToPart(
^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\Lenovo\AppData\Local\Programs\Python\Python312\Lib\site-package
s\direct\actor\Actor.py”, line 2366, in __bindAnimToPart
bundle = self.__commonBundleHandles[subpartDef.truePartName].getBundle()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: ‘modelRoot’, can anyone help and btw that is the code i used :
from ursina import *
from ursina.shaders import *
from direct.actor.Actor import *
app = Ursina()
Player = Entity(color=color.yellow, shader=basic_lighting_shader)
actor = Actor('AI.obj', {'Running': 'Running.gltf'})
actor.reparent_to(Player)
def update():
if held_keys['r']:
actor.loop('Running')
if held_keys['e']:
actor.stop()
EditorCamera()
DirectionalLight(shadows=True)
Sky(texture='sky_sunnest')
app.run()
I tried to export both as gltf file but the same error happened, also tried bam but it didn’t work someone in the Panda3D discord server told me to export the Sketal(bones) and the Player Model(Mesh) in the Player obj file and the animation data in the gltf file but i don’t know if this gonna work or not
No when I exported to gltf I have only the animation and the skeleton(because I couldn’t delete the Skelton in blender) so the obj file have a skeleton and also the gltf file have another skeleton, the problem is not with obj or gltf or bam or egg or whatever, the problem is when I try to use 2 files instead of using only one file
I see–in that case, maybe the problem is that you’re doing as two different steps, rather than exporting to multiple files in one step. It may be that the exporter is seeing that there are no animations indicated when exporting the model, and so isn’t exporting the model as an animated object.
Not exactly: it is possible to use separate model and animation files. (That’s what I usually do.)
However, there is a difference between a model that’s set up to be animated and one that isn’t–even if no actual animations are present–and Panda isn’t able to use the latter type in place of the former type.
Thus, if the model wasn’t exported with the setup to be animated, it won’t be usable with animations.
Now, I’m not familiar with the modern workflows–I still use an old version of both Blender and YABEE–so I’m not in a position to tell you how to export properly. But there should be away to achieve what you want.