Controlling joints with Panda3D + MakeHuman model

Started by
1 comment, last by boughtonp 4 years, 4 months ago

I'm trying to figure out how joints work in Panda3D.

So far I have a MakeHuman model exported to FBX format which appears in its default pose, but the code below is outputting two error messages:

:Actor(warning): models/human1.fbx is not a character!
:Actor(warning): Cannot control joint hand_r

Calling the “listJoints” function mentioned in the Panda3D documentation also errors:

Exception: no part named: modelRoot

#!/usr/bin/env python

import sys
from direct.showbase.ShowBase import ShowBase
from direct.actor.Actor import Actor
from direct.task.Task import Task

from panda3d.core import load_prc_file_data
load_prc_file_data("", "model-cache-dir")


class PandaTest(ShowBase):

	def __init__(self):
		ShowBase.__init__(self)

		self.accept('escape', sys.exit)

		base.disableMouse()
		camera.setPos(0,-45,10)

		Human1 = Actor("models/human1.fbx",{})
		Human1.setP(Human1,90)
		Human1.reparentTo(render)

		RightHand = Human1.controlJoint(None,'modelRoot','hand_r')

test = PandaTest()
test.run()

(Pasting the code above has @ instead of newlines… no idea if it's going to stay like that when posting, and there doesn't appear to be a source view for this editor. - think I solved it by editing the HTML source directly...)

Advertisement

So I was using FBX because with Collada (.dae) the model didn't load correctly in Panda3D.@@But if I export to Collada, use Panda's dae2egg converter, then load that .egg file, the model does load.@@It's a completely white silhouette - no textures, no idea if the clothes are there. :(@@But I don't get the previous errors, listJoint outputs a bunch of joint information, and I can call methods on the object returned from controlJoint.@@Apparently, textures don't work without setting up lights in a scene, but just copying the demo light code doesn't change anything.@

Sigh… the @s are back. This editor really is shit.

This topic is closed to new replies.

Advertisement