Blender export has no texture and is oriented backwards

What it sounds like. I have a terrain texture that works just fine, but the imported actor model has none despite being UV mapped in blender. I’ve tried adding a point light, which doesn’t affect anything besides creating shade.

I’m definitely missing some fairly obvious setup step, but I can’t seem to find what it is in any other forum posts-like I said, light doesn’t do anything. C’est la vie I guess XD

And oriented backwards-the obvious solution is to change the orientation in blender so the back is in the front, I’m just curious what anyone might say :smiley:

Regarding the actor-texture, how is the image being applied in Blender? And are you using YABEE to export the model, or something else?

Are you perhaps applying your texture via Blender’s “UV/Image Editor”? (As opposed to applying it via a material that is in turn applied to the model.) If so, and if you’re using YABEE, then that may be the problem: I don’t think that YABEE (in recent versions) exports textures applied via the “UV/Image Editor”.

As to the object being oriented backwards, I know that I’ve ended up modelling objects “backwards” myself.

I think that, when viewed from Blender’s “front” perspective, the model should be pointing “away” from you–that is, showing its back to you. This orients it such that it’s facing along its positive y-axis, which I think is generally the “forward” direction in Panda. I may be mistaken, however!

I am exporting with YABEE using the UV editor, so then it looks like the next step is to apply via material instead. Or is there a way to apply textures via code in Panda?

There is! If I recall correctly, you can just call “myModelOrActorNodePath.setTexture(myTexture)”, where “myTexture” is a Texture object. Textures can be loaded via “loader.loadTexture([filename])”.

There is a caveat: By default, a texture loaded in this way won’t have mip-mapping enabled, if I’m not much mistaken. If you want mip-mapping in such a texture, you can either specify that when loading the texture, or change your “config.prc” file to have Panda default to mip-mapping. (Note that the latter may not be a good idea in all cases–you might not want mip-mapping for a texture that’s simply placed on the screen, rather than applied to a model, for example.)

However, if you just want to quickly apply a texture for testing purposes, then simply loading it and applying it via “setTexture” should, I think, work well enough!

Yup, that got it! Thanks very much :slight_smile: