Page 1 of 1

understanding tile_images for blocks

PostPosted: Mon Jan 16, 2012 11:40
by tkerwel
once again it's me ;-)

when i register a node (block) for a minetest mod i can set for every side of the cube a image

=> tiles_images (top ,ground, back,front, right, left) thats easy to find out.

is there a source i can read abt the other parameters ?

for example what's the purpose of
is_ground_content =true/false

second: whats abt the Transparency of the cube images? it only shows the front view of the image to the cube. so when i have a half cube i can see that from the front as half cube, when i look from the back i cant see anything as i would look thru air...

is there a workaround to solve such problem. if yes, that would be a good way to create easy furniture or other 3-d like things in minetest.

edit

a picture for better understandig

Image

or whats worse
Image

PostPosted: Mon Jan 16, 2012 14:42
by kahrl
tkerwel wrote:once again it's me ;-)

when i register a node (block) for a minetest mod i can set for every side of the cube a image

=> tiles_images (top ,ground, back,front, right, left) thats easy to find out.

is there a source i can read abt the other parameters ?

I don't know if it's already documented anywhere outside the source, sorry. But look at the comments around here.

tkerwel wrote:for example what's the purpose of
is_ground_content =true/false

It's only used by the terrain generator. (apparently, it's currently used to place junglegrass). If your node is not one of the nodes generated by the C++ mapgen (air, stone, ores, mese, dirt, gravel, sand, clay, grass, tree, jungletree, leaves, junglegrass, apple, papyrus, cactus, cobble, mossy cobble, water, lava), is_ground_content is ignored.

tkerwel wrote:second: whats abt the Transparency of the cube images? it only shows the front view of the image to the cube. so when i have a half cube i can see that from the front as half cube, when i look from the back i cant see anything as i would look thru air...

is there a workaround to solve such problem. if yes, that would be a good way to create easy furniture or other 3-d like things in minetest.
[snip]

For the second screenshot, try drawtype = "allfaces".

For the first screenshot, I've made a patch that allows nodes to be made of actual smaller boxes. I used that for stairs and half blocks, but your table would be possible too. I'll try to get the patch ready for inclusion soon.

PostPosted: Mon Jan 16, 2012 14:56
by tkerwel
@kahrl

thx for the info...where i can finde some more documentation

when i use => drawtype = "allfaces" in the register node

minetest.register_node("deko:deko_desk",{
tile_images = {"deko_desk_top.png","","deko_desk.png","deko_desk.png","deko_desk.png","deko_desk.png"},
inventory_image = minetest.inventorycube("deko_desk.png"),
drawtype = "allfaces",
is_ground_content = true,
material = minetest.digprop_glasslike(5.0),

i only have a dark, black cube...

when i use that in the minetest.conf nothing change ...



by the way halfblocks would be great, maybe there is even a way for slopes...

PostPosted: Mon Jan 16, 2012 15:25
by kahrl
Oh, you have to set paramtype = "light", otherwise an "allfaces" node will be all black.

EDIT: both in register_node

PostPosted: Mon Jan 16, 2012 15:40
by tkerwel
=> in register_node

minetest.register_node("deko:deko_desk",{
tile_images = {"deko_desk_top.png","","deko_desk.png","deko_desk.png","deko_desk.png","deko_desk.png"},
inventory_image = minetest.inventorycube("deko_desk.png"),
paramtype = "light",
drawtype ="allfaces",
is_ground_content = true,
material = minetest.digprop_glasslike(5.0),

result still =>

Image

when

minetest.register_node("deko:deko_desk",{
tile_images = {"deko_desk_top.png","","deko_desk.png","deko_desk.png","deko_desk.png","deko_desk.png"},
inventory_image = minetest.inventorycube("deko_desk.png"),
-- paramtype = "light",
-- drawtype ="allfaces",
is_ground_content = true,
material = minetest.digprop_glasslike(5.0),

result =>

Image

i guess i have to read the documention and try to understand first the parameter otherwiese it's just guess and try in the moment....

at least i am already able to make new textures and lamps ....not bad for the first day and an old man hahaha..

PostPosted: Mon Jan 16, 2012 15:42
by RAPHAEL
<Pays attention to this thread since he is interested in doing similar things....>

PostPosted: Mon Jan 16, 2012 15:49
by kahrl
Have you tried replacing the block after the paramtype changes?

EDIT: I'm sorry, forgot that allfaces will not work in your case, since it only supports one texture for all sides (it was designed for transparent leaves).

PostPosted: Mon Jan 16, 2012 15:57
by tkerwel
jeppp......

but there must be a way, cause its working with the fences...

maybe i will when i have time look into the code and try to figure out how the fences work's

as i can see all the other mods are always have a flat image for flowers, ropes etc...

or is there an 3-d like block, item in some mod already ?

PostPosted: Mon Jan 16, 2012 15:59
by Hackeridze
Use "glasslike" drawtype.

PostPosted: Mon Jan 16, 2012 16:11
by Jordach
nope it could be burnings video!

PostPosted: Mon Jan 16, 2012 17:56
by tkerwel
@Jordach

yes it's running in this video mod..

edit: just to keep you guys on the track.....

=> Update 2012/01/17 (early morning)

i try with openGL 1.4 video mod, its the same result. will check later the glasslike posibility...

=> Update 2012/01/17 (early morning a bit later *gg*)

the drawtype ="glasslike" in the minetest.register_node dont work not in burning video or openGL

funny is, that then i have a solid woodblock again..