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

hmmm did i not mention today already, that i realy like your posts.....

cactuz_pl wrote:LCD monitor model: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.
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

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)
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
endnode_box = {
type = "fixed",
fixed = box
},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!


cactuz_pl wrote:Column (three blocks):
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.
cactuz_pl wrote:Castle/palace window:
Without textures (This is four blocks;2x2, not 1 block):
With stone texture:
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.
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, },
},
},
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.
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},
},
},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)?
Users browsing this forum: Google [Bot] and 9 guests