understanding tile_images for blocks

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

understanding tile_images for blocks

by tkerwel » Mon Jan 16, 2012 11:40

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 » Mon Jan 16, 2012 14:42

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 » Mon Jan 16, 2012 14:56

@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 » Mon Jan 16, 2012 15:25

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 » Mon Jan 16, 2012 15:40

=> 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 » Mon Jan 16, 2012 15:42

<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 » Mon Jan 16, 2012 15:49

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 » Mon Jan 16, 2012 15:57

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 » Mon Jan 16, 2012 15:59

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

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

by Jordach » Mon Jan 16, 2012 16:11

nope it could be burnings video!
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

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

by tkerwel » Mon Jan 16, 2012 17:56

@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. ++++
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 3 guests