[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4866: Undefined array key "database_gc"
FOSS gamedev and creative worlds • View topic - node box and different textures?
Page 1 of 1

node box and different textures?

PostPosted: Tue Jul 17, 2012 06:18
by tkerwel
as i play in the moment with the posibilitys of the node box, i get to the point where i ask my self, is it possible to use more then one texture in a node box?

somebody knows abt this ? would be nice if you can create a node box model with different textures, that would realy blow up minetest and offers a lot of new creations. as far as i remember that would be even a point wich is not possible in minecraft.

so anybody can answer this question ?

PostPosted: Tue Jul 17, 2012 06:31
by SegFault22
textures with node-boxes are based on the faces of the figure that face a certain way. The textures for the figure are defined the same as any other block, so if you make a tree block with nodeboxes, the texture facing the X axis is the same on all faces facing the X axis, and so on for all directions in 3D space. So, yesh, you can have different textures, but if you want to use different textures for the same faces that point the same way, you will have to make a single texture for the faces facing that way.

PostPosted: Tue Jul 17, 2012 06:51
by tkerwel
can you give an simple example ?

lets think abt a simple table...

the texture is set with the tiles =tiles = {"default_wood.png"}, and this works for both lines in the node box.
so how can i change that one line use "default wood", the other let say "default stone"
can you explain this in this simple example ?


minetest.register_node("test:table", {
description = "test table",
drawtype = "nodebox",
tiles = {"default_wood.png"},
inventory_image = "default_wood.png",
paramtype = "light",
paramtype2 = "facedir",
walkable = true,
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
node_box = {
type = "fixed",
fixed = {
{-0.1,-0.5, -0.1, 0.1, 0.5 ,0.1},
{-0.5, 0.5, -0.5, 0.5, 0.4, 0.5},
}
},
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=3,flammable=2},
})

PostPosted: Tue Jul 17, 2012 07:31
by tkerwel
just to make sure that i dont want something like this here:

Image

it is not a question how i can get different texture to the side's of a node box which i can define with the

tiles= {......}

i am talking abt the smaler unit's in the node box itself....

node_box = {
type = "fixed",
fixed = {
{-0.1,-0.5, -0.1, 0.1, 0.5 ,0.1}, => use for this one texture
{-0.5, 0.5, -0.5, 0.5, 0.4, 0.5}, => use here an other texture
}
},


so ist this possible in minetest or not ?

PostPosted: Tue Jul 17, 2012 13:20
by VanessaE
At present, this is not possible. If you draw your textures carefully enough, you can fake it of course. The 3d torches in the "3dforniture" mod are like that.

PostPosted: Tue Jul 17, 2012 13:28
by tkerwel
thx VanessaE for the answer.

PostPosted: Wed Jul 18, 2012 01:07
by tonyka
indeed this is a big problem to build complex things nodeboxes ...
Another problem I've had is that the upper and lower textures not rotate with the model.
I think, ideally, it would be to somehow, put multiple nodeboxes, sharing the exact same point in the map, which can create the different parts of your model separately,

if anyone can do this, I swear that became my second god, after David Bowie, the Nº 1

PostPosted: Wed Jul 18, 2012 06:30
by tkerwel
@tonyka
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
Another problem I've had is that the upper and lower textures not rotate with the model.


god heaven, thx for this info. i already get mad last night, as i thought i make a mistake. finaly i went to bed with a bad feeling cause i could not figure out what i was doing wrong.

anybody already report this mistake? what ever i do, as soon as i use facedir and a nodebox, the nodbox is pointing to the facedir direction, the texture not.


Image

this is a bed table, i put it 2times down, one time from the front, then from the left side. now the node box is rotating, as you can see with the gab between below box and above box, but the front door still shows the same direction.

this mistake makes it hard in the moment to create nodebox models, only solution would be to create 4 diffenent versions for the directions refer to the facedir....

maybe this can be fixed fast in the maincode of minetest? i dont know abt his, cause my coding is not good enough to understand this fully.

PostPosted: Wed Jul 18, 2012 06:52
by VanessaE
I filed a bug report about this a few weeks ago:

https://github.com/celeron55/minetest/issues/140

PostPosted: Wed Jul 18, 2012 06:58
by tkerwel
VanessaE wrote:I filed a bug report about this a few weeks ago:

https://github.com/celeron55/minetest/issues/140



mercie thank you danke schön.... ;-)

any idea if that can be fixed or someone is working on that already?