understanding tile_images for blocks

Post Reply
User avatar
tkerwel
Member
Posts: 213
Joined: Fri Jan 13, 2012 07:35

understanding tile_images for blocks

by tkerwel » Post

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
Last edited by tkerwel on Mon Jan 16, 2012 12:28, edited 1 time in total.
++++ Kung walang tiyaga, walang nilaga. ++++

kahrl
Member
Posts: 236
Joined: Fri Sep 02, 2011 07:51
Location: Rös̓̇chenhof

by kahrl » Post

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.
Last edited by kahrl on Mon Jan 16, 2012 18:17, edited 1 time in total.

User avatar
tkerwel
Member
Posts: 213
Joined: Fri Jan 13, 2012 07:35

by tkerwel » Post

@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...
++++ Kung walang tiyaga, walang nilaga. ++++

kahrl
Member
Posts: 236
Joined: Fri Sep 02, 2011 07:51
Location: Rös̓̇chenhof

by kahrl » Post

Oh, you have to set paramtype = "light", otherwise an "allfaces" node will be all black.

EDIT: both in register_node
Last edited by kahrl on Mon Jan 16, 2012 15:26, edited 1 time in total.

User avatar
tkerwel
Member
Posts: 213
Joined: Fri Jan 13, 2012 07:35

by tkerwel » Post

=> 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..
++++ Kung walang tiyaga, walang nilaga. ++++

User avatar
RAPHAEL
Member
Posts: 627
Joined: Tue Nov 01, 2011 09:09
Location: Earth

by RAPHAEL » Post

<Pays attention to this thread since he is interested in doing similar things....>
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)

kahrl
Member
Posts: 236
Joined: Fri Sep 02, 2011 07:51
Location: Rös̓̇chenhof

by kahrl » Post

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).
Last edited by kahrl on Mon Jan 16, 2012 15:51, edited 1 time in total.

User avatar
tkerwel
Member
Posts: 213
Joined: Fri Jan 13, 2012 07:35

by tkerwel » Post

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 ?
++++ Kung walang tiyaga, walang nilaga. ++++

User avatar
Hackeridze
Member
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Post

Use "glasslike" drawtype.
My game: RTMG
GENTOO USER

Jordach
Member
Posts: 4534
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

nope it could be burnings video!

User avatar
tkerwel
Member
Posts: 213
Joined: Fri Jan 13, 2012 07:35

by tkerwel » Post

@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..
Last edited by tkerwel on Tue Jan 17, 2012 07:19, edited 1 time in total.
++++ Kung walang tiyaga, walang nilaga. ++++

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests