Page 1 of 1

My textures won't show, why?

PostPosted: Sun Oct 02, 2016 15:45
by drpeppercan
.
.
First I was getting this black mesh:

Image

With this script:
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
minetest.register_node ("poster:nellys_poster",
   {drawtype = "mesh",
   mesh = "nellys_poster01.b3d",
    description = "Nelly's poster",
    inventory_image = "nellys_invimg.png",
   tile_images = {"white_128.png",
      "white_128.png",
      "white_128.png",
      "white_128.png",
      "white_128.png",
      "poster_nellys_friends_front02.png"},
   groups = {oddly_breakable_by_hand=2},
})


Then I replaced "tile_images =" with "tiles ="
That's when the mesh stopped showing :(
And even after putting it the way it was before, the mesh is still not showing

Help please!.
Image

Re: My textures won't show, why?

PostPosted: Sun Oct 02, 2016 16:35
by kaadmy
You need to unwrap the texture in the model editor you're using, by default the texture coordinates are at 0,0 which will be transparent if the image has the upper-left most pixel transparent.

Re: My textures won't show, why?

PostPosted: Sun Oct 02, 2016 19:13
by qwertymine3
From the looks of the item in your hand, it seems that you did texture it correctly.

I think that it is being lit with the brightness of the inside of the node, which is 0.

You should try adding paramtype = "light" (and optionally sunlight_propagates = "true") to your node def.

Re: My textures won't show, why?

PostPosted: Sun Oct 02, 2016 21:01
by drpeppercan
qwertymine3,
Thank you so much, I knew I was missing something while creating the material in Blender. I had totally skipped unwrapping the mesh, silly me!

Ok, so I just learned that using one texture and assigning only part of it (a quarter) to one face of the box, and the rest of the texture to the rest of the box, is not supported (I think).

Image

Image

Image

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
minetest.register_node ("poster:nellys_poster",
   {drawtype = "mesh",
   mesh = "nellys_poster02a.b3d",
    description = "Nelly's poster",
    inventory_image = "nellys_invimg.png",
    paramtype = "light",
    sunlight_propagates = "true",
   tile_images = {
      "nellys_friends_256px.png"},
   groups = {oddly_breakable_by_hand=2},
})

----------------------------------------------------------------------------------------------------------

Update:

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
minetest.register_node ("poster:nellys_poster",
   {drawtype = "mesh",
   mesh = "nellys_poster02a.b3d",
    description = "Nelly's poster",
    inventory_image = "nellys_invimg.png",
    paramtype = "light",
    sunlight_propagates = "true",
   tile_images = {"poster_white_up.png",
      "poster_white_down.png",
      "poster_white_right.png",
      "poster_white_left.png",
      "poster_white_back.png",
      "poster_friends_front.png"},
   groups = {oddly_breakable_by_hand=2},
})


I went back to a PNG file per side of the box.
Problem is everything is white, and the photo is nowhere in sight. Not even under or on the top.

Image

Re: My textures won't show, why?

PostPosted: Tue Oct 04, 2016 21:48
by drpeppercan
Mmm, this must be tougher than I thought! : (

Any pointers will be GREATLY APPRECIATED, ANY AT ALL ; )

DPC