09th / YABEE

Export models from the Blender to Panda3D game engine
MIT License
107 stars 39 forks source link

"Face textures" option doesn't work as intended #6

Closed ghost closed 9 years ago

ghost commented 9 years ago

When creating a large level in blender, sometimes it is impractical to assign a new Material for each different texture because you use so many different ones throughout the level.

For this case, blender has a material option called "Face Textures": http://www.homeofjones.de/temp/facetextures.png When enabled, the texture is simply picked up from the UV assigned texture instead, which means that the Material itself has no texture assigned (or that assignment is simply ignored) but it shows up textured anyway as long as you chose a texture during UV mapping.

With this option, it is possible to use just one or a few materials while still having lots of textures which can save a lot of time because you don't need to create & assign a new material each time you want to use a different texture.


When exporting using blender's .OBJ exporter, this exports as intended. The exporter creates a new "sub material" for each different UV texture used together with a specific material, and assigns it the according texture.

However, YABEE doesn't seem to do this. While it doesn't hurt much for smaller models (like humanoids or small items), it is really bugging me for larger levels I create in blender. Any chance that support for this could be added?

ghost commented 9 years ago

I forgot, here is a model demonstrating the issue: http://www.homeofjones.de/temp/apartmentpacked.blend (it is untextured in some part, but the inner rooms should be textured)

Export to .obj and open the resulting .mtl plain text file to see how it handles the materials and splits them up nicely per texture - that is the behavior that would be awesome to have in YABEE as well (which exports just a fully plain untextured thing as of now).

09th commented 9 years ago

Oh, I really didn't know about this feature. I think I can add this in the few nearest hours.

09th commented 9 years ago

Ok, changes pushed, you can try it.

ghost commented 9 years ago

Wow just tested it, seems to work nicely :-) thanks a lot!