trying to create a .p3d file

Hi,

I am trying to follow the example here to try to create a .p3d file.

Panda3D Manual: Using packp3d
http://www.panda3d.org/manual/index.php/Using_packp3d

First I create a working directory

mkdir F:\Panda3D-1.7.2.Work

Next, I read some documentation

packp3d -o iwant2create.p3d -d c:/allcodeandmodels

The panda3d executable should have been installed when you installed 
the Panda3D runtime (this is a separate download from the Panda3D SDK). 
You might need to extend your PATH variable to locate it automatically 
on the command line, by adding the plugin installation folder to your PATH. 
On Windows, this is the folder c:\Program Files\Panda3D by default.

Next, I modify my path to include the runtime ‘panda3d’

I insert

;F:\Program Files\Panda3D

into my original Path

;F:\Panda3D-1.7.2\python;F:\Panda3D-1.7.2\bin;F:\MinGW\bin;M:\cygwin\bin

to become

;F:\Panda3D-1.7.2\python;F:\Panda3D-1.7.2\bin;F:\Program Files\Panda3D;F:\MinGW\bin;M:\cygwin\bin

Next, I open a command shell and test

F:\Documents and Settings\Administrator>which panda3d
/cygdrive/f/Program Files/Panda3D/panda3d

I change to the SDK bin directory and run ‘packp3d’

F:\Documents and Settings\Administrator>cd F:\Panda3D-1.7.2\bin

F:\Panda3D-1.7.2\bin>packp3d -o F:\Panda3D-1.7.2.Work\Tut-Carousel.p3d -d F:\Panda3D-1.7.2\samples\Carousel

The following is returned.

:downloader: [001605C8] begin GET [ https://runtime.panda3d.org/contents.xml?1316559254 ]
:downloader: [001605C8] begin GET [ http://runtime.panda3d.org/coreapi/win32/p3d_plugin.dll ]
:downloader: [001605C8] begin GET [ http://runtime.panda3d.org/images/images.xml ]
:downloader: [00164C48] begin GET [ http://runtime.panda3d.org/panda3d/cmu_1.7/win32/panda3d.cmu_1.7.win32.xml ]
:downloader: [001692C8] begin GET [ http://runtime.panda3d.org/egg/cmu_1.7/win32/egg.cmu_1.7.win32.xml ]
:downloader: [0016D948] begin GET [ http://runtime.panda3d.org/images/images.mf.1.pz ]
:downloader: [001625D0] begin GET [ http://runtime.panda3d.org/panda3d/cmu_1.7/win32/panda3d.cmu_1.7.win32.mf.1.pz ]
:downloader: [00EA05C8] begin GET [ http://runtime.panda3d.org/panda3d/cmu_1.7/win32/panda3d.cmu_1.7.win32.mf.1.pz ]
Installing Panda3D rev 1
:downloader: [00EA05C8] begin GET [ http://runtime.panda3d.org/egg/cmu_1.7/win32/egg.cmu_1.7.win32.mf.1.pz ]
Installing Panda3D egg loader rev 1
Install complete.
Traceback (most recent call last):
  File "VFSImporter", line 153, in load_module
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\direct\p3d\AppRunner.py", line 36, in <module>
  File "VFSImporter", line 153, in load_module
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\pandac\PandaModules.py", line 32, in <module>
  File "VFSImporter", line 153, in load_module
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\pandac\libp3visionModules.py", line 2, in <module>
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\pandac\extension_native_helpers.py", line 79, in Dtool_PreloadDLL
ImportError: DLL load failed: The specified procedure could not be found.
Failure on startup.

Nothing exists in my directory F:\Panda3D-1.7.2.Work directory.

When I try to see additional options, I get back the same error

F:\Panda3D-1.7.2\bin>packp3d -h
Traceback (most recent call last):
  File "VFSImporter", line 153, in load_module
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\direct\p3d\AppRunner.py", line 36, in <module>
  File "VFSImporter", line 153, in load_module
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\pandac\PandaModules.py", line 32, in <module>
  File "VFSImporter", line 153, in load_module
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\pandac\libp3visionModules.py", line 2, in <module>
  File "C:\buildslave\release_rtdist_win32\build\panda3d\built_cmu\pandac\extension_native_helpers.py", line 79, in Dtool_PreloadDLL
ImportError: DLL load failed: The specified procedure could not be found.
Failure on startup.

But, when I run the game. It works as expected. I actually see the carousel spinning.

F:\Panda3D-1.7.2\bin>ppython F:\Panda3D-1.7.2\samples\Carousel\Tut-Carousel.py
DirectStart: Starting the game.
Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)

Please help. What else to I need to do to create a .p3d file?
Thank you.

I don’t think you can run packp3d from the F:\Panda3d-1.7.2\bin directory. You’re getting conflicts with the version of Panda already in that same directory.

Instead of doing this, try changing to any other directory before running packp3d. It shouldn’t be necessary to be in that directory anyway, since it’s on your PATH.

David

O.K. Thanks. The packaging process now works.

I changed my current directory to my F:\Panda3D-1.7.2.Work directory and packaged it there.

F:\Documents and Settings\Administrator>cd F:\Panda3D-1.7.2.Work

F:\Panda3D-1.7.2.Work>which packp3d
/cygdrive/f/Panda3D-1.7.2/bin/packp3d

F:\Panda3D-1.7.2.Work> packp3d -o F:\Panda3D-1.7.2.Work\Tut-Carousel.p3d -d F:\Panda3D-1.7.2\samples\Carousel
:PackageInfo: hash check ok: /f/Documents and Settings/Administrator/Local Settings/Application Data/Panda3D/hosts/runtime
:PackageInfo: Package panda3d uses 107 MB
:PackageInfo: Package egg uses 5 MB
:AppRunner: Total Panda3D disk space used: 112 MB
:AppRunner: Configured max usage is: 2048 MB
:AppRunner: Freshening https://runtime.panda3d.org/panda3d/cmu_1.7/win32/panda3d.cmu_1.7.win32.import.xml
:downloader: GET [ https://runtime.panda3d.org/panda3d/cmu_1.7/win32/panda3d.cmu_1.7.win32.import.xml ]
There are some missing modules: ['panda3d.core']
:egg2pg: Reading /f/Panda3D-1.7.2/samples/Carousel/models/carousel_base.egg.pz
:gobj: Loading texture /f/Panda3D-1.7.2/samples/Carousel/models/carousel_base.jpg
:egg2pg: Flattened 1 nodes.
:egg2pg: Reading /f/Panda3D-1.7.2/samples/Carousel/models/carousel_lights.egg.pz
:egg2pg: Flattened 1 nodes.
:egg2pg: Reading /f/Panda3D-1.7.2/samples/Carousel/models/carousel_panda.egg.pz
:gobj: Loading texture /f/Panda3D-1.7.2/samples/Carousel/models/carousel_panda.jpg
:egg2pg: Flattened 1 nodes.
:egg2pg: Reading /f/Panda3D-1.7.2/samples/Carousel/models/env.egg.pz
:gobj: Loading texture /f/Panda3D-1.7.2/samples/Carousel/models/env_sky.jpg
:gobj: Implicitly rescaling env_sky.jpg from 1200 by 900 to 1024 by 512
:gobj: Loading texture /f/Panda3D-1.7.2/samples/Carousel/models/env_ground.jpg
:egg2pg: Flattened 1 nodes.
Generating Tut-Carousel.p3d

At the end when I run Tut-Carousel.p3d it plays.

F:\Panda3D-1.7.2.Work>which panda3dw
/cygdrive/f/Program Files/Panda3D/panda3dw

F:\Panda3D-1.7.2.Work>panda3dw Tut-Carousel.p3d (it plays)