Building dae2egg

Hi, I’m trying to load skp objects using an already written open source panda3D code at github.com/dimatura/seeing3d/bl … /render.py

Running it with the provided options gives exception on following line.
subprocess.check_call([‘dae2egg’, ‘-o’, eggpath, daepath])

Going through the internet I found that dae2egg is a binary which convertes dae models to egg models required for panda. Indeed the file dae2egg is not present at all in my computer! I checked the build directory of panda3d (I compiled panda3d from code, as I was having dependecy problem in ubuntu 14.04) and dae2egg is not present there.

I had built panda3d from source using the following command:
python makepanda/makepanda.py --everything --no-gles --no-gles2 --no-fftw

and it seems that dae2egg is not getting built from this command. Can anyone shed any light on this? Thanks a lot!

You need the FCollada library for this. You can download the source from here:
panda3d.org/download/novers … _3.05B.zip
Alternatively, there are precompiled versions for Ubuntu here:
launchpad.net/~panda3d/+archive … /+packages

By the way, if you simply want to load a .dae file at runtime, you don’t need to use dae2egg; you can just load a .dae file in loader.loadModel directly, this will automatically invoke the underlying dae2egg code. Assuming it is built with FCollada support, of course.

Hi!
Thanks, building after installing FCollada fixed the issue. And yes, the script is calling loadModel on the dae file which internally tries to call dae2egg, causing the exception.
Thank you again!

No, what I’m saying is that calling dae2egg first is unnecessary. In fact, this code:

subprocess.check_call(['dae2egg', '-o', eggpath, daepath])
print('loading %s'%daepath)
model = loader.loadModel(eggpath)

can be replaced with the following:

print('loading %s'%daepath)
model = loader.loadModel(daepath)

Since Panda will already do the right thing under the hood when it detects that you’re trying to load a file with .dae extension.

Ah, OK.
Sorry, I did not understand that before. I’m not working with panda at all; just wanted to run an available panda script for rendering 3D models.
Thanks a lot for your help.