Page 1 of 1

Textures not appearing on all meshes

PostPosted: Sun Aug 10, 2014 17:08
by JKMurray
So here's the thing: I created a cow. In Blender, with animations. In Minetest version 0.4.7 it worked like a charm, the cow had skin all over his body.

Now I'm using version 0.4.10 and something weird happens. The cow is exported to a DirectX file (.x), and only the first mesh (the body) has a texture. The head and legs don't have a texture, they're just white. If I change the order in de .x-file, for example: put the block which draws the head first, then the body, the head gets drawn and the other parts are white. When I use that .x-file and open it in version 0.4.7 it still works.

Is there someone who can point me into the right direction? I've been searching all over the place, but I can't get it working.

Thanks in advance,

JKMurray

Re: Textures not appearing on all meshes

PostPosted: Sun Aug 10, 2014 18:40
by rubenwardy
Try a format other than .x
I suggest b3d.

Re: Textures not appearing on all meshes

PostPosted: Sun Aug 10, 2014 19:32
by JKMurray
Allright. I'll have to get an older version of Blender then. Thanks, I'll try.

Re: Textures not appearing on all meshes

PostPosted: Mon Aug 11, 2014 15:17
by Evergreen
rubenwardy wrote:Try a format other than .x
I suggest b3d.

How does one export to b3d from blender? (latest version)

Re: Textures not appearing on all meshes

PostPosted: Mon Aug 11, 2014 15:19
by JKMurray
Evergreen wrote:
rubenwardy wrote:Try a format other than .x
I suggest b3d.

How does one export to b3d from blender? (latest version)


Well, there's a problem indeed. I couldn't find an exporter for the latest version. The one I found was for version 2.45, but still was buggy.

Re: Textures not appearing on all meshes

PostPosted: Mon Aug 11, 2014 17:01
by rubenwardy
Have you enabled the plugin?

Re: Textures not appearing on all meshes

PostPosted: Mon Aug 11, 2014 17:07
by JKMurray
rubenwardy wrote:Have you enabled the plugin?


I can't . It doesn't show up in the import/export-list (or any other one).

Re: Textures not appearing on all meshes

PostPosted: Mon Aug 11, 2014 17:46
by Evergreen
rubenwardy wrote:Have you enabled the plugin?

What plugin? It doesn't show up in the list of addons.

Re: Textures not appearing on all meshes

PostPosted: Mon Aug 11, 2014 18:01
by stu
JKMurray wrote:When I use that .x-file and open it in version 0.4.7 it still works.


It sounds like your directx model is exporting multiple materials while you are
only supplying a texture for the first. This would explain why it works in 0.4.7
because multiple material support was not working properly before 0.4.8

You can either fix the model so that it only exports one material or supply the
missing textures in your mod.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
object:set_properties({textures={"texture1.png", "texture2.png"}})

Re: Textures not appearing on all meshes

PostPosted: Wed Aug 13, 2014 19:27
by JKMurray
stu wrote:
JKMurray wrote:When I use that .x-file and open it in version 0.4.7 it still works.


It sounds like your directx model is exporting multiple materials while you are
only supplying a texture for the first. This would explain why it works in 0.4.7
because multiple material support was not working properly before 0.4.8

You can either fix the model so that it only exports one material or supply the
missing textures in your mod.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
object:set_properties({textures={"texture1.png", "texture2.png"}})


You sir, gave life back to Clucky and Betsy. Thank you very much!

Re: Textures not appearing on all meshes

PostPosted: Wed Aug 13, 2014 20:39
by stu
JKMurray wrote:You sir, gave life back to Clucky and Betsy. Thank you very much!


I am very glad to hear that, after all it was me that got those fixes pushed.
However, if you are planning on releasing Clucky and Betsy as a mod then the suggestion to convert
to .b3d was a good one as you'll get a much smaller filesize. On the other hand, if this is purely
for your own singleplayer game then there is very little to gain.

Evergreen wrote:
rubenwardy wrote:Have you enabled the plugin?

What plugin? It doesn't show up in the list of addons.


Search for the Gandalf b3d exporter, I think that is what I am using for Blender 2.71

Re: Textures not appearing on all meshes

PostPosted: Wed Aug 13, 2014 20:45
by JKMurray
stu wrote:I am very glad to hear that, after all it was me that got those fixes pushed.
However, if you are planning on releasing Clucky and Betsy as a mod then the suggestion to convert
to .b3d was a good one as you'll get a much smaller filesize. On the other hand, if this is purely
for your own singleplayer game then there is very little to gain.


I've been looking into that. I'll try the exporter you suggested.

By the way, here are the animals up and running http://youtu.be/_wIIPWlXH5M.