[Solved] Problem loading a model

When I try to load a .egg model I made in 3ds max 2009.

Fist I made a simple plane (not the thing that fly) then I put a texture on it. Then I followed the tutorial on how to export. So far it worked. Then I tried to load it in my program I got this error:

Error:

Loading planetest.egg
:gobj<error> Texture::read() - couldn't read: ../Documents/3dsmax/sceneassets/images/BrickSmallNew0080_thumbhuge.jpg
:gobj<error> Unable to find texture "../Docments/3dsmax/sceneassets/images/BrickSmallNew0080_thumbhuge.jpg" on model-path /c/Program Files (x86)/Panda3D-1.6.2/etc/../;/c/Program Files (x86)/Panda3D-1.6.2/etc/../models:util<error>: Could not open cache file: /c/Program Files (x86)/Panda3D-1.6.2/etc/../modelcache/3452c2ca99c52b9824e236b059d19c29.2436.1.tmp
:util<error>: Could not write to Bam Cache. Disabling future attempts.

Please help :slight_smile:

Hi, the texture you use on your model should be located in the panda model-path folders, for example ‘models’
and that file should be used in the 3dsmax material.

Panda can’t load the file now because you have placed it outside (/Documents/3dsmax/sceneassets/images/BrickSmallNew0080_thumbhuge.jpg )

Now I tried this:

  1. Placed the texture in panda/model folder.
  2. Made a plane in 3ds max and saved it in the panda/model folder.
  3. Painted the plane with the texture.
  4. Exported the model.
  5. Placed the .egg file in the panda/model folder.

Still same error…

Hmm, error log please :wink:

Error:

Loading planetest.egg
:loader<error>: Couldn't load file planetest.egg: not found on model path <currently: "/c/Program Files <x86>/Panda3D-1.6.2/etc/..;/c/Program Files <x86>/Panda3D-1.6.2/etc/../models")
Unable to load planetest.egg
Assertion failed: !is_empty() at line 1040 of panda/src/pgraph/nodePath.cxx
:util<error>: Could not open index file: /c/Program Files <x86>/Panda3D-1.6.2/etc/../modelcache/index-880b8a.boo
:util<error>: Could not write to the Bam Cache. Disabling future attempts.

Before when I exported the model and the Panda Viewer come there was also a error. But when i exported the model to the desktop there was no error and I can see the model. But when I place it in panda/model and try to load it with my code I get this error:

Loading planetest.egg
:util<error>: Could not open cache file: /c/Program Files <x86>/Panda3D-1.6.2/etc/../modelcahce/3452c2ca99c52b9824e236b059d19c29.4420.1.tmp
:util<error>: Could not write to the Bam Cache. Disabling future attempts.

It looks like you have some troubles with the panda-paths (in Config.prc)
At first, I think panda doesn’t like to be anywhere then C:\Panda3D-1.6.2

Second:
Could not open cache file: /c/Program Files /Panda3D-1.6.2/etc/…/modelcahce

What path is that ?? you need c/Program Files /Panda3D-1.6.2/models

This is part of my Config.prc:
model-path $MAIN_DIR
model-path $THIS_PRC_DIR/…
model-path $THIS_PRC_DIR/…/models

Previously, the eggloader was able to load the .egg file, but not able to load the textures.
Now it can’t find the model as well.

and modelcahce should be spelled modelcache…
Maybe reinstall panda ?

Finaly got it working. I had to reinstall it on the path C:\Panda3D-1.6.2 .