Exported blender file to egg - no texture in game

As the title says, my model has a white color when exported to egg and loaded in to the game with loadModel. How do I fix this?

For textures to work they need to be uv mapped with an actual file on the disk that panda can load (I invariably use .png files.), and you need some lighting. What happens when you load the model in pview and hit ‘l’ to switch on lighting? - if that fixes it then you forgot lights, otherwise your model is setup in some way wrong.

Thanks. It has to do with the lights. But, how do I fix that?

Add some! - the manual has a section on how. By default there is no light, so it reverts to flat shading, which doesn’t include textures.

For some reason i dont to need to add lights to see textures.

Yeah - its a situation I don’t understand. Sometimes they are there, sometimes they are not. I just stick to always adding lights as I know that works!

to fix a small mistake.
textures dont need lights. materials do.
textures can work fine even without materials (for gloss effects etc you need light and material,thought)

a texture needs: UV-map, correctly assigned to the model, and the texture file must exist (in the path specified in the egg file, or in one of panda’s default-search pathes for textures.

in blender you have 2 possible ways to asign a texture.
either directly in the uv-editor.
or using the material editor (you need to set the input-mode to UV. and of course select the image in the material-image tab)

Judging from what Thomas said, i should be able to export materials without baking them first? Because once i bake them, they are not materials anymore…

to fix more confusions. materials are not the same as automated-texture-generation-plugins used in blender. later ones needs to be baked into texture-images first