Sudden Texture Path Error

Ok, I’ve been working on this game for a while now and had no “can’t find texture path” errors until now.

I have my Actors in on folder along the game path and I have my Texture Mats in another folder along the game path (absolute path).

I thought the path you load a texture from (Blender), will automatically be the path P3D will load the texture from, regardless of where the Model using the texture was loaded from.

Up until now, this has been true. My Actor loaded from its on folder and the Texture Mat loaded from its own folder.

For some unknown reason, I am now getting an error that is pretty much a texture path error,

But why now?

Obviously I missed something…

But what?

I know a lot of P3D users are probably putting textures in the Path of the Model, but I really do want to keep the Actors and textures in their own folder. This makes the entire “game data pipeline” cleaner.

Is there something I need to do in Blender before I export?

What’s even more strange is the fact the error message (which is a lot) is showing me that the Engine is trying to look in P3D’s default model roots, but I use absolute pathing for models and textures (working directory).

You’d have to show us the exact error messages for us to be able to tell what’s going wrong.

The only problem with that is the fact I’m not getting the error message anymore, but my Actor texture is not loading. The Actor is all grey (no texture).

Is P3D design as a must have Models and textures in the same folder?

Is so, then I should create a texture (code), assign it the original texture file and just set the texture to the model/actor…?

Of course if the Model/Actor is multi-textured…that can be a problem I guess.

This may be because the model is cached in the model-cache. Please clear the model-cache directory (or disable it in Config.prc by putting “model-cache-dir” on an empty line), and try again to trigger the error message.

Panda3D does not require the models and textures to be in the same directory, this depends on how your models reference your textures. It may be helpful to edit the .egg file with a text editor, and showing the texture paths in the entries, and whether they are relative or absolute paths.

I re-exported the model to re-create the error -

:gobj(error): Texture::read() - couldn't read: ./../.._tmats/f/f_1a.jpg

:gobj(error): Unable to find texture "./../.._tmats/f/f_1a.jpg" on model-path /c/gamedata;/c/Panda3D-1.7.0/etc/..;/c/Panda3D-1.7.0/etc/../models

From the looks of that, P3D is setup to look for textures on the Model’s path, so I guess I should really create my textures on the fly and place them on the models.

If I have a multi-textured model, that can’t be helped with texture stages, then I guess I have no choice but to put those textures in the model’s path.

Ok, fixed the issue. :smiley:

I took a look inside the egg file and got rid of all those /…/ by inserting the actual path. Of course I left the ./ at the beginning of the path, which would be the working directory.

I just wonder why none of my other models had this issue?