I am new to Panda but have been scripting in Python for a few years.
I am following tutorials and have had no problems until I started making my own textures and height fields. I want to use relative paths but Panda always returns the same error:
:grutil(error): Failed to load heightfield image assets/heightmap!
:grutil(error): No valid heightfield image has been set!
I am using forward slashes in the latest stable release of Panda (1.7x). When I have done tutorials using models in the standard Panda install, it works .g.:
self.environ = self.loader.loadModel(“models/environment”)
But when I create my own textures I get an error. I have tried chdir. I have tried relative paths (dotted). I have tried full paths with forward slashes. My python script and the images on on my D drive - does Panda only honour the C drive? Does Panda not like PNG files? I have used file to
loader.loadModel() searches along the model-path. What is your model-path set to? Does it include the root directory of your models tree? You can add additional model-path lines in your Config.prc file with something like:
model-path /d/my/models/root
Also, note that it won’t load models from the current directory unless your current directory is on the model-path: