From 7b37c66b787dd3ab3655038485d4d1126fda38a3 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Fri, 25 Sep 2015 09:00:22 -0400 Subject: [PATCH] use mesh nodes for shrubbery --- homedecor/exterior.lua | 32 ++--- homedecor/models/homedecor_cube.mtl | 10 ++ homedecor/models/homedecor_cube.obj | 23 ++++ homedecor/models/homedecor_shrubbery.obj | 117 ++++++++++++++++++ .../textures/homedecor_shrubbery_bottom.png | Bin 404 -> 0 bytes ..._top.png => homedecor_shrubbery_green.png} | Bin .../homedecor_shrubbery_green_bottom.png | Bin 0 -> 767 bytes .../homedecor_shrubbery_green_sides.png | Bin 317 -> 0 bytes ...ed_top.png => homedecor_shrubbery_red.png} | Bin .../homedecor_shrubbery_red_bottom.png | Bin 0 -> 865 bytes .../homedecor_shrubbery_red_sides.png | Bin 448 -> 0 bytes .../textures/homedecor_shrubbery_roots.png | Bin 0 -> 668 bytes ...top.png => homedecor_shrubbery_yellow.png} | Bin .../homedecor_shrubbery_yellow_bottom.png | Bin 0 -> 876 bytes .../homedecor_shrubbery_yellow_sides.png | Bin 447 -> 0 bytes 15 files changed, 157 insertions(+), 25 deletions(-) create mode 100644 homedecor/models/homedecor_cube.mtl create mode 100644 homedecor/models/homedecor_cube.obj create mode 100644 homedecor/models/homedecor_shrubbery.obj delete mode 100644 homedecor/textures/homedecor_shrubbery_bottom.png rename homedecor/textures/{homedecor_shrubbery_green_top.png => homedecor_shrubbery_green.png} (100%) create mode 100644 homedecor/textures/homedecor_shrubbery_green_bottom.png delete mode 100644 homedecor/textures/homedecor_shrubbery_green_sides.png rename homedecor/textures/{homedecor_shrubbery_red_top.png => homedecor_shrubbery_red.png} (100%) create mode 100644 homedecor/textures/homedecor_shrubbery_red_bottom.png delete mode 100644 homedecor/textures/homedecor_shrubbery_red_sides.png create mode 100644 homedecor/textures/homedecor_shrubbery_roots.png rename homedecor/textures/{homedecor_shrubbery_yellow_top.png => homedecor_shrubbery_yellow.png} (100%) create mode 100644 homedecor/textures/homedecor_shrubbery_yellow_bottom.png delete mode 100644 homedecor/textures/homedecor_shrubbery_yellow_sides.png diff --git a/homedecor/exterior.lua b/homedecor/exterior.lua index 9452caba..817090ca 100644 --- a/homedecor/exterior.lua +++ b/homedecor/exterior.lua @@ -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 diff --git a/homedecor/models/homedecor_cube.mtl b/homedecor/models/homedecor_cube.mtl new file mode 100644 index 00000000..70d3ba1d --- /dev/null +++ b/homedecor/models/homedecor_cube.mtl @@ -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 diff --git a/homedecor/models/homedecor_cube.obj b/homedecor/models/homedecor_cube.obj new file mode 100644 index 00000000..d0a18993 --- /dev/null +++ b/homedecor/models/homedecor_cube.obj @@ -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 diff --git a/homedecor/models/homedecor_shrubbery.obj b/homedecor/models/homedecor_shrubbery.obj new file mode 100644 index 00000000..c4e6c8ad --- /dev/null +++ b/homedecor/models/homedecor_shrubbery.obj @@ -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 diff --git a/homedecor/textures/homedecor_shrubbery_bottom.png b/homedecor/textures/homedecor_shrubbery_bottom.png deleted file mode 100644 index 15b0b6d8c7268a5f7de5abeb104967532e811611..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 404 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbMf(g2?jS9S&l1%3uy2?jkW2198E zLuCddWd>sz22(i(GkFFxJqAl91}h~7J1Z`GOD;!sMkgTBV06}CcJ|_O)nazjVs_VN zao1(>)MfF}XZ6)*^)qA*Fk%lhW)CuE4>9EkHRFh~;)=22j-|*T>Jfj4qoNy z;useuT3alaBq#dmfzWdo zbyd%a77LraBXfW7h%a0FurYX*XWCYQxaLFG`X)aAV%_<~aOpR_*l<5y_I=ye37P-Q u{#rOqq*~DW;)}YxHuihR`X=7_$p6SnF#E{QGY5dKX7F_Nb6Mw<&;$S!oPg8- diff --git a/homedecor/textures/homedecor_shrubbery_green_top.png b/homedecor/textures/homedecor_shrubbery_green.png similarity index 100% rename from homedecor/textures/homedecor_shrubbery_green_top.png rename to homedecor/textures/homedecor_shrubbery_green.png diff --git a/homedecor/textures/homedecor_shrubbery_green_bottom.png b/homedecor/textures/homedecor_shrubbery_green_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..e8c4a134116f0c3306a292fdb6dd6bde48f4c843 GIT binary patch literal 767 zcmVY`!6osF67#J`EuK|zzAz&PPx`>)_imOOukuKT=t1OAS>JRY`=nv_#US^d=H{Li> z6(QHMEH&dao>1(FU@`;(48y!#IMB4p-CXJDe(Icqbn=Q%;WlmcrM#$FxqjwSYC)+&x`48bXZMEx%+zdlbrn4n3+@`JkR-fHipeHoaDGh*m ztQg$O;kWwSH8J08%qZp+W$rtZw9PFvU8wj!ZWwFJQw?m9%f-s8t+YnT11(Gk`V`g-M(F~bQ zG6`eG-{eWSOnZt_B%{e3At3m8JLJ#y2<`On zQgoi*2>1Ik-C#<`$q;x0QT=I$qqCmKq;4+(2=^t{k2dG+q408wz#9nMrmdutS8mf* z`#Vw<&7^7^>@BgoWmA2-yQ;qXy0oP3i!?^ZJ)BLG*V_hut50@KN47(pO%v~GxTIHq zSXwerf3l4xoxD0dycCu+@UDhbUQGzRfspNxd(}Kof4|0(29`9?AC~C7`GDKBRp1Ro z=VgFatrY<122&=pn7`hRc>G{P6>}*ru1DN0nTV zDr*@mX%KvzVWxG);hgjKP|Rb+*_#i`rp9`X`$iJ!O;?yP4SP9iQeMYUGIZ}oZmNu|G~ xBTl9>IxmBzEB|BV&u#mE>n=32RWB~Fe*khhX9NsSCk_Ar002ovPDHLkV1lpbaqa*B literal 0 HcmV?d00001 diff --git a/homedecor/textures/homedecor_shrubbery_green_sides.png b/homedecor/textures/homedecor_shrubbery_green_sides.png deleted file mode 100644 index 6c9661a55597014047c3745567a02f70a7c430d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 317 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}LV!<*E0E?_;ghluk`-f6kYiAm zVo+0NP*-EskYvy_Vbzjj&<&N>(_qlkVKcO1GgV?XHRdog;;>X^aMEOP(q?nhV|TC8 z^U!7YGT;a@;S4t8Ot9lgvFFWn<}30MD)AAz_2Xa@&<@6uAirP+hi5m^fShhm7sn6@ zN!EkhPFEQO4jf2X7!s$`b>Pwb-}fg;wsZ(^E-aOqexg;T>x}A=n3INcSkJJ`?#NIx z=`?IKoi=e=V@||mgO)oo*9~J-96QvMj-;k|9yE1w@^Dj|-XZ(wPtm?w>-hKY&&~h- z|J?ELzV^p2e-z7JFWeh{y!7Mi$G`jkZ@;g9UVr=Z+t>GR_rHFE?NHT~rxStBV(@hJ Kb6Mw<&;$THQE7Vs diff --git a/homedecor/textures/homedecor_shrubbery_red_top.png b/homedecor/textures/homedecor_shrubbery_red.png similarity index 100% rename from homedecor/textures/homedecor_shrubbery_red_top.png rename to homedecor/textures/homedecor_shrubbery_red.png diff --git a/homedecor/textures/homedecor_shrubbery_red_bottom.png b/homedecor/textures/homedecor_shrubbery_red_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..1f289fc79481cf1266737e04653f18febba7bac5 GIT binary patch literal 865 zcmV-n1D^beP)U%s8GId;D|JBog~(?Tf9gwYBz#JMTzN>!vp&0Y3Ih5}K{Vf@#f@8d`JleO;xZA1%PBIv9WmE^SL}?(KzlgKbc{((WR8J`L4Pr+_Ei| z9|tX#Oov{aFrGCz=tN{J4OJ0r1jl63DqBI1qGJ*dhDa%CMqNH%d`)&XeIWqymuz{> zO0jo*LeYJ>#MD*d!H|{)Z&@xoiBC?~=ydzIX`L`0GNn4Gx4l`}$oGl*31gN{%20V0 z4@ibXCLEKfHy})6vX)LaOo$EW`h9XE2ERoC%DwfP*n4y&-X6(w(1{SC#`BslD&u8- ze$o=|sS|*Uy2FRgG}YZe)Xap#EnkR=H!FYYw|K{}X+~XY`zPF8Sm3MnHp{xpzrhP^ zQzL5{JXqToxw0*<>jl1E-xk@k7;kvfaw9n6>SUhC7d#vs;bc`(jXqZ8;r?oaqH9ugP0Hys zPck7DuOyE)eX-?tP(IK{0cakFg#97g%`P_*lcuJxR^mz1Zhp@hiX&2={x)y zwwW$vcKZtmMadRBuvr&9kp2WvJ{NoKW2j#QU!lnUc6BLEa#lVm7)^@=MW_S@X_re!f}u-EP}GhvZQX?(hPN#0wp3E|E= z(sfm|gFegSWBk(GXL&x))5ZyZhY{}?1ys literal 0 HcmV?d00001 diff --git a/homedecor/textures/homedecor_shrubbery_red_sides.png b/homedecor/textures/homedecor_shrubbery_red_sides.png deleted file mode 100644 index b961ed1304a50899aac5150e04c33eefb5f0b0ab..0000000000000000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