use mesh nodes for shrubbery

This commit is contained in:
Vanessa Ezekowitz 2015-09-25 09:00:22 -04:00
parent fcf8ecfd35
commit 7b37c66b78
15 changed files with 157 additions and 25 deletions

View File

@ -353,25 +353,6 @@ if minetest.get_modpath("bucket") then
})
end
local shrub_model = {
type = "fixed",
fixed = {
{-0.312500,-0.500000,0.250000,-0.187500,-0.437500,0.375000}, --NodeBox 1
{0.187500,-0.500000,-0.125000,0.312500,-0.437500,0.000000}, --NodeBox 2
{0.000000,-0.500000,-0.312500,0.125000,-0.437500,-0.187500}, --NodeBox 3
{-0.375000,-0.500000,-0.062500,-0.250000,-0.437500,0.062500}, --NodeBox 4
{0.000000,-0.500000,-0.250000,0.125000,-0.437500,-0.125000}, --NodeBox 5
{0.187500,-0.437500,-0.187500,0.375000,-0.375000,0.062500}, --NodeBox 6
{-0.062500,-0.437500,0.125000,0.187500,-0.375000,0.375000}, --NodeBox 7
{-0.062500,-0.437500,-0.375000,0.187500,-0.375000,-0.062500}, --NodeBox 8
{-0.375000,-0.437500,0.187500,-0.125000,-0.375000,0.431179}, --NodeBox 9
{-0.437500,-0.437500,-0.125000,-0.187500,-0.375000,0.125000}, --NodeBox 10
{-0.437500,-0.375000,-0.437500,0.439966,-0.312500,0.420887}, --NodeBox 11
{-0.500000,-0.312500,-0.500000,0.500000,0.500000,0.500000}, --NodeBox 12
{0.000000,-0.500000,0.187500,0.125000,-0.437500,0.312500}, --NodeBox 13
}
}
homedecor.shrub_colors = {
"green",
"red",
@ -383,7 +364,8 @@ local shrub_cbox = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
for _, color in ipairs(homedecor.shrub_colors) do
minetest.register_node("homedecor:shrubbery_large_"..color, {
description = S("Shrubbery ("..color..")"),
drawtype = "allfaces_optional",
drawtype = "mesh",
mesh = "homedecor_cube.obj",
tiles = {"homedecor_shrubbery_"..color.."_top.png"},
paramtype = "light",
is_ground_content = false,
@ -393,11 +375,12 @@ for _, color in ipairs(homedecor.shrub_colors) do
minetest.register_node("homedecor:shrubbery_"..color, {
description = S("Shrubbery ("..color..")"),
drawtype = "nodebox",
drawtype = "mesh",
mesh = "homedecor_shrubbery.obj",
tiles = {
"homedecor_shrubbery_"..color.."_top.png",
"homedecor_shrubbery_bottom.png",
"homedecor_shrubbery_"..color.."_sides.png"
"homedecor_shrubbery_"..color..".png",
"homedecor_shrubbery_"..color.."_bottom.png",
"homedecor_shrubbery_roots.png"
},
paramtype = "light",
is_ground_content = false,
@ -405,7 +388,6 @@ for _, color in ipairs(homedecor.shrub_colors) do
sounds = default.node_sound_leaves_defaults(),
selection_box = shrub_cbox,
collision_box = shrub_cbox,
node_box = shrub_model
})
end

View File

@ -0,0 +1,10 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2

View File

@ -0,0 +1,23 @@
# Blender v2.73 (sub 0) OBJ File: 'cobe+1.001.blend'
# www.blender.org
o Cylinder
v -0.499500 -0.499500 0.499500
v -0.499500 -0.499500 -0.499500
v 0.499500 -0.499500 -0.499500
v 0.499500 -0.499500 0.499500
v -0.499500 0.499500 0.499500
v -0.499500 0.499500 -0.499500
v 0.499500 0.499500 -0.499500
v 0.499500 0.499500 0.499500
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
g Cylinder_Cylinder_None
s off
f 5/1 6/2 2/3 1/4
f 6/1 7/2 3/3 2/4
f 7/1 8/2 4/3 3/4
f 8/1 5/2 1/3 4/4
f 1/1 2/2 3/3 4/4
f 8/1 7/2 6/3 5/4

View File

@ -0,0 +1,117 @@
# Blender v2.73 (sub 0) OBJ File: 'shrubbery.blend'
# www.blender.org
o Cylinder
v -0.499483 -0.312503 0.499551
v -0.499483 -0.312503 -0.499449
v 0.499517 -0.312503 -0.499449
v 0.499517 -0.312503 0.499551
v -0.499483 0.499185 0.499551
v -0.499483 0.499185 -0.499449
v 0.499517 0.499185 -0.499449
v 0.499517 0.499185 0.499551
v 0.187330 -0.499815 0.249801
v 0.187330 -0.499815 0.124926
v 0.312205 -0.499815 0.124926
v 0.312205 -0.499815 0.249801
v 0.062455 -0.312503 0.374676
v 0.062455 -0.312503 0.000051
v 0.437080 -0.312503 0.000051
v 0.437080 -0.312503 0.374676
v 0.350010 -0.406159 0.287607
v 0.149524 -0.406159 0.287607
v 0.350010 -0.406159 0.087120
v 0.149524 -0.406159 0.087120
v 0.000017 -0.499815 -0.187261
v 0.000017 -0.499815 -0.312136
v 0.124892 -0.499815 -0.312136
v 0.124892 -0.499815 -0.187261
v -0.124858 -0.312503 -0.062386
v -0.124858 -0.312503 -0.437011
v 0.249767 -0.312503 -0.437011
v 0.249767 -0.312503 -0.062386
v 0.162698 -0.406159 -0.149456
v -0.037789 -0.406159 -0.149456
v 0.162698 -0.406159 -0.349942
v -0.037789 -0.406159 -0.349942
v -0.312170 -0.499815 0.312239
v -0.312170 -0.499815 0.187364
v -0.187295 -0.499815 0.187364
v -0.187295 -0.499815 0.312239
v -0.437045 -0.312503 0.437114
v -0.437045 -0.312503 0.062489
v -0.062420 -0.312503 0.062489
v -0.062420 -0.312503 0.437114
v -0.149490 -0.406159 0.350045
v -0.349976 -0.406159 0.350045
v -0.149490 -0.406159 0.149558
v -0.349976 -0.406159 0.149558
vt 1.000000 1.000000
vt 0.000000 1.000000
vt -0.000000 0.187500
vt 1.000000 0.187500
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.375000 0.437500
vt 0.500000 0.437500
vt 0.500000 0.562500
vt 0.375000 0.562500
vt 0.725343 0.656248
vt 0.812500 0.750000
vt 0.437500 0.750000
vt 0.524656 0.656248
vt 0.287844 0.906248
vt 0.375000 1.000000
vt 0.087156 0.906248
vt 0.725344 0.906248
vt 0.812500 1.000000
vt 0.437500 1.000000
vt 0.524656 0.906248
vt 0.287844 0.656248
vt 0.375000 0.750000
vt 0.000000 0.750000
vt 0.087156 0.656248
vt 0.250000 0.562495
vt 0.125000 0.562495
vt 0.250000 0.812495
vt 0.125000 0.812495
vt 0.687500 0.812495
vt 0.562500 0.812495
vt 0.687500 0.562495
vt 0.562500 0.562495
g Cylinder_Cylinder_top-sides
s off
f 5/1 6/2 2/3 1/4
f 6/1 7/2 3/3 2/4
f 7/1 8/2 4/3 3/4
f 8/1 5/2 1/3 4/4
f 8/5 7/6 6/1 5/2
g Cylinder_Cylinder_bottom
f 1/5 2/6 3/1 4/2
g Cylinder_Cylinder_roots
f 9/7 10/8 11/9 12/10
f 17/11 16/12 13/13 18/14
f 19/15 15/16 16/2 17/17
f 20/18 14/19 15/20 19/21
f 18/22 13/23 14/24 20/25
f 9/26 18/22 20/25 10/27
f 10/28 20/15 19/17 11/29
f 11/30 19/18 17/21 12/31
f 12/32 17/11 18/14 9/33
f 21/7 22/8 23/9 24/10
f 29/11 28/12 25/13 30/14
f 31/15 27/16 28/2 29/17
f 32/18 26/19 27/20 31/21
f 30/22 25/23 26/24 32/25
f 21/26 30/22 32/25 22/27
f 22/28 32/15 31/17 23/29
f 23/30 31/18 29/21 24/31
f 24/32 29/11 30/14 21/33
f 33/7 34/8 35/9 36/10
f 41/11 40/12 37/13 42/14
f 43/15 39/16 40/2 41/17
f 44/18 38/19 39/20 43/21
f 42/22 37/23 38/24 44/25
f 33/26 42/22 44/25 34/27
f 34/28 44/15 43/17 35/29
f 35/30 43/18 41/21 36/31
f 36/32 41/11 42/14 33/33

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

View File

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 B

View File

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

View File

Before

Width:  |  Height:  |  Size: 313 B

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 876 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 B