Basic node_box model examples

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

by tkerwel » Tue Jul 24, 2012 10:31

@cactuz_pl

thx to you i got now nice column for my greek/roman temple ...

Image

hmmm did i not mention today already, that i realy like your posts.....
++++ Kung walang tiyaga, walang nilaga. ++++
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Fri Jul 27, 2012 13:56

cactuz_pl wrote:LCD monitor model:
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
node_box = {
        type = "fixed",
        fixed = {
            {-2.5136044e-2,-0.45259861,-1.0000000e-1, 2.4863956e-2,-2.5986075e-3,0.10000000},
            {0.13023723,-0.25615262,-0.40006064, 0.16023723,0.26767738,-0.37006064},
            {0.13023723,-0.25615274,0.37054221, 0.16023723,0.26767750,0.40054221},
            {0.13023723,-0.30600000,-0.40000000, 0.16023723,-0.25600000,0.40000000},
            {0.12945597,0.26433021,-0.40000000, 0.15945597,0.29433021,0.40000000},
            {2.9045502e-2,-0.25514168,-0.35000000, 7.9045502e-2,0.24485832,0.35000000},
            {8.0237234e-2,-0.30617002,-0.40000000, 0.13023723,0.29382998,0.40000000},
            {-0.25000000,-0.50000000,-0.25000000, 0.25000000,-0.45000000,0.25000000}
        },
    },

Feel free to use these data in your mod.



Thanks! I used this in my craft guide mod. I changed it so that it was facing towards you (had to swap x and z, then z*-1).

Works a treat in 3 directions, but the 4th it glitches.

In any case, really nice work!
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Mon Jul 30, 2012 11:56

Please sticky this thread :-) very handy
"Fuck the hat." - Paulie Gualtieri
 

User avatar
cactuz_pl
Member
 
Posts: 874
Joined: Tue Jun 05, 2012 16:34

by cactuz_pl » Mon Jul 30, 2012 18:10

If someone have special request on model, please post it here. I will try help as I can.
Nope
 

User avatar
mauvebic
Member
 
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Mon Jul 30, 2012 18:39

various light fixtures if possible, not crazy about signlike/plantlike nodes generating light lol
Last edited by mauvebic on Mon Jul 30, 2012 19:13, edited 1 time in total.
"Fuck the hat." - Paulie Gualtieri
 

User avatar
cactuz_pl
Member
 
Posts: 874
Joined: Tue Jun 05, 2012 16:34

by cactuz_pl » Tue Jul 31, 2012 09:48

Light fixtures (5):
Lamp1:
Image

Lamp2:
Image

Lamp3:
Image

Lamp4:
Image

Lamp5:
Image

Download: .wings and .obj files

How to convert obj to minetest format? > 6th post of this topic.

8 lines starting on "v" are one cuboid (8 vertices), coordinates of cuboid in minetest lua files = 2 vertices {5th line, 3rd line}, .

If you have special wishes about light fixtures, post photos.

Feel free to use these data in your mod.
Last edited by cactuz_pl on Tue Jul 31, 2012 09:51, edited 1 time in total.
Nope
 

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

by tkerwel » Wed Aug 01, 2012 10:43

the last days i played a lot with mathemathic functions (cause my son in school doing it....)

so i am surpriesed that minetest can be used as a 3D Ploter for math functions .... a new pupose hahaha...

so whats this to do with node_boxes ? a lot, cause a node_box is a cube in 3D and we can adress all points inside this cube. if we know a math function like y=m*x+n we can put values into the node box and get a visual view of this function.

lets explane this with a little example. we need a slope ? okay this can be done easy with the function i already mention above. lets say it should be a slope witch have have the high side left and the low side on the right side

x
xx
xxx like this..... the math function is for this y=-1 *x

so how looks the code ?
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
1. local node_box_slope ={} -- a array for the node_box
2. local detail =0.1                 -- detail level for the node_box ATTENTION to high values cause a meshbuffer overflow
3. for k =-0.5, 0.5, detail do   -- the shape of the node_box a cube from -0.5, -0.5, -0.5 to 0.5, 0.5, 0.5
4.       i= i +1                           --  array number count
5.       px = k                           -- k is the count for the px axis
6.       pz = 0                           -- as no change is needed on the z axis always from -0.5 to 0.5 this is zero as placeholder
7.       py = -1* k                     --  here out the math function you like for the gradient of the slope
8.       node_box_slope[i] ={ px, py, -0.5 ,              px+detail,    -0.5  , 0.5 }
9.  end
10. i=0

well now the whole box is in the array we just have now to put it into the world with the usual minetest.register_node function of minetest.

node_box = {
type = "fixed",
fixed = node_box_slope_corner,
},

Image

thats all an.... now we defined with a math fuction a left to right to left gradient slope
Last edited by tkerwel on Wed Aug 01, 2012 10:46, edited 1 time in total.
++++ Kung walang tiyaga, walang nilaga. ++++
 

User avatar
tonyka
Member
 
Posts: 320
Joined: Sat Jun 16, 2012 04:08

by tonyka » Thu Aug 09, 2012 10:43

after making a thousand tests without success, I managed to make my toilet, open and close the lid retaining its situation, is that I had a typo in one of the nodes, the trick to work correctly is to isolate the value assigned to facedir (param2) in a local variable, then apply:

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
local on_my-node_puncher = function (pos, node, puncher)
  if node.name == 'my-mod:my-node-1' then

    --taking the value of facedir
    local dir = node["param2"]

    minetest.env:add_node(pos, {name="my-mod:my-node-2", paramtype2='none', param2=dir})
    nodeupdate(pos)
  elseif node.name == 'my-mod:my-node-2' then

    --taking the value of facedir
    local dir = node["param2"]

    minetest.env:add_node(pos, {name="my-mod:my-node-1", paramtype2='none', param2=dir})
    nodeupdate(pos)
  end
end

minetest.register_on_punchnode(on_my-node_puncher)


so I think doing the same, we can do multi-node objects, have not tried it yet but I'm on it
Last edited by tonyka on Thu Aug 09, 2012 10:45, edited 1 time in total.
My mod: [MOD]3D Forniture 1.0
Download: 3DForniture_v_1.0.zip
Page development (European Castilian):
Moviliario 3D (proyecto 3D Forniture)
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Wed Aug 15, 2012 15:34

With this method you can create nodeboxes with pixels:
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
local box = {
    {-1, -8, -1, 1, 8, 1},
    {-12, -8, -1, 12, -7, 1},
    {-5, -2, -5, 5, 8, 5}
}

local res = 16
for j,list in ipairs(box) do
    for i,int in ipairs(list) do
        list[i] = int/res
    end
    box[j] = list
end

in the node_box you can use:
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
node_box = {
    type = "fixed",
    fixed = box
},
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Fri Nov 02, 2012 13:10

My 3D player mod creates little nodeboxes for each not transparent pixel in the player texture:
https://github.com/PilzAdam/3d_player/blob/master/init.lua
I thought the code might be interesting for someone.
 

Doc
Member
 
Posts: 75
Joined: Sun Nov 04, 2012 00:21

by Doc » Sun Nov 25, 2012 04:47

I am interested in learning about this more. Is it correct that setting tile means that each texture you put in that array goes in the corresponding mesh? Ie, tiles = {"default_wood.png", "default_stone.png"} means that

node_box = {
type = "fixed",
fixed = {
{-2.5136044e-2,-0.45259861,-1.0000000e-1, 2.4863956e-2,-2.5986075e-3,0.10000000}, (this will be wood)
{0.13023723,-0.25615262,-0.40006064, 0.16023723,0.26767738,-0.37006064} (this will be stone)
},
},
Am I correct? I really want to know more about the format of tile and how it corresponds with the node_box definition.

Thanks!
 

User avatar
Menche
Member
 
Posts: 994
Joined: Sat Jul 02, 2011 00:43

by Menche » Sun Nov 25, 2012 08:10

Doc wrote:I am interested in learning about this more. Is it correct that setting tile means that each texture you put in that array goes in the corresponding mesh? Ie, tiles = {"default_wood.png", "default_stone.png"} means that

node_box = {
type = "fixed",
fixed = {
{-2.5136044e-2,-0.45259861,-1.0000000e-1, 2.4863956e-2,-2.5986075e-3,0.10000000}, (this will be wood)
{0.13023723,-0.25615262,-0.40006064, 0.16023723,0.26767738,-0.37006064} (this will be stone)
},
},
Am I correct? I really want to know more about the format of tile and how it corresponds with the node_box definition.

Thanks!

I don't think it's possible yet to texture individual cubes.
An innocent kitten dies every time you top-post.
I am on the Voxelands Forums more often than here.
Try Voxelands (forked from Minetest 0.3) by darkrose
 

markveidemanis
Member
 
Posts: 211
Joined: Thu Sep 27, 2012 15:41

by markveidemanis » Mon Dec 10, 2012 14:11

can someone make a super thin panel that auto adjusts to position aswell as top and bottom
BitCoin: 1Eq4arvykGNa1YC2DbJpWcwGfMvtFGjAoR
 

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

by tkerwel » Mon Dec 10, 2012 15:21

@markveidemanis
what you exactly want ... or what the purpose of a auto adjust panel ? and whats the "trigger" for the adjustment for top or bottom?
normaly you should make to node_boxes, one for top one for bottom. then have a small routine which prove for the trigger and then choose "top" or "bottom"

i think with the examples here and a bit of lua programming this isnt that hard to realize. why you dont try yourself and if you have problems i am sure lots of ppl here will help you. this is always the best way to learn, make your own mistakes ;-)
++++ Kung walang tiyaga, walang nilaga. ++++
 

markveidemanis
Member
 
Posts: 211
Joined: Thu Sep 27, 2012 15:41

by markveidemanis » Mon Dec 10, 2012 16:36

one for the top, one for the bottom and one that auto adjusts to sides, must be quite thin, like hdblocks mod panels.
BitCoin: 1Eq4arvykGNa1YC2DbJpWcwGfMvtFGjAoR
 

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

by tkerwel » Tue Dec 11, 2012 08:21

@markveidemanis

in the first post of this thread you already find a example for a panel with explanation, there are lots of more examples in here so i should be easy to create a panel yourself.

i guess the probleme is not to create a node box for this purpose (in fact you need one for every posibility of aglinment), the main goal is to prove what adjustmet you need before you place your nodebox.

in a lua function you have to check before if every node near the node you want to place is air or notair. and then place a node with a panel to this side (or oposite?).

as i said, why you dont try it yourself ? this is a good way to learn programming and i am sure ppl will help you if you ask.
++++ Kung walang tiyaga, walang nilaga. ++++
 

erlehmann
 

by erlehmann » Sun Jan 20, 2013 20:00

I have made a Lego:

drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5,-0.5,-0.5, 0.5,0.5,0.5},
{-0.4,0.5,-0.4, -0.1,0.6,-0.1},
{0.1,0.5,-0.4, 0.4,0.6,-0.1},
{-0.4,0.5,0.1, -0.1,0.6,0.4},
{0.1,0.5,0.1, 0.4,0.6,0.4},
},
},
 

leetelate
Member
 
Posts: 205
Joined: Thu Aug 29, 2013 18:07

by leetelate » Sun Sep 15, 2013 19:07

thanks for this thread - needed - also flowers mod for the selection box info <3 <3
Image
my nodebox chinese lantern
node_box = {
type = "fixed",
fixed = {
{ -0.1, 0.4, -0.1, 0.1, 0.2, 0.1 }, --topknot

{-0.5, 0.3, -0.5, -0.4, 0.2, -0.4}, --pedestal
{ 0.4, 0.3, -0.5, 0.5, 0.2, -0.4}, --pedestal
{-0.5, 0.3, 0.4, -0.4, 0.2, 0.5}, --pedestal
{ 0.4, 0.3, 0.4, 0.5, 0.2, 0.5}, --pedestal

{-0.1, 0.3, -0.5, 0.1, 0.2, -0.4}, --pedestal
{-0.4, 0.3, -0.1, -0.5, 0.2, 0.1}, --pedestal
{-0.1, 0.3, 0.4, 0.1, 0.2, 0.5}, --pedestal
{ 0.4, 0.3, -0.1, 0.5, 0.2, 0.1}, --pedestal

{ -0.5, 0.2, -0.5, 0.5, 0.1, 0.5 }, --rainshield

{ -0.2, 0.1, -0.2, 0.2, -0.2, 0.2 }, --glowy bit

{ -0.3, -0.2, -0.3, 0.3, -0.4, 0.3 }, --base

{-0.3, -0.5, -0.3, -0.2, -0.4, -0.2}, --pedestal
{ 0.2, -0.5, -0.3, 0.3, -0.4, -0.2}, --pedestal
{-0.3, -0.5, 0.2, -0.2, -0.4, 0.3}, --pedestal
{ 0.2, -0.5, 0.2, 0.3, -0.4, 0.3}, --pedestal

{ -0.5, -0.5, -0.5, 0.5, -0.49, 0.5 }, --dirt
},
},
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 },
},

texture is: (the pink and yellow and stuff is to see if anything is out of place - like if you see pink in the drawn node you have the topknot wrong dimension somehow
Image

and i put the dirt layer in because dirt with grass changes to just dirt so gets covered
Last edited by leetelate on Sun Sep 15, 2013 19:41, edited 1 time in total.
MT IS MC'S SMARTER BROTHER
minetest 0.4.8 compiled from latest git on linux mint 15 with qjoypad and wired 360 controller
freeminer, pilztest, buildcraft and next are the idea factories
my minetest page is http://1337318.zymichost.com if zymic isn't down - meh, it is free...
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

by philipbenr » Mon Sep 16, 2013 00:12

cactuz_pl wrote:Column (three blocks):
Image
Top:
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
node_box = {
        type = "fixed",
        fixed = {
            {-0.2 ,-0.5 ,-0.3, 0.2,0.5 ,-0.2},
            {-0.2 ,-0.5,0.2, 0.2,0.5,0.3},
            {-0.3 ,-0.5 ,-0.2, 0.3,0.5,0.2},
            {-0.5 ,0.4 ,-0.5, 0.5 ,0.5,0.5},
            {-0.4 ,0.3 ,-0.4, 0.4 ,0.4,0.4}       
        },
    },


Middle:
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
node_box = {
        type = "fixed",
        fixed = {
            {-0.2 ,-0.5 ,-0.3, 0.2,0.5 ,-0.2},
            {-0.2 ,-0.5,0.2, 0.2,0.5,0.3},
            {-0.3 ,-0.5 ,-0.2, 0.3,0.5,0.2},       
        },
    },


Bottom:
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
node_box = {
        type = "fixed",
        fixed = {
            {-0.2 ,-0.5 ,-0.3, 0.2,0.5 ,-0.2},
            {-0.2 ,-0.5,0.2, 0.2,0.5,0.3},
            {-0.3 ,-0.5 ,-0.2, 0.3,0.5,0.2},
            {-0.5 ,-0.5 ,-0.5, 0.5 ,-0.4,0.5},
            {-0.4 ,-0.4 ,-0.4, 0.4 ,-0.3,0.4}       
        },
    },


Feel free to use these models in your mod.


I made this already, but cool.

cactuz_pl wrote:Castle/palace window:

Without textures (This is four blocks;2x2, not 1 block):
Image

With stone texture:
Image

Bottom block (This is four blocks;2x2, not 1 block):
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
node_box = {
        type = "fixed",
        fixed = {
            {-2.5000000e-2,-0.42500000,-0.50000000, 2.5000000e-2,-0.37500000,0.50000000},
            {-2.5000000e-2,-0.22500000,-0.50000000, 2.5000000e-2,-0.17500000,0.50000000},
            {-2.5000000e-2,0.37500000,-0.50000000, 2.5000000e-2,0.42500000,0.50000000},
            {-2.5000000e-2,0.17500000,-0.50000000, 2.5000000e-2,0.22500000,0.50000000},
            {-2.5000000e-2,-2.5000000e-2,-0.50000000, 2.5000000e-2,2.5000000e-2,0.50000000},
            {-2.5000000e-2,-0.50000000,-0.42500000, 2.5000000e-2,0.50000000,-0.37500000},
            {-2.5000000e-2,-0.50000000,-0.22500000, 2.5000000e-2,0.50000000,-0.17500000},
            {-2.5000000e-2,-0.50000000,0.37500000, 2.5000000e-2,0.50000000,0.42500000},
            {-2.5000000e-2,-0.50000000,0.17500000, 2.5000000e-2,0.50000000,0.22500000},
            {-2.5000000e-2,-0.50000000,-2.5000000e-2, 2.5000000e-2,0.50000000,2.5000000e-2},
        },
    },


Top block:
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
node_box = {
        type = "fixed",
        fixed = {
            {-2.5000000e-2,-0.42500000,-0.50000000, 2.5000000e-2,-0.37500000,0.50000000},
            {-2.5000000e-2,-0.22500000,-0.50000000, 2.5000000e-2,-0.17500000,0.50000000},
            {-2.5000000e-2,0.37500000,-0.50000000, 2.5000000e-2,0.42500000,0.50000000},
            {-2.5000000e-2,0.17500000,-0.50000000, 2.5000000e-2,0.22500000,0.50000000},
            {-2.5000000e-2,-2.5000000e-2,-0.50000000, 2.5000000e-2,2.5000000e-2,0.50000000},
            {-2.5000000e-2,-0.50000000,-0.42500000, 2.5000000e-2,0.50000000,-0.37500000},
            {-2.5000000e-2,-0.50000000,-0.22500000, 2.5000000e-2,0.50000000,-0.17500000},
            {-2.5000000e-2,-0.50000000,0.37500000, 2.5000000e-2,0.50000000,0.42500000},
            {-2.5000000e-2,-0.50000000,0.17500000, 2.5000000e-2,0.50000000,0.22500000},
            {-2.5000000e-2,-0.50000000,-2.5000000e-2, 2.5000000e-2,0.50000000,2.5000000e-2},
            {-0.50000000,0.15181175,0.15403839, 0.50000000,0.45181175,0.45403839},
            {-0.50000000 ,5.0000000e-2,0.20000000, 0.50000000,0.20000000,0.25000000},
            {-0.50000000,0.20000000,4.5000000e-2, 0.50000000,0.25000000,0.19500000},
            {-0.50000000,0.25000000 ,-5.0000000e-3, 0.50000000,0.30000000,0.19500000},
            {-0.50000000 ,6.9388939e-18,0.25000000, 0.50000000,0.20000000,0.30000000},
            {-0.50000000,-1.0000000e-1,0.30000000, 0.50000000,0.20000000,0.35000000},
            {-0.50000000,0.30000000,-0.10400000, 0.50000000,0.35000000,0.19600000},
            {-0.50000000,0.35000000,-0.20000000, 0.50000000,0.40000000,0.20000000},
            {-0.50000000,-0.20000000,0.35000000, 0.50000000,0.20000000,0.40000000},
            {-0.50000000,-0.30000000,0.40000000, 0.50000000,0.30000000,0.45000000},
            {-0.50000000,0.40000000,-0.30000000, 0.50000000,0.45000000,0.30000000},
            {-0.50000000,0.45003803,-0.50000000, 0.50000000,0.50003803,0.50000000},
            {-0.50000000,-0.50000000,0.45006823, 0.50000000,0.50000000,0.50006823},
            {-2.5000000e-2,-0.42500000,-0.50000000, 2.5000000e-2,-0.37500000,0.50000000},
            {-2.5000000e-2,-0.22500000,-0.50000000, 2.5000000e-2,-0.17500000,0.50000000},
            {-2.5000000e-2,0.37500000,-0.50000000, 2.5000000e-2,0.42500000,0.50000000},
            {-2.5000000e-2,0.17500000,-0.50000000, 2.5000000e-2,0.22500000,0.50000000},
            {-2.5000000e-2,-2.5000000e-2,-0.50000000, 2.5000000e-2,2.5000000e-2,0.50000000},
            {-2.5000000e-2,-0.50000000,-0.42500000, 2.5000000e-2,0.50000000,-0.37500000},
            {-2.5000000e-2,-0.50000000,-0.22500000, 2.5000000e-2,0.50000000,-0.17500000},
            {-2.5000000e-2,-0.50000000,0.37500000, 2.5000000e-2,0.50000000,0.42500000},
            {-2.5000000e-2,-0.50000000,0.17500000, 2.5000000e-2,0.50000000,0.22500000},
            {-2.5000000e-2,-0.50000000,-2.5000000e-2, 2.5000000e-2,0.50000000,2.5000000e-2},
        },
    },


Feel free to use these models in your mod.


Do you think you could make this 3 high and 2 wide and that you could make the grate disappear after right clicking? That would be so very useful for my castle mod.
Last edited by philipbenr on Mon Sep 16, 2013 00:13, edited 1 time in total.
"The Foot is down!"
 

super_tnt
Member
 
Posts: 22
Joined: Mon Sep 02, 2013 17:56

by super_tnt » Wed Sep 18, 2013 15:32

Can I make a request for my upcoming mod? I'd like 3 cylinders, one for up and down, 2 for the 2 lying down. I looked at the barrel but it wasn't centred and I'm unsure of how to centre this, also it should be able to stack next to each other.
 

User avatar
thefamilygrog66
Member
 
Posts: 169
Joined: Mon Jul 09, 2012 19:08

by thefamilygrog66 » Wed Sep 18, 2013 15:44

Here's the nodebox info for my Lava Lamps [lavalamp] mod - an attempt at making vertical cylinders, I suppose!

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
node_box = {
    type = "fixed",
    fixed = {
        -- base
        { -0.1875, -0.5, -0.1875, 0.1875, -0.3125, 0.1875, },
        { -0.125, -0.5, -0.25, 0.125, -0.3125, -0.1875, },
        { -0.25, -0.5, -0.125, -0.1875, -0.3125, 0.125, },
        { 0.1875, -0.5, -0.125, 0.25, -0.3125, 0.125, },
        { -0.125, -0.5, 0.1875, 0.125, -0.3125, 0.25, },
        -- lamp
        { -0.125, -0.3125, -0.125, 0.125, 0.5, 0.125, },
        { -0.0625, -0.3125, -0.1875, 0.0625, 0.5, -0.125, },
        { -0.0625, -0.3125, 0.125, 0.0625, 0.5, 0.1875, },   
        { -0.1875, -0.3125, -0.0625, 0.125, 0.5, 0.0625, },
        { 0.125, -0.3125, -0.0625, 0.1875, 0.5, 0.0625, },   
    },
},


Image
 

User avatar
thefamilygrog66
Member
 
Posts: 169
Joined: Mon Jul 09, 2012 19:08

by thefamilygrog66 » Wed Sep 18, 2013 16:35

super_tnt wrote:Can I make a request for my upcoming mod? I'd like 3 cylinders, one for up and down, 2 for the 2 lying down. I looked at the barrel but it wasn't centred and I'm unsure of how to centre this, also it should be able to stack next to each other.


The round trees from tonyka's 3dforniture mod were also cylindrical:

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
node_box = {
        type = "fixed",
        fixed = {
            {-0.35,-0.5,-0.4,0.35,0.5,0.4},
            {-0.4,-0.5,-0.35, 0.4,0.5,0.35},
            {-0.25,-0.5,-0.45,0.25,0.5,0.45},
            {-0.45,-0.5,-0.25, 0.45,0.5,0.25},
            {-0.15,-0.5,-0.5,0.15,0.5,0.5},
            {-0.5,-0.5,-0.15, 0.5,0.5,0.15},
        },
    },
 

super_tnt
Member
 
Posts: 22
Joined: Mon Sep 02, 2013 17:56

by super_tnt » Wed Sep 18, 2013 17:30

Oh ok, that worked nicely.
Last edited by super_tnt on Wed Sep 18, 2013 18:37, edited 1 time in total.
 

dgm5555
Member
 
Posts: 244
Joined: Tue Apr 08, 2014 19:45

Re: Basic node_box model examples

by dgm5555 » Sun Mar 22, 2015 08:24

I'm making an anvil with a base texture that I want different to the head, and a chest and cauldren which I want inside texture different to outside. Is there any way of having different textures for different cubics within a node coded in lua, or do I have to make a 3d model for this?

Also is there a way of rotating/mirroring a texture in the node definition rather than having to do it manually (eg for a door where the hinges are mirrored on front/back of the door)?
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: Basic node_box model examples

by Hybrid Dog » Wed Mar 25, 2015 14:15

dgm5555 wrote:Also is there a way of rotating/mirroring a texture in the node definition rather than having to do it manually (eg for a door where the hinges are mirrored on front/back of the door)?

http://dev.minetest.net/texture
 

dgm5555
Member
 
Posts: 244
Joined: Tue Apr 08, 2014 19:45

Re: Basic node_box model examples

by dgm5555 » Thu Mar 26, 2015 23:05

@HybridDog Brilliant thanks, I'd never found that page
 

Previous

Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 9 guests

cron